diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 15 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.h | 2 |
3 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 0c945e91d542..7c478e6cedae 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c | |||
@@ -229,6 +229,8 @@ static const char *hangcheck_action_to_str(enum intel_ring_hangcheck_action a) | |||
229 | return "wait"; | 229 | return "wait"; |
230 | case HANGCHECK_ACTIVE: | 230 | case HANGCHECK_ACTIVE: |
231 | return "active"; | 231 | return "active"; |
232 | case HANGCHECK_ACTIVE_LOOP: | ||
233 | return "active (loop)"; | ||
232 | case HANGCHECK_KICK: | 234 | case HANGCHECK_KICK: |
233 | return "kick"; | 235 | return "kick"; |
234 | case HANGCHECK_HUNG: | 236 | case HANGCHECK_HUNG: |
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; |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index ed5941078f92..70525d0c2c74 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h | |||
@@ -70,6 +70,7 @@ enum intel_ring_hangcheck_action { | |||
70 | HANGCHECK_IDLE = 0, | 70 | HANGCHECK_IDLE = 0, |
71 | HANGCHECK_WAIT, | 71 | HANGCHECK_WAIT, |
72 | HANGCHECK_ACTIVE, | 72 | HANGCHECK_ACTIVE, |
73 | HANGCHECK_ACTIVE_LOOP, | ||
73 | HANGCHECK_KICK, | 74 | HANGCHECK_KICK, |
74 | HANGCHECK_HUNG, | 75 | HANGCHECK_HUNG, |
75 | }; | 76 | }; |
@@ -78,6 +79,7 @@ enum intel_ring_hangcheck_action { | |||
78 | 79 | ||
79 | struct intel_ring_hangcheck { | 80 | struct intel_ring_hangcheck { |
80 | u64 acthd; | 81 | u64 acthd; |
82 | u64 max_acthd; | ||
81 | u32 seqno; | 83 | u32 seqno; |
82 | int score; | 84 | int score; |
83 | enum intel_ring_hangcheck_action action; | 85 | enum intel_ring_hangcheck_action action; |