aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-05-17 14:03:05 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-05-18 17:08:21 -0400
commit646e906d1d64fdc6bb1a27dac45144dfd8996071 (patch)
treeb2492cdaab6784c276e352305d524b14f4d4e0d3 /drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
parent4bd2c5dd763866b827dd7e95b9ea71c47fa06126 (diff)
drm/amdgpu: Take vcn encode rings into account in idle work
Take the encode rings into account in the idle work handler. 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_vcn.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index e5d234cf804f..60468385e6b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -205,6 +205,11 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
205 struct amdgpu_device *adev = 205 struct amdgpu_device *adev =
206 container_of(work, struct amdgpu_device, vcn.idle_work.work); 206 container_of(work, struct amdgpu_device, vcn.idle_work.work);
207 unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec); 207 unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec);
208 unsigned i;
209
210 for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
211 fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]);
212 }
208 213
209 if (fences == 0) { 214 if (fences == 0) {
210 if (adev->pm.dpm_enabled) { 215 if (adev->pm.dpm_enabled) {