aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-06-12 05:35:32 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-06-13 11:42:17 -0400
commitad8beaeada276b4b2d31e1c3422346e8829a67d6 (patch)
tree3ac202e31388858869190edc1f04ae8ae6359d00 /drivers/gpu/drm/i915/i915_irq.c
parent7d736f4f0b405b1421d280632ef077eb8135e5c6 (diff)
drm/i915: store ring hangcheck action
For guilty batchbuffer analysis later on when rings are reset, store what state the ring was on when hang was declared. This helps to weed out the waiting rings from the active ones. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Ben Widawsky <ben@bwidawsk.net> 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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index b26243f09c91..208e6753aec5 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2380,7 +2380,8 @@ static void semaphore_clear_deadlocks(struct drm_i915_private *dev_priv)
2380 ring->hangcheck.deadlock = false; 2380 ring->hangcheck.deadlock = false;
2381} 2381}
2382 2382
2383static enum { wait, active, kick, hung } ring_stuck(struct intel_ring_buffer *ring, u32 acthd) 2383static enum intel_ring_hangcheck_action
2384ring_stuck(struct intel_ring_buffer *ring, u32 acthd)
2384{ 2385{
2385 struct drm_device *dev = ring->dev; 2386 struct drm_device *dev = ring->dev;
2386 struct drm_i915_private *dev_priv = dev->dev_private; 2387 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -2483,7 +2484,10 @@ void i915_hangcheck_elapsed(unsigned long data)
2483 * being repeatedly kicked and so responsible 2484 * being repeatedly kicked and so responsible
2484 * for stalling the machine. 2485 * for stalling the machine.
2485 */ 2486 */
2486 switch (ring_stuck(ring, acthd)) { 2487 ring->hangcheck.action = ring_stuck(ring,
2488 acthd);
2489
2490 switch (ring->hangcheck.action) {
2487 case wait: 2491 case wait:
2488 score = 0; 2492 score = 0;
2489 break; 2493 break;