diff options
author | Leo Liu <leo.liu@amd.com> | 2016-08-03 09:25:59 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-08 11:33:12 -0400 |
commit | 713c0021979a525b9e87dce8fd9d79dd0b99db4c (patch) | |
tree | 3022aed4861db2afab6909dc5d8b40f86006aa61 /drivers/gpu/drm/amd/amdgpu | |
parent | f10379503e2b1814e27957899bcdfd0132a1915e (diff) |
drm/amdgpu: remove the check for sessions being closed
This will make clock and power gated when no block decoded, for example
when paused during the playback.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@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/amdgpu_uvd.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index c22b64ec4ec1..bf59354d788a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |||
@@ -1089,15 +1089,9 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work) | |||
1089 | { | 1089 | { |
1090 | struct amdgpu_device *adev = | 1090 | struct amdgpu_device *adev = |
1091 | container_of(work, struct amdgpu_device, uvd.idle_work.work); | 1091 | container_of(work, struct amdgpu_device, uvd.idle_work.work); |
1092 | unsigned i, fences, handles = 0; | 1092 | unsigned fences = amdgpu_fence_count_emitted(&adev->uvd.ring); |
1093 | 1093 | ||
1094 | fences = amdgpu_fence_count_emitted(&adev->uvd.ring); | 1094 | if (fences == 0) { |
1095 | |||
1096 | for (i = 0; i < adev->uvd.max_handles; ++i) | ||
1097 | if (atomic_read(&adev->uvd.handles[i])) | ||
1098 | ++handles; | ||
1099 | |||
1100 | if (fences == 0 && handles == 0) { | ||
1101 | if (adev->pm.dpm_enabled) { | 1095 | if (adev->pm.dpm_enabled) { |
1102 | amdgpu_dpm_enable_uvd(adev, false); | 1096 | amdgpu_dpm_enable_uvd(adev, false); |
1103 | } else { | 1097 | } else { |