From: Varun Gupta <varun.gupta@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.brost@intel.com, thomas.hellstrom@linux.intel.com,
himal.prasad.ghimiray@intel.com
Subject: [PATCH 3/3] drm/xe/guc: Rewind the LRC ring head when replaying a ULLS job
Date: Wed, 30 Sep 2026 15:10:35 +0530 [thread overview]
Message-ID: <20260930094031.3365707-8-varun.gupta@intel.com> (raw)
In-Reply-To: <20260930094031.3365707-5-varun.gupta@intel.com>
On GT reset replay, guc_exec_queue_start() rewinds the software ring
tail to the first unsignalled job's head and sets the LRC tail to the
LRC head. This assumes the saved head has not passed an unstarted job,
which holds for ordinary submission as the CS cannot run past a job it
has not executed.
A ULLS job's slot is covered by a tail its predecessor published from
within the ring, so the CS can consume the slot and idle without the
job having run, leaving the saved head past it. On replay the job is
re-emitted behind the head, the context restarts with head == tail and
the job never starts.
Rewind the LRC head to the job's head as well when the first pending
job is a ULLS job, so the re-emitted job is ahead of it. Non-ULLS
replay is unchanged.
Fixes: 40c756bdbbee ("drm/xe: Add ULLS migration job support to GuC submission")
Cc: Matthew Brost <matthew.brost@intel.com>
Assisted-by: LLM
Signed-off-by: Varun Gupta <varun.gupta@intel.com>
---
drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 1d98ec67c5c6..0b231228bde8 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -3058,6 +3058,15 @@ static void guc_exec_queue_start(struct xe_exec_queue *q)
* increasing as jobs are written out.
*/
q->lrc[i]->ring.tail = job->ptrs[i].head;
+ /*
+ * A ULLS job's slot can have been consumed by
+ * the CS without the job running, leaving the
+ * saved head past it. Rewind so the re-emitted
+ * job is ahead of the head, not behind it.
+ */
+ if (xe_sched_job_is_ulls(job))
+ xe_lrc_set_ring_head(q->lrc[i],
+ job->ptrs[i].head);
xe_lrc_set_ring_tail(q->lrc[i],
xe_lrc_ring_head(q->lrc[i]));
}
--
2.43.0
next prev parent reply other threads:[~2026-09-30 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 9:40 [PATCH 0/3] drm/xe: Fix ULLS chained job loss and GT reset replay Varun Gupta
2026-09-30 9:40 ` [PATCH 1/3] drm/xe: Park on the ULLS semaphore before publishing the next job's tail Varun Gupta
2026-09-30 9:40 ` [PATCH 2/3] drm/xe/guc: Publish the ring tail when replaying a chained ULLS job Varun Gupta
2026-09-30 9:40 ` Varun Gupta [this message]
2026-09-30 9:48 ` ✓ CI.KUnit: success for drm/xe: Fix ULLS chained job loss and GT reset replay Patchwork
2026-09-30 11:03 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-30 14:16 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-30 17:24 ` [PATCH 0/3] " Matthew Brost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930094031.3365707-8-varun.gupta@intel.com \
--to=varun.gupta@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox