[PATCH v2 1/9] drm/xe: Explicitly mark migration queues with flag

Summers, Stuart stuart.summers at intel.com
Fri Jul 11 21:20:18 UTC 2025


On Wed, 2025-07-02 at 16:42 -0700, Matthew Brost wrote:
> 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 at intel.com>

Reviewed-by: Stuart Summers <stuart.summers at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++
>  drivers/gpu/drm/xe/xe_migrate.c          | 6 ++++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue_types.h
> b/drivers/gpu/drm/xe/xe_exec_queue_types.h
> index cc1cffb5c87f..abdf4a57e6e2 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue_types.h
> +++ b/drivers/gpu/drm/xe/xe_exec_queue_types.h
> @@ -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
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c
> b/drivers/gpu/drm/xe/xe_migrate.c
> index 0838582537e8..b5f85162b9ed 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -437,12 +437,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);



More information about the Intel-xe mailing list