drm/xe: Ensure LR engines are not persistent
authorMatthew Brost <matthew.brost@intel.com>
Thu, 13 Apr 2023 01:48:41 +0000 (18:48 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:34:50 +0000 (11:34 -0500)
With our ref counting scheme long running (LR) engines only close
properly if not persistent, ensure that LR engines are non-persistent.

v2: spell out LR

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_engine.c

index 1843e886a405b3759ca3d16beaea525ed3c09788..e72a94a944d0030de70dfabc253a0abf409aaf5f 100644 (file)
@@ -599,7 +599,9 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data,
                        return -ENOENT;
 
                e = xe_engine_create(xe, vm, logical_mask,
-                                    args->width, hwe, ENGINE_FLAG_PERSISTENT);
+                                    args->width, hwe,
+                                    xe_vm_no_dma_fences(vm) ? 0 :
+                                    ENGINE_FLAG_PERSISTENT);
                xe_vm_put(vm);
                if (IS_ERR(e))
                        return PTR_ERR(e);