]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/xe: Explicitly mark migration queues with flag
authorMatthew Brost <matthew.brost@intel.com>
Thu, 24 Jul 2025 19:12:10 +0000 (12:12 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Fri, 25 Jul 2025 01:25:55 +0000 (18:25 -0700)
Rather than inferring if an exec queue is a migration queue for a flag,
explicitly mark migration queues with a flag.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Link: https://lore.kernel.org/r/20250724191216.4076566-2-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_exec_queue_types.h
drivers/gpu/drm/xe/xe_migrate.c

index cc1cffb5c87f1d0a4d2cea9e7b57cee9835762af..abdf4a57e6e26c7a4d6dd5196352e3fc7078ef68 100644 (file)
@@ -87,6 +87,8 @@ struct xe_exec_queue {
 #define EXEC_QUEUE_FLAG_HIGH_PRIORITY          BIT(4)
 /* flag to indicate low latency hint to guc */
 #define EXEC_QUEUE_FLAG_LOW_LATENCY            BIT(5)
+/* for migration (kernel copy, clear, bind) jobs */
+#define EXEC_QUEUE_FLAG_MIGRATE                        BIT(6)
 
        /**
         * @flags: flags for this exec queue, should statically setup aside from ban
index 0a61fb8b123a9cdcd57523eb79f0b46ee3ad9b4c..ed04c2b368dcb3375f2de7d62f791aac2388908b 100644 (file)
@@ -439,12 +439,14 @@ struct xe_migrate *xe_migrate_init(struct xe_tile *tile)
                m->q = xe_exec_queue_create(xe, vm, logical_mask, 1, hwe,
                                            EXEC_QUEUE_FLAG_KERNEL |
                                            EXEC_QUEUE_FLAG_PERMANENT |
-                                           EXEC_QUEUE_FLAG_HIGH_PRIORITY, 0);
+                                           EXEC_QUEUE_FLAG_HIGH_PRIORITY |
+                                           EXEC_QUEUE_FLAG_MIGRATE, 0);
        } else {
                m->q = xe_exec_queue_create_class(xe, primary_gt, vm,
                                                  XE_ENGINE_CLASS_COPY,
                                                  EXEC_QUEUE_FLAG_KERNEL |
-                                                 EXEC_QUEUE_FLAG_PERMANENT, 0);
+                                                 EXEC_QUEUE_FLAG_PERMANENT |
+                                                 EXEC_QUEUE_FLAG_MIGRATE, 0);
        }
        if (IS_ERR(m->q)) {
                xe_vm_close_and_put(vm);