[Intel-gfx] [RFC 03/37] drm/i915: hangcheck=idle should wake_up_all every time, not just once

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Mon Nov 23 03:41:38 PST 2015


From: Dave Gordon <david.s.gordon at intel.com>

For: VIZ-2021
Signed-off-by: Dave Gordon <david.s.gordon at intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d280e05..eb55a41 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2973,23 +2973,24 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
 
 		if (ring->hangcheck.seqno == seqno) {
 			if (ring_idle(ring, seqno)) {
+				busy = false;
 				ring->hangcheck.action = HANGCHECK_IDLE;
 
 				if (waitqueue_active(&ring->irq_queue)) {
+					if (!(dev_priv->gpu_error.test_irq_rings & intel_ring_flag(ring)))
+						DRM_ERROR("Hangcheck timer elapsed... %s idle\n",
+							  ring->name);
+					else
+						DRM_INFO("Fake missed irq on %s\n",
+							 ring->name);
+
 					/* Issue a wake-up to catch stuck h/w. */
-					if (!test_and_set_bit(ring->id, &dev_priv->gpu_error.missed_irq_rings)) {
-						if (!(dev_priv->gpu_error.test_irq_rings & intel_ring_flag(ring)))
-							DRM_ERROR("Hangcheck timer elapsed... %s idle\n",
-								  ring->name);
-						else
-							DRM_INFO("Fake missed irq on %s\n",
-								 ring->name);
-						wake_up_all(&ring->irq_queue);
-					}
+					set_bit(ring->id, &dev_priv->gpu_error.missed_irq_rings);
+					wake_up_all(&ring->irq_queue);
 					/* Safeguard against driver failure */
 					ring->hangcheck.score += BUSY;
-				} else
-					busy = false;
+					busy = true;
+				}
 			} else {
 				/* We always increment the hangcheck score
 				 * if the ring is busy and still processing
-- 
1.9.1



More information about the Intel-gfx mailing list