From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Ben Widawsky <benjamin.widawsky@intel.com>,
Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915/gen8: Invalidate TLBs before PDP reload
Date: Fri, 4 Jul 2014 09:55:08 -0700 [thread overview]
Message-ID: <20140704165507.GA5903@bwidawsk.net> (raw)
In-Reply-To: <20140704075159.GF23812@nuc-i3427.alporthouse.com>
On Fri, Jul 04, 2014 at 08:51:59AM +0100, Chris Wilson wrote:
> On Thu, Jul 03, 2014 at 03:01:49PM -0700, Ben Widawsky wrote:
> > This is a spec requirement for all rings.
> >
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > ---
> > drivers/gpu/drm/i915/i915_gem_context.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> > index 5b4a9a0..1ac648f 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> > @@ -870,6 +870,9 @@ int i915_switch_context(struct intel_engine_cs *ring,
> > if (from == to && !to->remap_slice)
> > return 0;
> >
> > + if (IS_GEN8(ring->dev))
> > + WARN_ON(ring->flush(ring, I915_GEM_GPU_DOMAINS, 0));
> > +
>
> That's intel_ring_invalidate_all_caches(). The only time we won't be
> doing this are the forced switches at startup/reset and close.
So there were three reasons for doing this.
1. AFAICT there were cases when we don't, which you seem to agree on.
2. I liked the explicit nature which /should/ have minimal impact given
that it's already done. It's future proof (to whatever extent such a
thing is possible). It's clear.
3. The worst of the reasons. On more than one occasion, I sent a trace
to certain people and they complained I was missing the TLB invalidate.
So I put it right there where nobody could miss it.
> Is the requirement before or after the SET_CONTEXT?
The requirement is before the PDP load. Which on GEN8 RCS means, before
MI_SET_CONTEXT. When we will RESTORE_INHIBIT, it must be before the
LRIs.
> What I would prefer doing
> is moving the invalidate-dispatch-flush-signal into one atomic operation
> (that would help simplify execlist as well) - would that be good enough
> here to be sure that an invalidate is performed after the context
> switch and before the next batch?
> -Chris
>
As long as the ordering is correct based on the above, it sounds fine to
me. Assuming any of the other patches in the series gets merged though,
I'd propose sticking this one in as well, until the final solution
lands.
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-07-04 16:55 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 18:17 [PATCH 00/16] Enabling GEN8 full PPGTT + fixes Ben Widawsky
2014-07-01 18:17 ` [PATCH 01/16] drm/i915: Split up do_switch Ben Widawsky
2014-07-01 18:17 ` [PATCH 02/16] drm/i915: Extract l3 remapping out of ctx switch Ben Widawsky
2014-07-01 18:17 ` [PATCH 03/16] drm/i915/ppgtt: Load address space after mi_set_context Ben Widawsky
2014-07-01 18:17 ` [PATCH 04/16] drm/i915: Fix another another use-after-free in do_switch Ben Widawsky
2014-08-09 20:15 ` [PATCH] [v2] " Ben Widawsky
2014-08-10 8:04 ` Chris Wilson
2014-08-11 9:26 ` Daniel Vetter
2014-07-01 18:17 ` [PATCH 05/16] drm/i915/ctx: Return earlier on failure Ben Widawsky
2014-07-04 8:14 ` Chris Wilson
2014-07-01 18:17 ` [PATCH 06/16] drm/i915/error: Check the potential ctx obj's vm Ben Widawsky
2014-07-17 8:47 ` Daniel Vetter
2014-07-01 18:17 ` [PATCH 07/16] drm/i915/error: vma error capture prettyify Ben Widawsky
2014-07-01 18:17 ` [PATCH 08/16] drm/i915/error: Do a better job of disambiguating VMAs Ben Widawsky
2014-07-04 7:57 ` Chris Wilson
2014-07-04 16:56 ` Ben Widawsky
2014-07-17 8:51 ` Daniel Vetter
2014-07-20 23:49 ` Ben Widawsky
2014-07-01 18:17 ` [PATCH 09/16] drm/i915/error: Capture vmas instead of BOs Ben Widawsky
2014-07-01 18:17 ` [PATCH 10/16] drm/i915: Add some extra guards in evict_vm Ben Widawsky
2014-07-01 18:17 ` [PATCH 11/16] drm/i915: Make an uninterruptible evict Ben Widawsky
2014-07-01 18:17 ` [PATCH 12/16] drm/i915: Reorder ctx unref on ppgtt cleanup Ben Widawsky
2014-07-17 9:56 ` Daniel Vetter
2014-07-01 18:17 ` [PATCH 13/16] drm/i915: More correct (slower) " Ben Widawsky
2014-07-17 9:49 ` Daniel Vetter
2014-07-01 18:17 ` [PATCH 14/16] drm/i915: Defer PPGTT cleanup Ben Widawsky
2014-07-01 18:17 ` [PATCH 15/16] drm/i915/bdw: Enable full PPGTT Ben Widawsky
2014-07-01 18:17 ` [PATCH 16/16] drm/i915: Get the error state over the wire (HACKish) Ben Widawsky
2014-07-04 8:02 ` Chris Wilson
2014-07-03 22:01 ` [PATCH 1/2] drm/i915/gen8: Invalidate TLBs before PDP reload Ben Widawsky
2014-07-03 22:01 ` [PATCH 2/2] drm/i915: Remove false assertion in ppgtt_release Ben Widawsky
2014-07-04 7:51 ` [PATCH 1/2] drm/i915/gen8: Invalidate TLBs before PDP reload Chris Wilson
2014-07-04 16:55 ` Ben Widawsky [this message]
2014-07-17 12:04 ` [PATCH 00/16] Enabling GEN8 full PPGTT + fixes Daniel Vetter
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=20140704165507.GA5903@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=benjamin.widawsky@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