diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-08-28 18:46:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-08-30 16:31:14 -0400 |
commit | f30df435ac6136787e65646881e62f12df2d71f6 (patch) | |
tree | ddbf5e6b35e5a0b1327aa8b5077d778ec2d79bc6 | |
parent | a7f28f0f55ce484ef6047fa1f42d57daaeb1b634 (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/radeon/kv_dpm.c | 15 |
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) | |||
1491 | pi->uvd_power_gated = gate; | 1491 | pi->uvd_power_gated = gate; |
1492 | 1492 | ||
1493 | if (gate) { | 1493 | if (gate) { |
1494 | uvd_v1_0_stop(rdev); | 1494 | if (pi->caps_uvd_pg) { |
1495 | cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, false); | 1495 | uvd_v1_0_stop(rdev); |
1496 | cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, false); | ||
1497 | } | ||
1496 | kv_update_uvd_dpm(rdev, gate); | 1498 | kv_update_uvd_dpm(rdev, gate); |
1497 | if (pi->caps_uvd_pg) | 1499 | if (pi->caps_uvd_pg) |
1498 | kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerOFF); | 1500 | kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerOFF); |
1499 | } else { | 1501 | } else { |
1500 | if (pi->caps_uvd_pg) | 1502 | if (pi->caps_uvd_pg) { |
1501 | kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerON); | 1503 | kv_notify_message_to_smu(rdev, PPSMC_MSG_UVDPowerON); |
1502 | uvd_v4_2_resume(rdev); | 1504 | uvd_v4_2_resume(rdev); |
1503 | uvd_v1_0_start(rdev); | 1505 | uvd_v1_0_start(rdev); |
1504 | cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, true); | 1506 | cik_update_cg(rdev, RADEON_CG_BLOCK_UVD, true); |
1507 | } | ||
1505 | kv_update_uvd_dpm(rdev, gate); | 1508 | kv_update_uvd_dpm(rdev, gate); |
1506 | } | 1509 | } |
1507 | } | 1510 | } |