aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index be2917c6698e..bcf68f80bbf0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1146,10 +1146,13 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
1146{ 1146{
1147 struct amdgpu_device *adev = 1147 struct amdgpu_device *adev =
1148 container_of(work, struct amdgpu_device, uvd.inst->idle_work.work); 1148 container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
1149 unsigned fences = 0, i; 1149 unsigned fences = 0, i, j;
1150 1150
1151 for (i = 0; i < adev->uvd.num_uvd_inst; ++i) { 1151 for (i = 0; i < adev->uvd.num_uvd_inst; ++i) {
1152 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring); 1152 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring);
1153 for (j = 0; j < adev->uvd.num_enc_rings; ++j) {
1154 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring_enc[j]);
1155 }
1153 } 1156 }
1154 1157
1155 if (fences == 0) { 1158 if (fences == 0) {