Skip to contentSkip to conversation

drm/i915: handle faked missed interrupts as simulated hangs, too

PATCH In review Daniel Vetter 2 participants 2 messages Oct 28, 2013 – Oct 30, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: handle faked missed interrupts as simulated hangs, too

Otherwise QA will report this as a real hang when running igt ZZ_missed_irq.

v2: Actually test the right stuff and really shut up the DRM_ERROR output ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70747

---
 drivers/gpu/drm/i915/i915_irq.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +6 -2
index 1a7dc7754e2f..68936da7c25d 100644
@@ -2258,8 +2258,12 @@ static void i915_hangcheck_elapsed(unsigned long data)
 				if (waitqueue_active(&ring->irq_queue)) {
 					/* Issue a wake-up to catch stuck h/w. */
 					if (!test_and_set_bit(ring->id, &dev_priv->gpu_error.missed_irq_rings)) {
-						DRM_ERROR("Hangcheck timer elapsed... %s idle\n",
-							  ring->name);
+						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);
 					}
 					/* Safeguard against driver failure */
Signature · 1 line
1.8.4.rc3
#1 lore raw
Quoted 9 lines · Daniel Vetter

Otherwise QA will report this as a real hang when running igt ZZ_missed_irq.

v2: Actually test the right stuff and really shut up the DRM_ERROR output ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70747

Merged with Chris' irc-ack.
-Daniel

Quoted 26 lines
---
 drivers/gpu/drm/i915/i915_irq.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +6 -2
index 1a7dc7754e2f..68936da7c25d 100644
@@ -2258,8 +2258,12 @@ static void i915_hangcheck_elapsed(unsigned long data)
 				if (waitqueue_active(&ring->irq_queue)) {
 					/* Issue a wake-up to catch stuck h/w. */
 					if (!test_and_set_bit(ring->id, &dev_priv->gpu_error.missed_irq_rings)) {
-						DRM_ERROR("Hangcheck timer elapsed... %s idle\n",
-							  ring->name);
+						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);
 					}
 					/* Safeguard against driver failure */
Signature · 1 line
1.8.4.rc3
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch