All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/gt: Only print an error if the resume fails after the reset
@ 2021-01-21 22:39 Chris Wilson
  2021-01-22  4:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2021-01-21 22:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson

If we fail to stop the ring before the reset, we try the reset anyway.
Then we only report a failure if the engine fails to resume after the
reset, therefore we don't need to print a premature error message during
the prepare.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_ring_submission.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
index e4db4318f634..2d497ecdd433 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
@@ -333,8 +333,8 @@ static void reset_prepare(struct intel_engine_cs *engine)
 	ENGINE_TRACE(engine, "\n");
 	intel_engine_stop_cs(engine);
 
-	if (!stop_ring(engine)) {
-		/* G45 ring initialization often fails to reset head to zero */
+	/* G45 ring initialization often fails to reset head to zero */
+	if (!stop_ring(engine) && !stop_ring(engine))
 		ENGINE_TRACE(engine,
 			     "HEAD not reset to zero, "
 			     "{ CTL:%08x, HEAD:%08x, TAIL:%08x, START:%08x }\n",
@@ -342,17 +342,6 @@ static void reset_prepare(struct intel_engine_cs *engine)
 			     ENGINE_READ_FW(engine, RING_HEAD),
 			     ENGINE_READ_FW(engine, RING_TAIL),
 			     ENGINE_READ_FW(engine, RING_START));
-		if (!stop_ring(engine)) {
-			drm_err(&engine->i915->drm,
-				"failed to set %s head to zero "
-				"ctl %08x head %08x tail %08x start %08x\n",
-				engine->name,
-				ENGINE_READ_FW(engine, RING_CTL),
-				ENGINE_READ_FW(engine, RING_HEAD),
-				ENGINE_READ_FW(engine, RING_TAIL),
-				ENGINE_READ_FW(engine, RING_START));
-		}
-	}
 }
 
 static void reset_rewind(struct intel_engine_cs *engine, bool stalled)
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-22 11:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 22:39 [Intel-gfx] [PATCH] drm/i915/gt: Only print an error if the resume fails after the reset Chris Wilson
2021-01-22  4:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-22  8:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-01-22 11:17 ` [Intel-gfx] [PATCH] " Mika Kuoppala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.