We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 795dbde commit ce7743bCopy full SHA for ce7743b
drivers/gpu/drm/i915/gt/intel_ring_submission.c
@@ -365,7 +365,13 @@ static void reset_prepare(struct intel_engine_cs *engine)
365
ENGINE_READ_FW(engine, RING_HEAD),
366
ENGINE_READ_FW(engine, RING_TAIL),
367
ENGINE_READ_FW(engine, RING_START));
368
- if (!stop_ring(engine)) {
+ /*
369
+ * Sometimes engine head failed to set to zero even after writing into it.
370
+ * Use wait_for_atomic() with 20ms delay to let engine resumes from
371
+ * correct RING_HEAD. Experimented different values and determined
372
+ * that 20ms works best based on testing.
373
+ */
374
+ if (wait_for_atomic((!stop_ring(engine) == 0), 20)) {
375
drm_err(&engine->i915->drm,
376
"failed to set %s head to zero "
377
"ctl %08x head %08x tail %08x start %08x\n",
0 commit comments