public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Include RING_MODE when dumping the engine state
Date: Thu, 26 Oct 2017 16:49:43 +0300	[thread overview]
Message-ID: <87she6f288.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20171026115048.20144-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Knowing the RING_MODE flags is useful for checking the state of the
> engine, such as whether the CS is idle after trying to stop the engines
> before reset.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index fedb839dff61..e676e345c453 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -1726,6 +1726,11 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
>  	drm_printf(m, "\tRING_CTL:   0x%08x [%s]\n",
>  		   I915_READ(RING_CTL(engine->mmio_base)),
>  		   I915_READ(RING_CTL(engine->mmio_base)) & (RING_WAIT | RING_WAIT_SEMAPHORE) ? "waiting" : "");
> +	if (INTEL_GEN(engine->i915) > 2) {
> +		drm_printf(m, "\tRING_MODE:  0x%08x [%s]\n",
> +			   I915_READ(RING_MI_MODE(engine->mmio_base)),
> +			   I915_READ(RING_MI_MODE(engine->mmio_base)) & (MODE_IDLE) ? "idle" : "");

or use "[idle]" and just %s in printf.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-10-26 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 11:50 [PATCH] drm/i915: Include RING_MODE when dumping the engine state Chris Wilson
2017-10-26 12:14 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-26 13:49 ` Mika Kuoppala [this message]
2017-10-26 21:38   ` [PATCH] " Chris Wilson
2017-10-26 14:53 ` ✓ Fi.CI.IGT: success for " 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=87she6f288.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