diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-01-12 08:50:18 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 11:13:33 -0500 |
commit | a1970a6382b8781380de9494b2e256aa85814b79 (patch) | |
tree | 801d88cc188b5f828f05e23717bc6f7079490079 /drivers | |
parent | 50261151a13176a99ee6117dbbb2e557fd0b608b (diff) |
drm/amdgpu: refine ci uvd dpm code.
Fix up the powergating logic.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Ack-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 11 |
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) | |||
889 | 889 | ||
890 | pi->uvd_power_gated = gate; | 890 | pi->uvd_power_gated = gate; |
891 | 891 | ||
892 | ci_update_uvd_dpm(adev, gate); | 892 | if (gate) { |
893 | /* stop the UVD block */ | ||
894 | amdgpu_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD, | ||
895 | AMD_PG_STATE_GATE); | ||
896 | ci_update_uvd_dpm(adev, gate); | ||
897 | } else { | ||
898 | amdgpu_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD, | ||
899 | AMD_PG_STATE_UNGATE); | ||
900 | ci_update_uvd_dpm(adev, gate); | ||
901 | } | ||
893 | } | 902 | } |
894 | 903 | ||
895 | static bool ci_dpm_vblank_too_short(struct amdgpu_device *adev) | 904 | static bool ci_dpm_vblank_too_short(struct amdgpu_device *adev) |