Skip to content

Commit 512eadb

Browse files
NitinGoteAndi Shyti
authored andcommitted
drm/i915/gt: Increase a time to retry RING_HEAD reset
Issue seen again where engine resets fails because the engine resumes from an incorrect RING_HEAD. HEAD is still not 0 even after writing into it. This seems to be timing issue and we experimented different values from 5ms to 50ms and found out that 50ms works best based on testing. So, if write doesn't succeed at first then retry again. v2: add a comment (Andi Shyti) Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12806 Signed-off-by: Nitin Gote <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f373ebe commit 512eadb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,13 @@ static int xcs_resume(struct intel_engine_cs *engine)
230230

231231
set_pp_dir(engine);
232232

233-
/* First wake the ring up to an empty/idle ring */
234-
for ((kt) = ktime_get() + (2 * NSEC_PER_MSEC);
233+
/*
234+
* First wake the ring up to an empty/idle ring.
235+
* Use 50ms of delay to let the engine write successfully
236+
* for all platforms. Experimented with different values and
237+
* determined that 50ms works best based on testing.
238+
*/
239+
for ((kt) = ktime_get() + (50 * NSEC_PER_MSEC);
235240
ktime_before(ktime_get(), (kt)); cpu_relax()) {
236241
/*
237242
* In case of resets fails because engine resumes from

0 commit comments

Comments
 (0)