[Intel-gfx] [PATCH 4/7] drm/i915: no hangcheck when reset is in progress

Mika Kuoppala mika.kuoppala at linux.intel.com
Wed Jul 3 16:22:09 CEST 2013


From: Mika Kuoppala <mika.kuoppala at linux.intel.com>

The timer for hangchecking can run again before the previous
reset it has triggered has been handled. This can corrupt
the hangcheck state as reset handling will access and write to
the hangcheck data. To prevent this, avoid running the hangcheck
logic while reset is in progress.

Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_irq.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index dc1b878..b0fec7f 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2447,6 +2447,9 @@ void i915_hangcheck_elapsed(unsigned long data)
 	if (!i915_enable_hangcheck)
 		return;
 
+	if (i915_reset_in_progress(&dev_priv->gpu_error))
+		return;
+
 	for_each_ring(ring, dev_priv, i) {
 		u32 seqno, acthd;
 		bool busy = true;
-- 
1.7.9.5




More information about the Intel-gfx mailing list