diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-27 15:36:41 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-27 18:31:09 -0400 |
commit | f406839f094ef24bb201c9574fdb9ce8e799a975 (patch) | |
tree | 88d6e38c2f2e840d0c11c694460722f2daa0cae6 /drivers/gpu/drm/i915/i915_irq.c | |
parent | 71e9339c3389de6a685ecb26261a81b8a583aa1c (diff) |
drm/i915: Capture ERROR register on Sandybridge hangs
This holds error state from the main graphics arbiter mainly involving
the DMA engine and address translation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 29cbcb33b92c..2a29497a4694 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -592,13 +592,11 @@ static void i915_capture_error_state(struct drm_device *dev) | |||
592 | error->pipeastat = I915_READ(PIPEASTAT); | 592 | error->pipeastat = I915_READ(PIPEASTAT); |
593 | error->pipebstat = I915_READ(PIPEBSTAT); | 593 | error->pipebstat = I915_READ(PIPEBSTAT); |
594 | error->instpm = I915_READ(INSTPM); | 594 | error->instpm = I915_READ(INSTPM); |
595 | if (INTEL_INFO(dev)->gen < 4) { | 595 | error->error = 0; |
596 | error->ipeir = I915_READ(IPEIR); | 596 | if (INTEL_INFO(dev)->gen >= 6) { |
597 | error->ipehr = I915_READ(IPEHR); | 597 | error->error = I915_READ(ERROR_GEN6); |
598 | error->instdone = I915_READ(INSTDONE); | 598 | } |
599 | error->acthd = I915_READ(ACTHD); | 599 | if (INTEL_INFO(dev)->gen >= 4) { |
600 | error->bbaddr = 0; | ||
601 | } else { | ||
602 | error->ipeir = I915_READ(IPEIR_I965); | 600 | error->ipeir = I915_READ(IPEIR_I965); |
603 | error->ipehr = I915_READ(IPEHR_I965); | 601 | error->ipehr = I915_READ(IPEHR_I965); |
604 | error->instdone = I915_READ(INSTDONE_I965); | 602 | error->instdone = I915_READ(INSTDONE_I965); |
@@ -606,6 +604,12 @@ static void i915_capture_error_state(struct drm_device *dev) | |||
606 | error->instdone1 = I915_READ(INSTDONE1); | 604 | error->instdone1 = I915_READ(INSTDONE1); |
607 | error->acthd = I915_READ(ACTHD_I965); | 605 | error->acthd = I915_READ(ACTHD_I965); |
608 | error->bbaddr = I915_READ64(BB_ADDR); | 606 | error->bbaddr = I915_READ64(BB_ADDR); |
607 | } else { | ||
608 | error->ipeir = I915_READ(IPEIR); | ||
609 | error->ipehr = I915_READ(IPEHR); | ||
610 | error->instdone = I915_READ(INSTDONE); | ||
611 | error->acthd = I915_READ(ACTHD); | ||
612 | error->bbaddr = 0; | ||
609 | } | 613 | } |
610 | 614 | ||
611 | bbaddr = i915_ringbuffer_last_batch(dev); | 615 | bbaddr = i915_ringbuffer_last_batch(dev); |