]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amdgpu: Take VCN jpeg ring into account in idle work handler
authorLeo Liu <leo.liu@amd.com>
Mon, 9 Jul 2018 15:59:01 +0000 (11:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Jul 2018 19:18:35 +0000 (14:18 -0500)
VCN won't get power off when only jpeg active

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c

index a66cd521a875499243e5be4001dfae3a67996173..4a3457236e856cd8f87de22b6b73e7eafa98d8c8 100644 (file)
@@ -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);