drm/i915: Record ring->start address in error state
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 7 Apr 2015 15:20:47 +0000 (16:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Apr 2015 06:56:07 +0000 (08:56 +0200)
This is mostly useful for execlists where the rings switch between
contexts (and so checking that the ring's start register matches the
context is important).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gpu_error.c

index 6e0a0ae34a3fee3a884cb61cf3fcabab76b17037..f4daa3d3c126b6fec712b438f8848b5485e185a4 100644 (file)
@@ -455,6 +455,7 @@ struct drm_i915_error_state {
                u32 semaphore_seqno[I915_NUM_RINGS - 1];
 
                /* Register state */
+               u32 start;
                u32 tail;
                u32 head;
                u32 ctl;
index 1d4e60df88836761098e8a2ce391382d2b7d867d..ac22614dbb0ee6969d2dd999eb185d3f21d94874 100644 (file)
@@ -251,10 +251,11 @@ static void i915_ring_error_state(struct drm_i915_error_state_buf *m,
                return;
 
        err_printf(m, "%s command stream:\n", ring_str(ring_idx));
-       err_printf(m, "  HEAD: 0x%08x\n", ring->head);
-       err_printf(m, "  TAIL: 0x%08x\n", ring->tail);
-       err_printf(m, "  CTL: 0x%08x\n", ring->ctl);
-       err_printf(m, "  HWS: 0x%08x\n", ring->hws);
+       err_printf(m, "  START: 0x%08x\n", ring->start);
+       err_printf(m, "  HEAD:  0x%08x\n", ring->head);
+       err_printf(m, "  TAIL:  0x%08x\n", ring->tail);
+       err_printf(m, "  CTL:   0x%08x\n", ring->ctl);
+       err_printf(m, "  HWS:   0x%08x\n", ring->hws);
        err_printf(m, "  ACTHD: 0x%08x %08x\n", (u32)(ring->acthd>>32), (u32)ring->acthd);
        err_printf(m, "  IPEIR: 0x%08x\n", ring->ipeir);
        err_printf(m, "  IPEHR: 0x%08x\n", ring->ipehr);
@@ -883,6 +884,7 @@ static void i915_record_ring_state(struct drm_device *dev,
        ering->instpm = I915_READ(RING_INSTPM(ring->mmio_base));
        ering->seqno = ring->get_seqno(ring, false);
        ering->acthd = intel_ring_get_active_head(ring);
+       ering->start = I915_READ_START(ring);
        ering->head = I915_READ_HEAD(ring);
        ering->tail = I915_READ_TAIL(ring);
        ering->ctl = I915_READ_CTL(ring);