[RFC PATCH 09/12] drm/xe: Enable IRQ job put in DRM dep

Matthew Brost
2026-03-16T04:33:16Z

Enable IRQ-context job puts in DRM dep now that all required support is
in place. Set this flag unconditionally on all drm_dep_queue instances
and update the kernel-doc for functions that can now be called from IRQ
context.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/xe/xe_exec_queue.c | 2 ++
drivers/gpu/drm/xe/xe_guc_submit.c | 3 ++-
drivers/gpu/drm/xe/xe_sched_job.c | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index b34af4594512..3aeba2fd7963 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -575,6 +575,8 @@ ALLOW_ERROR_INJECTION(xe_exec_queue_create_bind, ERRNO);
*
* Called when the last reference to the exec queue is dropped.
* Starts the cleanup process for an exec queue.
+ *
+ * Context: Any context.
*/
void xe_exec_queue_destroy(struct xe_exec_queue *q)
{
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index af54ac9d5607..064cf15166b9 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1935,7 +1935,8 @@ static int guc_exec_queue_init(struct xe_exec_queue *q)
struct xe_guc *guc = exec_queue_to_guc(q);
struct workqueue_struct *submit_wq = NULL;
struct xe_guc_exec_queue *ge;
- enum drm_dep_queue_flags flags = DRM_DEP_QUEUE_FLAGS_BYPASS_SUPPORTED;
+ enum drm_dep_queue_flags flags = DRM_DEP_QUEUE_FLAGS_BYPASS_SUPPORTED |
+ DRM_DEP_QUEUE_FLAGS_JOB_PUT_IRQ_SAFE;
long timeout;
int err, i;

diff --git a/drivers/gpu/drm/xe/xe_sched_job.c b/drivers/gpu/drm/xe/xe_sched_job.c
index d83f0f9ea4ab..e3f7251b35b5 100644
--- a/drivers/gpu/drm/xe/xe_sched_job.c
+++ b/drivers/gpu/drm/xe/xe_sched_job.c
@@ -175,6 +175,8 @@ struct xe_sched_job *xe_sched_job_create(struct xe_exec_queue *q,
*
* Called when ref == 0, drop a reference to job's xe_engine + fence, cleanup
* and free memory for Xe schedule job.
+ *
+ * Context: Any context.
*/
static void xe_sched_job_release(struct drm_dep_job *dep_job)
{
--
2.34.1