All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/bdw: The TLB invalidation mechanism has been removed from INSTPM
Date: Thu, 13 Mar 2014 03:52:54 +0100	[thread overview]
Message-ID: <20140313025254.GO30571@phenom.ffwll.local> (raw)
In-Reply-To: <20140313022145.GA5634@intel.com>

On Wed, Mar 12, 2014 at 07:21:45PM -0700, Ben Widawsky wrote:
> On Thu, Mar 13, 2014 at 01:40:28AM +0000, Damien Lespiau wrote:
> > While wandering in the spec, I noticed that BDW removes those 2 bits
> > from INSTPM. I couldn't find any direct way to invalidate the TLB (ie
> > without the ring working already). Maybe someone will be more lucky.
> > 
> > At least, we now know we may be a problem.
> > 
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > index c50388a..4eb3e06 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > @@ -981,8 +981,14 @@ void intel_ring_setup_status_page(struct intel_ring_buffer *ring)
> >  	I915_WRITE(mmio, (u32)ring->status_page.gfx_addr);
> >  	POSTING_READ(mmio);
> >  
> > -	/* Flush the TLB for this page */
> > -	if (INTEL_INFO(dev)->gen >= 6) {
> > +	/*
> > +	 * Flush the TLB for this page
> > +	 *
> > +	 * FIXME: These two bits have disappeared on gen8, so a question
> > +	 * arises: do we still need this and if so how should we go about
> > +	 * invalidating the TLB?
> > +	 */
> > +	if (INTEL_INFO(dev)->gen >= 6 && INTEL_INFO(dev)->gen < 8) {
> >  		u32 reg = RING_INSTPM(ring->mmio_base);
> >  
> >  		/* ring should be idle before issuing a sync flush*/
> 
> I'm missing something on the original patch,
> 884020bf3d2a3787a1cc6df902e98e0eec60330b. How were we emitting
> breadcrumbs without flushing the TLB? All bathcbuffers should be
> bookended by a TLB invalidate already, so I'm not sure the logic holds.
> Chris could explain that one a bit further?
> 
> The only reason I bring this up is I'd like to rip this out completely
> and have Thiago retest, or at least change the comment/commit message to
> be to reflect whatever light Chris sheds on the matter.
> 
> Anyway, the bits are definitely gone, and I also can't find a non-ring
> based replacement.
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-03-13  2:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  1:40 [PATCH] drm/i915/bdw: The TLB invalidation mechanism has been removed from INSTPM Damien Lespiau
2014-03-13  2:21 ` Ben Widawsky
2014-03-13  2:52   ` Daniel Vetter [this message]
2014-03-13  7:51   ` Chris Wilson
2014-03-13 15:19     ` Ben Widawsky
2014-03-13 15:23       ` Chris Wilson

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=20140313025254.GO30571@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=benjamin.widawsky@intel.com \
    --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.