Skip to content

Commit 235f90f

Browse files
icklejackpot51
authored andcommitted
drm/i915/gt: Delay execlist processing for tgl
When running gem_exec_nop, it floods the system with many requests (with the goal of userspace submitting faster than the HW can process a single empty batch). This causes the driver to continually resubmit new requests onto the end of an active context, a flood of lite-restore preemptions. If we time this just right, Tigerlake hangs. Inserting a small delay between the processing of CS events and submitting the next context, prevents the hang. Naturally it does not occur with debugging enabled. The suspicion then is that this is related to the issues with the CS event buffer, and inserting an mmio read of the CS pointer status appears to be very successful in preventing the hang. Other registers, or uncached reads, or plain mb, do not prevent the hang, suggesting that register is key -- but that the hang can be prevented by a simple udelay, suggests it is just a timing issue like that encountered by commit 233c1ae ("drm/i915/gt: Wait for CSB entries on Tigerlake"). Also note that the hang is not prevented by applying CTX_DESC_FORCE_RESTORE, or by inserting a delay on the GPU between requests. Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Bruce Chang <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: [email protected] Acked-by: Mika Kuoppala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 6ca7217) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 29edf96 commit 235f90f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/i915/gt/intel_lrc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,6 +2645,9 @@ static void process_csb(struct intel_engine_cs *engine)
26452645
smp_wmb(); /* complete the seqlock */
26462646
WRITE_ONCE(execlists->active, execlists->inflight);
26472647

2648+
/* XXX Magic delay for tgl */
2649+
ENGINE_POSTING_READ(engine, RING_CONTEXT_STATUS_PTR);
2650+
26482651
WRITE_ONCE(execlists->pending[0], NULL);
26492652
} else {
26502653
GEM_BUG_ON(!*execlists->active);

0 commit comments

Comments
 (0)