Commit f30df435 authored by Alex Deucher's avatar Alex Deucher

drm/radeon/dpm: only need to reprogram uvd if uvd pg is enabled

Avoid needless uvd reprogramming if uvd powergating is disabled.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
parent a7f28f0f
...@@ -1491,17 +1491,20 @@ void kv_dpm_powergate_uvd(struct radeon_device *rdev, bool gate) ...@@ -1491,17 +1491,20 @@ void kv_dpm_powergate_uvd(struct radeon_device *rdev, bool gate)
pi->uvd_power_gated = gate; pi->uvd_power_gated = gate;
if (gate) { if (gate) {
uvd_v1_0_stop(rdev); if (pi->caps_uvd_pg) {
cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, false); uvd_v1_0_stop(rdev);
cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, false);
}
kv_update_uvd_dpm(rdev, gate); kv_update_uvd_dpm(rdev, gate);
if (pi->caps_uvd_pg) if (pi->caps_uvd_pg)
kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerOFF); kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerOFF);
} else { } else {
if (pi->caps_uvd_pg) if (pi->caps_uvd_pg) {
kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerON); kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerON);
uvd_v4_2_resume(rdev); uvd_v4_2_resume(rdev);
uvd_v1_0_start(rdev); uvd_v1_0_start(rdev);
cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, true); cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, true);
}
kv_update_uvd_dpm(rdev, gate); kv_update_uvd_dpm(rdev, gate);
} }
} }
......
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