Commit 415282b1 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amdgpu: disable dpm before turn off clock when vce idle.

v2: move return value check as well
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4be5097c
...@@ -4258,13 +4258,12 @@ static int ci_update_vce_dpm(struct amdgpu_device *adev, ...@@ -4258,13 +4258,12 @@ static int ci_update_vce_dpm(struct amdgpu_device *adev,
ret = ci_enable_vce_dpm(adev, true); ret = ci_enable_vce_dpm(adev, true);
} else { } else {
ret = ci_enable_vce_dpm(adev, false);
if (ret)
return ret;
/* turn the clocks off when not encoding */ /* turn the clocks off when not encoding */
ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE, ret = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
AMD_CG_STATE_GATE); AMD_CG_STATE_GATE);
if (ret)
return ret;
ret = ci_enable_vce_dpm(adev, false);
} }
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment