From: Alex Deucher Date: Thu, 17 May 2018 18:03:05 +0000 (-0500) Subject: drm/amdgpu: Take vcn encode rings into account in idle work X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=646e906d1d64fdc6bb1a27dac45144dfd8996071;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Alex Deucher --- 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) struct amdgpu_device *adev = container_of(work, struct amdgpu_device, vcn.idle_work.work); unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec); + unsigned i; + + for (i = 0; i < adev->vcn.num_enc_rings; ++i) { + fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]); + } if (fences == 0) { if (adev->pm.dpm_enabled) {