[Intel-gfx] [RFC PATCH 2/2] drm/i915: Fix panic if nothing to promote after preempt on reset

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Tue Aug 6 12:24:58 UTC 2019


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 at linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++
 1 file changed, 3 insertions(+)

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);
-- 
2.21.0



More information about the Intel-gfx mailing list