From 26bc0e54a4ca9dc90a129c6748ade163f46532c9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 5 Jun 2013 10:02:21 +0100 Subject: [PATCH 1/2] drm/i915: Reset hangcheck score if we succesfully kick a ring Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_irq.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 63996aa..e936fde 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2434,16 +2434,19 @@ void i915_hangcheck_elapsed(unsigned long data) ring->hangcheck.score = 0; } else { busy_count++; + err = false; if (ring->hangcheck.seqno == seqno) { - ring->hangcheck.score++; - - /* Kick ring if stuck*/ + /* Kick ring if stuck */ + err = true; if (stuck[i]) - i915_hangcheck_ring_hung(ring); - } else { - ring->hangcheck.score = 0; + err = !i915_hangcheck_ring_hung(ring); } + + if (err) + ring->hangcheck.score++; + else + ring->hangcheck.score = 0; } ring->hangcheck.seqno = seqno; -- 1.7.10.4