mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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>
This commit is contained in:
parent
4be5097ccb
commit
415282b15e
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue