mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
drm/xe/guc: Rewind the LRC ring head when replaying a ULLS job
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: 40c756bdbb ("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>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260930094031.3365707-8-varun.gupta@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
db4b00bd95
commit
123c1f0430
|
|
@ -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]));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user