aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2014-08-05 10:16:26 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-07 08:04:07 -0400
commitf260fe7b2f8c32e2fb02a36d3b76ef64b61dbdc5 (patch)
tree3b8787a5114d5278165eb776ecbba229df7f0909 /drivers/gpu/drm/i915/i915_irq.c
parent02c9f7e3cfe76a7f54ef03438c36aade86cc1c8b (diff)
drm/i915: Don't accumulate hangcheck score on forward progress
If the actual head has progressed forward inside a batch (request), don't accumulate hangcheck score. As the hangcheck score in increased only by acthd jumping backwards, the result is that we only declare an active batch as stuck if it is trapped inside a loop. Or that the looping will dominate the batch progression so that it overcomes the bonus that forward progress gives. v2: Improved commit message (Chris Wilson) Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> [danvet: s/active_loop/active (loop)/ as requested by Chris.] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 6ef9d6fabf80..390ccc2a3096 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -3189,8 +3189,14 @@ ring_stuck(struct intel_engine_cs *ring, u64 acthd)
3189 struct drm_i915_private *dev_priv = dev->dev_private; 3189 struct drm_i915_private *dev_priv = dev->dev_private;
3190 u32 tmp; 3190 u32 tmp;
3191 3191
3192 if (ring->hangcheck.acthd != acthd) 3192 if (acthd != ring->hangcheck.acthd) {
3193 return HANGCHECK_ACTIVE; 3193 if (acthd > ring->hangcheck.max_acthd) {
3194 ring->hangcheck.max_acthd = acthd;
3195 return HANGCHECK_ACTIVE;
3196 }
3197
3198 return HANGCHECK_ACTIVE_LOOP;
3199 }
3194 3200
3195 if (IS_GEN2(dev)) 3201 if (IS_GEN2(dev))
3196 return HANGCHECK_HUNG; 3202 return HANGCHECK_HUNG;
@@ -3301,8 +3307,9 @@ static void i915_hangcheck_elapsed(unsigned long data)
3301 switch (ring->hangcheck.action) { 3307 switch (ring->hangcheck.action) {
3302 case HANGCHECK_IDLE: 3308 case HANGCHECK_IDLE:
3303 case HANGCHECK_WAIT: 3309 case HANGCHECK_WAIT:
3304 break;
3305 case HANGCHECK_ACTIVE: 3310 case HANGCHECK_ACTIVE:
3311 break;
3312 case HANGCHECK_ACTIVE_LOOP:
3306 ring->hangcheck.score += BUSY; 3313 ring->hangcheck.score += BUSY;
3307 break; 3314 break;
3308 case HANGCHECK_KICK: 3315 case HANGCHECK_KICK:
@@ -3322,6 +3329,8 @@ static void i915_hangcheck_elapsed(unsigned long data)
3322 */ 3329 */
3323 if (ring->hangcheck.score > 0) 3330 if (ring->hangcheck.score > 0)
3324 ring->hangcheck.score--; 3331 ring->hangcheck.score--;
3332
3333 ring->hangcheck.acthd = ring->hangcheck.max_acthd = 0;
3325 } 3334 }
3326 3335
3327 ring->hangcheck.seqno = seqno; 3336 ring->hangcheck.seqno = seqno;