aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-09-26 15:19:14 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-27 13:00:50 -0400
commit24c5fe56b25eaf05aa2ce1dfebac707c58208ea4 (patch)
treec34a5c11c392ea4d0bc103245d9e176f30fe1d47 /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
parentb62b5931bd838db3d0376c76a44d508509973d3d (diff)
drm/amdgpu/vce: take all rings into account for idle checks
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/amdgpu_vce.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 06b94c13c2c9..686d99c121a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -303,9 +303,12 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work)
303{ 303{
304 struct amdgpu_device *adev = 304 struct amdgpu_device *adev =
305 container_of(work, struct amdgpu_device, vce.idle_work.work); 305 container_of(work, struct amdgpu_device, vce.idle_work.work);
306 unsigned i, count = 0;
306 307
307 if ((amdgpu_fence_count_emitted(&adev->vce.ring[0]) == 0) && 308 for (i = 0; i < adev->vce.num_rings; i++)
308 (amdgpu_fence_count_emitted(&adev->vce.ring[1]) == 0)) { 309 count += amdgpu_fence_count_emitted(&adev->vce.ring[i]);
310
311 if (count == 0) {
309 if (adev->pm.dpm_enabled) { 312 if (adev->pm.dpm_enabled) {
310 amdgpu_dpm_enable_vce(adev, false); 313 amdgpu_dpm_enable_vce(adev, false);
311 } else { 314 } else {