diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-10-26 12:05:30 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-27 22:18:48 +0300 |
commit | 415282b15e15c2d7fb18e29c5b554cc7f4ff5c52 (patch) | |
tree | ce36417faac0f7c5875acd9ace14d0454fb08ea4 /drivers/gpu | |
parent | 4be5097ccba6dd6006b24db238c75dfcf66bcad3 (diff) | |
download | linux-415282b15e15c2d7fb18e29c5b554cc7f4ff5c52.tar.xz |
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')
-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, ret = ci_enable_vce_dpm(adev, true); } else { + ret = ci_enable_vce_dpm(adev, false); + if (ret) + return ret; /* turn the clocks off when not encoding */ ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE, AMD_CG_STATE_GATE); - if (ret) - return ret; - - ret = ci_enable_vce_dpm(adev, false); } } return ret; |