[PATCH] drm/i915/execlists: Add interrupt-pending check to intel_execlists_idle()

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

 



Primarily this serves as a sanity check that the bit has been cleared
before we suspend (and hasn't reappeared after resume).

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
Cc: Tvrtko Ursulin <tursulin@xxxxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_lrc.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 753458452997..44a92ea464ba 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -508,9 +508,15 @@ bool intel_execlists_idle(struct drm_i915_private *dev_priv)
 	if (!i915.enable_execlists)
 		return true;
 
-	for_each_engine(engine, dev_priv, id)
+	for_each_engine(engine, dev_priv, id) {
+		/* Interrupt/tasklet pending? */
+		if (test_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted))
+			return false;
+
+		/* Both ports drained, no more ELSP submission? */
 		if (!execlists_elsp_idle(engine))
 			return false;
+	}
 
 	return true;
 }
-- 
2.11.0

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux