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)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 15 Jan 2024 14:36:50 +0000 (15:36 +0100)
commit19c02225242498eea9267d444ee1276016368d49
tree22eff007eeb6d24f3e0dbfae6302e3b9b206e75c
parentfef257eb6dcb9f39baee9ac44f064cd796ecfd0b
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>
(cherry picked from commit a8004af338f6b3319476ecbed63ea49bf393fc1f)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.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