mirror of https://gitee.com/openkylin/linux.git
drm/radeon: don't power gate paused UVD streams
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
7f4237c6da
commit
8158eb9e32
|
@ -924,6 +924,10 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
|
|||
|
||||
if (rdev->asic->dpm.powergate_uvd) {
|
||||
mutex_lock(&rdev->pm.mutex);
|
||||
/* don't powergate anything if we
|
||||
have active but pause streams */
|
||||
enable |= rdev->pm.dpm.sd > 0;
|
||||
enable |= rdev->pm.dpm.hd > 0;
|
||||
/* enable/disable UVD */
|
||||
radeon_dpm_powergate_uvd(rdev, !enable);
|
||||
mutex_unlock(&rdev->pm.mutex);
|
||||
|
|
|
@ -778,6 +778,8 @@ static void radeon_uvd_idle_work_handler(struct work_struct *work)
|
|||
|
||||
if (radeon_fence_count_emitted(rdev, R600_RING_TYPE_UVD_INDEX) == 0) {
|
||||
if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled) {
|
||||
radeon_uvd_count_handles(rdev, &rdev->pm.dpm.sd,
|
||||
&rdev->pm.dpm.hd);
|
||||
radeon_dpm_enable_uvd(rdev, false);
|
||||
} else {
|
||||
radeon_set_uvd_clocks(rdev, 0, 0);
|
||||
|
|
Loading…
Reference in New Issue