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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux