diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-10-26 05:05:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-27 15:18:48 -0400 |
commit | 415282b15e15c2d7fb18e29c5b554cc7f4ff5c52 (patch) | |
tree | ce36417faac0f7c5875acd9ace14d0454fb08ea4 /drivers/gpu/drm/amd/amdgpu | |
parent | 4be5097ccba6dd6006b24db238c75dfcf66bcad3 (diff) |
drm/amdgpu: disable dpm before turn off clock when vce idle.
v2: move return value check as well
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c index f1baf6715b05..3295fbbdf8c8 100644 --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c | |||
@@ -4258,13 +4258,12 @@ static int ci_update_vce_dpm(struct amdgpu_device *adev, | |||
4258 | 4258 | ||
4259 | ret = ci_enable_vce_dpm(adev, true); | 4259 | ret = ci_enable_vce_dpm(adev, true); |
4260 | } else { | 4260 | } else { |
4261 | ret = ci_enable_vce_dpm(adev, false); | ||
4262 | if (ret) | ||
4263 | return ret; | ||
4261 | /* turn the clocks off when not encoding */ | 4264 | /* turn the clocks off when not encoding */ |
4262 | ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE, | 4265 | ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE, |
4263 | AMD_CG_STATE_GATE); | 4266 | AMD_CG_STATE_GATE); |
4264 | if (ret) | ||
4265 | return ret; | ||
4266 | |||
4267 | ret = ci_enable_vce_dpm(adev, false); | ||
4268 | } | 4267 | } |
4269 | } | 4268 | } |
4270 | return ret; | 4269 | return ret; |