From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/8] drm/i915: Show bounds of active request in the ring on GPU hang
Date: Tue, 04 Oct 2016 14:56:31 +0300 [thread overview]
Message-ID: <87d1jg49ao.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20161003125246.17686-6-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Include the position of the active request in the ring, and display that
> alongside the current RING registers (on a GPU hang).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 3 +++
> drivers/gpu/drm/i915/i915_gpu_error.c | 9 +++++++--
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 91ac283d733e..e48044b3a447 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -776,6 +776,9 @@ struct drm_i915_error_state {
> struct i915_address_space *vm;
> int num_requests;
>
> + /* position of active request inside the ring */
> + u32 rq_head, rq_post, rq_tail;
> +
> /* our own tracking of ring head and tail */
> u32 cpu_ring_head;
> u32 cpu_ring_tail;
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index 2bbab226a46c..8b85efbdfa04 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -262,8 +262,9 @@ static void error_print_engine(struct drm_i915_error_state_buf *m,
> {
> err_printf(m, "%s command stream:\n", engine_str(ee->engine_id));
> err_printf(m, " START: 0x%08x\n", ee->start);
> - err_printf(m, " HEAD: 0x%08x\n", ee->head);
> - err_printf(m, " TAIL: 0x%08x\n", ee->tail);
> + err_printf(m, " HEAD: 0x%08x\n [0x%08x]", ee->head, ee->rq_head);
> + err_printf(m, " TAIL: 0x%08x [0x%08x, 0x%08x]\n",
> + ee->tail, ee->rq_post, ee->rq_tail);
> err_printf(m, " CTL: 0x%08x\n", ee->ctl);
> err_printf(m, " MODE: 0x%08x\n", ee->mode);
> err_printf(m, " HWS: 0x%08x\n", ee->hws);
> @@ -1230,6 +1231,10 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
> error->simulated |=
> request->ctx->flags & CONTEXT_NO_ERROR_CAPTURE;
>
> + ee->rq_head = request->head;
> + ee->rq_post = request->postfix;
> + ee->rq_tail = request->tail;
> +
> ring = request->ring;
> ee->cpu_ring_head = ring->head;
> ee->cpu_ring_tail = ring->tail;
> --
> 2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-10-04 11:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 12:52 [PATCH 1/8] drm/i915: Share the computation of ring size for RING_CTL register Chris Wilson
2016-10-03 12:52 ` [PATCH 2/8] drm/i915/execlists: Reinitialise context image after GPU hang Chris Wilson
2016-10-03 12:52 ` [PATCH 3/8] drm/i915/execlists: Move clearing submission count from reset to init Chris Wilson
2016-10-03 13:07 ` Mika Kuoppala
2016-10-03 12:52 ` [PATCH 4/8] drm/i915: Disable irqs across GPU reset Chris Wilson
2016-10-03 13:09 ` Mika Kuoppala
2016-10-03 12:52 ` [PATCH 5/8] drm/i915: Double check hangcheck.seqno after reset Chris Wilson
2016-10-03 13:14 ` Mika Kuoppala
2016-10-03 14:01 ` Chris Wilson
2016-10-03 12:52 ` [PATCH 6/8] drm/i915: Show bounds of active request in the ring on GPU hang Chris Wilson
2016-10-04 11:56 ` Mika Kuoppala [this message]
2016-10-03 12:52 ` [PATCH 7/8] drm/i915: Show RING registers through debugfs Chris Wilson
2016-10-04 12:35 ` Mika Kuoppala
2016-10-04 13:11 ` Chris Wilson
2016-10-03 12:52 ` [PATCH 8/8] drm/i915: Show waiters in i915_hangcheck_info Chris Wilson
2016-10-04 12:41 ` Mika Kuoppala
2016-10-04 13:07 ` Chris Wilson
2016-10-04 13:22 ` Mika Kuoppala
2016-10-03 13:00 ` [PATCH 1/8] drm/i915: Share the computation of ring size for RING_CTL register Chris Wilson
2016-10-04 12:51 ` Mika Kuoppala
2016-10-03 13:01 ` Mika Kuoppala
2016-10-03 14:49 ` ✗ Fi.CI.BAT: warning for series starting with [1/8] " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1jg49ao.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox