diff mbox series

[RFC,2/2] drm/i915: Fix panic if nothing to promote after preempt on reset

Message ID 20190806122458.15237-3-janusz.krzysztofik@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix panic if nothing to promote after preempt on reset | expand

Commit Message

Janusz Krzysztofik Aug. 6, 2019, 12:24 p.m. UTC
Execlists state machine always falls through from PREEMPT to PROMOTE,
expecting pending to be valid.  Apparently it not always happens to be
the case, at least during reset.  Assuming this unexpected behavior
depends on hardware, fix the issue by introducing a conditional break.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Chris Wilson Aug. 6, 2019, 12:28 p.m. UTC | #1
Quoting Janusz Krzysztofik (2019-08-06 13:24:58)
> Execlists state machine always falls through from PREEMPT to PROMOTE,
> expecting pending to be valid.  Apparently it not always happens to be
> the case, at least during reset.  Assuming this unexpected behavior
> depends on hardware, fix the issue by introducing a conditional break.

Nak. Find the reason why the HW is not behaving as is specified.
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index aa138aaf8743..1bba13ee1023 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1408,6 +1408,9 @@  static void process_csb(struct intel_engine_cs *engine)
 			while (*execlists->active)
 				execlists_schedule_out(*execlists->active++);
 
+			if (reset_in_progress(execlists) &&
+			    !assert_pending_valid(execlists, "reset"))
+				break;
 			/* fallthrough */
 		case CSB_PROMOTE: /* switch pending to inflight */
 			GEM_BUG_ON(*execlists->active);