From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Be paranoid and post the writes to stop the rings
Date: Wed, 07 Feb 2018 16:27:17 +0200 [thread overview]
Message-ID: <87r2pwub7e.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20180207100845.9696-2-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Although the mmio are uncached and so should be flushed on every write,
> be paranoid and do a mmio read after setting the ring head/tail to be
> sure they have taken effect before moving on.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 164dbb8cfa36..612aad205b59 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -1522,9 +1522,11 @@ static void gen3_stop_engine(struct intel_engine_cs *engine)
> engine->name);
>
> I915_WRITE_FW(RING_HEAD(base), I915_READ_FW(RING_TAIL(base)));
> + POSTING_READ_FW(RING_HEAD(base)); /* paranoia */
>
> I915_WRITE_FW(RING_HEAD(base), 0);
> I915_WRITE_FW(RING_TAIL(base), 0);
> + POSTING_READ_FW(RING_HEAD(base));
Is there a benefit on doing it on head? Both
should be flushed but tail would be more eye pleasing.
-Mika
>
> /* The ring must be empty before it is disabled */
> I915_WRITE_FW(RING_CTL(base), 0);
> --
> 2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-07 14:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 10:08 gen3 reset paranoia Chris Wilson
2018-02-07 10:08 ` [PATCH 1/2] drm/i915: Be paranoid and post the writes to stop the rings Chris Wilson
2018-02-07 14:27 ` Mika Kuoppala [this message]
2018-02-08 7:28 ` [PATCH v2] " Chris Wilson
2018-02-08 11:39 ` Mika Kuoppala
2018-02-07 10:08 ` [PATCH 2/2] drm/i915: Wait for gen3 reset status to be asserted Chris Wilson
2018-02-07 14:41 ` Ville Syrjälä
2018-02-07 14:44 ` Ville Syrjälä
2018-02-07 21:12 ` Chris Wilson
2018-02-07 22:27 ` Chris Wilson
2018-02-07 21:11 ` [PATCH] " Chris Wilson
2018-02-07 22:28 ` [PATCH v2] " Chris Wilson
2018-02-08 11:43 ` Mika Kuoppala
2018-02-08 11:55 ` Chris Wilson
2018-02-08 12:34 ` Mika Kuoppala
2018-02-08 13:45 ` Chris Wilson
2018-02-08 13:46 ` Chris Wilson
2018-02-07 10:38 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Be paranoid and post the writes to stop the rings Patchwork
2018-02-07 12:50 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-02-07 22:24 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Be paranoid and post the writes to stop the rings (rev2) Patchwork
2018-02-07 23:46 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Be paranoid and post the writes to stop the rings (rev3) Patchwork
2018-02-08 6:30 ` ✓ Fi.CI.IGT: " Patchwork
2018-02-08 7:46 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Be paranoid and post the writes to stop the rings (rev4) Patchwork
2018-02-08 10:55 ` ✗ Fi.CI.IGT: failure " 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=87r2pwub7e.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