drm/xe: Fix exec queue usage for unbinds
authorMatthew Brost <matthew.brost@intel.com>
Fri, 29 Sep 2023 20:02:54 +0000 (13:02 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:42:08 +0000 (11:42 -0500)
Passing in a NULL exec queue to __xe_pt_unbind_vma results in the
migrate exec queue being used. This is not the intent from the VM bind
IOCTL, rather a NULL exec queue should use default VM exec queue.

Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_vm.c

index 2bb0a1669a961728681fb8140f1017667f1590b0..42a5d912e775d295abd3498be719964db819da34 100644 (file)
@@ -1734,7 +1734,8 @@ xe_vm_unbind_vma(struct xe_vma *vma, struct xe_exec_queue *q,
                if (!(vma->tile_present & BIT(id)))
                        goto next;
 
-               fence = __xe_pt_unbind_vma(tile, vma, q, first_op ? syncs : NULL,
+               fence = __xe_pt_unbind_vma(tile, vma, q ? q : vm->q[id],
+                                          first_op ? syncs : NULL,
                                           first_op ? num_syncs : 0);
                if (IS_ERR(fence)) {
                        err = PTR_ERR(fence);