aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Zhu <[email protected]>2017-01-12 21:50:18 +0800
committerAlex Deucher <[email protected]>2017-01-27 11:13:33 -0500
commita1970a6382b8781380de9494b2e256aa85814b79 (patch)
tree801d88cc188b5f828f05e23717bc6f7079490079
parent50261151a13176a99ee6117dbbb2e557fd0b608b (diff)
drm/amdgpu: refine ci uvd dpm code.
Fix up the powergating logic. Signed-off-by: Rex Zhu <[email protected]> Ack-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/ci_dpm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index ece94eeb638e..9498e78b90d7 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -889,7 +889,16 @@ static void ci_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate)
pi->uvd_power_gated = gate;
- ci_update_uvd_dpm(adev, gate);
+ if (gate) {
+ /* stop the UVD block */
+ amdgpu_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
+ AMD_PG_STATE_GATE);
+ ci_update_uvd_dpm(adev, gate);
+ } else {
+ amdgpu_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
+ AMD_PG_STATE_UNGATE);
+ ci_update_uvd_dpm(adev, gate);
+ }
}
static bool ci_dpm_vblank_too_short(struct amdgpu_device *adev)