[Intel-gfx] [PATCH 23/70] drm/i915: Record ring->start address in error state
Daniel Vetter
daniel at ffwll.ch
Wed Apr 8 04:47:25 PDT 2015
On Tue, Apr 07, 2015 at 04:20:47PM +0100, Chris Wilson wrote:
> 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 at chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_gpu_error.c | 10 ++++++----
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 8bb7e66dd4cd..d69ccd16cd60 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -471,6 +471,7 @@ struct drm_i915_error_state {
> u32 semaphore_seqno[I915_NUM_RINGS - 1];
>
> /* Register state */
> + u32 start;
> u32 tail;
> u32 head;
> u32 ctl;
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index 5f798961266f..17dc2fcaba10 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -256,10 +256,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);
> @@ -890,6 +891,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);
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list