All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START
Date: Thu, 7 Aug 2014 19:05:49 +0300	[thread overview]
Message-ID: <20140807160548.GC4193@intel.com> (raw)
In-Reply-To: <1407422394-29792-1-git-send-email-chris@chris-wilson.co.uk>

On Thu, Aug 07, 2014 at 03:39:54PM +0100, Chris Wilson wrote:
> Ville found an old w/a documented for g4x that suggested that we need to
> reset the HEAD after writing START. This is a useful fixup for some of
> the g4x ring initialisation woes, but as usual, not all.
> 
> v2: Do the rewrite unconditionally anyway
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=76554
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>

Yeah looks sensible to me. So based on my gut feeling just from the
seeing the w/a name this is:

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 45e3ec927051..26ec25afc02a 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -537,6 +537,14 @@ static int init_ring_common(struct intel_engine_cs *ring)
>  	 * also enforces ordering), otherwise the hw might lose the new ring
>  	 * register values. */
>  	I915_WRITE_START(ring, i915_gem_obj_ggtt_offset(obj));
> +
> +	/* WaClearRingBufHeadRegAtInit:ctg,elk */
> +	if (I915_READ_HEAD(ring))
> +		DRM_DEBUG("%s initialization failed [head=%08x], fudging\n",
> +			  ring->name, I915_READ_HEAD(ring));
> +	I915_WRITE_HEAD(ring, 0);
> +	(void)I915_READ_HEAD(ring);
> +
>  	I915_WRITE_CTL(ring,
>  			((ringbuf->size - PAGE_SIZE) & RING_NR_PAGES)
>  			| RING_VALID);
> -- 
> 2.1.0.rc1

-- 
Ville Syrjälä
Intel OTC

      reply	other threads:[~2014-08-07 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 14:11 [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START Chris Wilson
2014-08-07 14:17 ` Chris Wilson
2014-08-07 14:26 ` Ville Syrjälä
2014-08-07 14:35   ` Chris Wilson
2014-08-07 14:39   ` Chris Wilson
2014-08-07 16:05     ` Ville Syrjälä [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=20140807160548.GC4193@intel.com \
    --to=ville.syrjala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.