drm/xe: Fix modifying exec_queue priority in xe_migrate_init
authorBrian Welty <brian.welty@intel.com>
Fri, 5 Jan 2024 19:04:40 +0000 (11:04 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Tue, 9 Jan 2024 22:11:58 +0000 (14:11 -0800)
commita8004af338f6b3319476ecbed63ea49bf393fc1f
treea3f976443b3888466c4a0ebf32935396738cfde6
parentb16483f9f8120b530327879fa3ea576e897946da
drm/xe: Fix modifying exec_queue priority in xe_migrate_init

After exec_queue has been created, we cannot simply modify q->priority.
This needs to be done by the backend via q->ops.  However in this case,
it would be more efficient to simply pass a flag when creating the
exec_queue and set the desired priority upfront during queue creation.

To that end: new flag EXEC_QUEUE_FLAG_HIGH_PRIORITY is introduced.
The priority field is moved to be with other scheduling properties and
is now exec_queue.sched_props.priority. This is no longer set to initial
value by the backend, but is now set within __xe_exec_queue_create().

Fixes: b4eecedc75c1 ("drm/xe: Fix potential deadlock handling page faults")
Signed-off-by: Brian Welty <brian.welty@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
drivers/gpu/drm/xe/xe_exec_queue.c
drivers/gpu/drm/xe/xe_exec_queue_types.h
drivers/gpu/drm/xe/xe_guc_submit.c
drivers/gpu/drm/xe/xe_migrate.c