]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: always emit the job vm fence
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 19:41:28 +0000 (15:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Jul 2026 21:40:23 +0000 (17:40 -0400)
We need the fence to reemit the gds switch or spm update
after a queue reset.

Fixes: a17ef941212b ("drm/amdgpu: rework ring reset backup and reemit v9")
Cc: timur.kristof@gmail.com
Cc: christian.koenig@amd.com
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit bc639a9eadc75822f7f15a4315c198a4b5513bd2)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index bb99b7c3a010ea4bf7e289bf44aa0a14a2991804..f224d33c4bc4981bcc396733d951822b9cbaa6b7 100644 (file)
@@ -855,12 +855,10 @@ void amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
                                            job->oa_size);
        }
 
-       if (vm_flush_needed || pasid_mapping_needed || cleaner_shader_needed) {
-               amdgpu_fence_emit(ring, job->hw_vm_fence, 0);
-               fence = &job->hw_vm_fence->base;
-               /* get a ref for the job */
-               dma_fence_get(fence);
-       }
+       amdgpu_fence_emit(ring, job->hw_vm_fence, 0);
+       fence = &job->hw_vm_fence->base;
+       /* get a ref for the job */
+       dma_fence_get(fence);
 
        if (vm_flush_needed) {
                mutex_lock(&id_mgr->lock);