From: Leo Liu Date: Mon, 9 Jul 2018 15:59:01 +0000 (-0400) Subject: drm/amdgpu: Take VCN jpeg ring into account in idle work handler X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7b4e54a9729d0a57cf036af801aa1e78ef315982;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: Take VCN jpeg ring into account in idle work handler VCN won't get power off when only jpeg active Signed-off-by: Leo Liu Reviewed-by: Alex Deucher 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 a66cd521a875..4a3457236e85 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c @@ -211,6 +211,8 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]); } + fences += amdgpu_fence_count_emitted(&adev->vcn.ring_jpeg); + if (fences == 0) { if (adev->pm.dpm_enabled) amdgpu_dpm_enable_uvd(adev, false);