Commit 47acb1ff authored by Alex Deucher's avatar Alex Deucher

drm/radeon/dpm: track uvd gated state for ci

Track the current uvd gated state on CI to avoid unnecessary
state changes when uvd is active.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9597fe1e
...@@ -681,6 +681,13 @@ static int ci_power_control_set_level(struct radeon_device *rdev) ...@@ -681,6 +681,13 @@ static int ci_power_control_set_level(struct radeon_device *rdev)
void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate) void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate)
{ {
struct ci_power_info *pi = ci_get_pi(rdev);
if (pi->uvd_power_gated == gate)
return;
pi->uvd_power_gated = gate;
ci_update_uvd_dpm(rdev, gate); ci_update_uvd_dpm(rdev, gate);
} }
...@@ -4620,6 +4627,8 @@ int ci_dpm_enable(struct radeon_device *rdev) ...@@ -4620,6 +4627,8 @@ int ci_dpm_enable(struct radeon_device *rdev)
ci_enable_auto_throttle_source(rdev, RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL, true); ci_enable_auto_throttle_source(rdev, RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL, true);
ci_dpm_powergate_uvd(rdev, true);
cik_update_cg(rdev, (RADEON_CG_BLOCK_GFX | cik_update_cg(rdev, (RADEON_CG_BLOCK_GFX |
RADEON_CG_BLOCK_MC | RADEON_CG_BLOCK_MC |
RADEON_CG_BLOCK_SDMA | RADEON_CG_BLOCK_SDMA |
...@@ -4643,6 +4652,8 @@ void ci_dpm_disable(struct radeon_device *rdev) ...@@ -4643,6 +4652,8 @@ void ci_dpm_disable(struct radeon_device *rdev)
RADEON_CG_BLOCK_UVD | RADEON_CG_BLOCK_UVD |
RADEON_CG_BLOCK_HDP), false); RADEON_CG_BLOCK_HDP), false);
ci_dpm_powergate_uvd(rdev, false);
if (!ci_is_smc_running(rdev)) if (!ci_is_smc_running(rdev))
return; return;
...@@ -5163,6 +5174,8 @@ int ci_dpm_init(struct radeon_device *rdev) ...@@ -5163,6 +5174,8 @@ int ci_dpm_init(struct radeon_device *rdev)
pi->caps_dynamic_ac_timing = true; pi->caps_dynamic_ac_timing = true;
pi->uvd_power_gated = false;
return 0; return 0;
} }
......
...@@ -279,6 +279,7 @@ struct ci_power_info { ...@@ -279,6 +279,7 @@ struct ci_power_info {
bool enable_pkg_pwr_tracking_feature; bool enable_pkg_pwr_tracking_feature;
bool use_pcie_performance_levels; bool use_pcie_performance_levels;
bool use_pcie_powersaving_levels; bool use_pcie_powersaving_levels;
bool uvd_power_gated;
/* driver states */ /* driver states */
struct radeon_ps current_rps; struct radeon_ps current_rps;
struct ci_ps current_ps; struct ci_ps current_ps;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment