From db4b00bd956adbf61403babe5ccfa22c3b88e8c1 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Wed, 30 Sep 2026 15:10:34 +0530 Subject: [PATCH] drm/xe/guc: Publish the ring tail when replaying a chained ULLS job A chained ULLS job skips the ring tail write in submit_exec_queue() since its predecessor's postamble has already published it from within the ring. After a GT reset the context is re-registered with scheduling disabled and that postamble is gone, so nothing publishes the replayed job's tail: the context is enabled with head == tail and the job never starts. On the kernel migration queue the second timeout wedges the device. Publish the tail for a chained job when the queue is not enabled. This is the state in which submit_exec_queue() already sends the scheduling enable H2G instead of relying on a resident context, and the tail write precedes that H2G. guc_exec_queue_stop() clears ENABLED on reset and register_exec_queue() does not set it, so the first replayed ULLS job always takes this path; its re-emitted postamble then publishes the next tail as usual. With the queue enabled nothing changes. job->restore_replay does not identify this case, it is only set on the SR-IOV VF pause/unpause path. Fixes: 40c756bdbbee ("drm/xe: Add ULLS migration job support to GuC submission") Cc: Matthew Brost Assisted-by: LLM Signed-off-by: Varun Gupta Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patch.msgid.link/20260930094031.3365707-7-varun.gupta@intel.com Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index cd9bb9f9e28c..1d98ec67c5c6 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -1190,10 +1190,15 @@ static void submit_exec_queue(struct xe_exec_queue *q, struct xe_sched_job *job) xe_gt_assert(guc_to_gt(guc), exec_queue_registered(q)); if (!job->restore_replay || job->last_replay) { - /* A ULLS job past the first publishes its own ring tail */ + /* + * A chained ULLS job relies on its predecessor's postamble to + * publish its ring tail. After a reset the context comes back + * disabled with that postamble gone, so publish it here. + */ if (xe_exec_queue_is_parallel(q)) wq_item_append(q); - else if (!xe_sched_job_ulls_is_chained(job)) + else if (!xe_sched_job_ulls_is_chained(job) || + !exec_queue_enabled(q)) xe_lrc_set_ring_tail(lrc, lrc->ring.tail); job->last_replay = false; }