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.krzyszto...@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

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

Reply via email to