public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Click the ACTHD three times to go home
Date: Mon, 27 Mar 2017 22:05:35 +0300	[thread overview]
Message-ID: <87a8868rr4.fsf@intel.com> (raw)
In-Reply-To: <20170325101243.23121-1-chris@chris-wilson.co.uk>

On Sat, 25 Mar 2017, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> One POSTING_READ of ACTHD may not be enough to ensure that the seqno
> write has been posted from the GPU and is now visible. So do three!
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=97557
> References: https://bugs.freedesktop.org/show_bug.cgi?id=100007
> References: https://bugs.freedesktop.org/show_bug.cgi?id=100052
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index ab5e2e0623b7..2b5cd6039a6e 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -766,6 +766,7 @@ static void
>  gen6_seqno_barrier(struct intel_engine_cs *engine)
>  {
>  	struct drm_i915_private *dev_priv = engine->i915;
> +	int loop;
>  
>  	/* Workaround to force correct ordering between irq and seqno writes on
>  	 * ivb (and maybe also on snb) by reading from a CS register (like
> @@ -783,7 +784,8 @@ gen6_seqno_barrier(struct intel_engine_cs *engine)
>  	 * take the spinlock to guard against concurrent cacheline access.
>  	 */
>  	spin_lock_irq(&dev_priv->uncore.lock);
> -	POSTING_READ_FW(RING_ACTHD(engine->mmio_base));

This definitely needs the /* We do this three times for luck */ comment
from intel_display.c!

BR,
Jani.

> +	for (loop = 0; loop < 3; loop++)
> +		POSTING_READ_FW(RING_ACTHD(engine->mmio_base));
>  	spin_unlock_irq(&dev_priv->uncore.lock);
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2017-03-27 19:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25 10:12 [PATCH] drm/i915: Click the ACTHD three times to go home Chris Wilson
2017-03-25 10:29 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-27 10:12 ` [PATCH] " Mika Kuoppala
2017-03-27 10:16   ` Chris Wilson
2017-03-27 13:19     ` Mika Kuoppala
2017-03-27 13:30       ` Chris Wilson
2017-03-27 14:00         ` Mika Kuoppala
2017-03-27 14:25           ` Chris Wilson
2017-03-27 15:02         ` Chris Wilson
2017-03-27 19:05 ` Jani Nikula [this message]

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=87a8868rr4.fsf@intel.com \
    --to=jani.nikula@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