]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/vm: Skip ufence association for CPU address mirror VMA during MAP
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Tue, 25 Nov 2025 07:56:28 +0000 (13:26 +0530)
committerHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Wed, 26 Nov 2025 10:12:33 +0000 (15:42 +0530)
The MAP operation for a CPU address mirror VMA does not require ufence
association because such mappings are not GPU-synchronized and do not
participate in GPU job completion signaling.

Remove the unnecessary ufence addition for this case to avoid -EBUSY
failure in check_ufence of unbind ops.

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251125075628.1182481-6-himal.prasad.ghimiray@intel.com
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drivers/gpu/drm/xe/xe_vm.c

index a7a21966e390b8d4b60d325c28cef93541331a31..a70a4a1fa03cc1d88af7a004458480055f889d92 100644 (file)
@@ -3218,7 +3218,8 @@ static void op_add_ufence(struct xe_vm *vm, struct xe_vma_op *op,
 {
        switch (op->base.op) {
        case DRM_GPUVA_OP_MAP:
-               vma_add_ufence(op->map.vma, ufence);
+               if (!xe_vma_is_cpu_addr_mirror(op->map.vma))
+                       vma_add_ufence(op->map.vma, ufence);
                break;
        case DRM_GPUVA_OP_REMAP:
                if (op->remap.prev)