summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-08-29 00:46:01 +0200
committerAlex Deucher <alexander.deucher@amd.com>2013-08-30 22:31:14 +0200
commitf30df435ac6136787e65646881e62f12df2d71f6 (patch)
treeddbf5e6b35e5a0b1327aa8b5077d778ec2d79bc6 /drivers/gpu/drm
parentdrm/radeon: check the return value of uvd_v1_0_start in uvd_v1_0_init (diff)
downloadlinux-f30df435ac6136787e65646881e62f12df2d71f6.tar.xz
linux-f30df435ac6136787e65646881e62f12df2d71f6.zip
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: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/radeon/kv_dpm.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index a10207783065..15a6f67813d7 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -1491,17 +1491,20 @@ void kv_dpm_powergate_uvd(struct radeon_device *rdev, bool gate)
pi->uvd_power_gated = gate;
if (gate) {
- uvd_v1_0_stop(rdev);
- cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, false);
+ if (pi->caps_uvd_pg) {
+ uvd_v1_0_stop(rdev);
+ cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, false);
+ }
kv_update_uvd_dpm(rdev, gate);
if (pi->caps_uvd_pg)
kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerOFF);
} else {
- if (pi->caps_uvd_pg)
+ if (pi->caps_uvd_pg) {
kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerON);
- uvd_v4_2_resume(rdev);
- uvd_v1_0_start(rdev);
- cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, true);
+ uvd_v4_2_resume(rdev);
+ uvd_v1_0_start(rdev);
+ cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, true);
+ }
kv_update_uvd_dpm(rdev, gate);
}
}