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 02/12] drm/i915: Provide PDP updates via MMIO
Date: Mon, 25 Nov 2013 10:28:26 -0800 [thread overview]
Message-ID: <20131125182826.GA8977@bwidawsk.net> (raw)
In-Reply-To: <20131125181852.GK21316@nuc-i3427.alporthouse.com>
On Mon, Nov 25, 2013 at 06:18:52PM +0000, Chris Wilson wrote:
> On Mon, Nov 25, 2013 at 09:54:33AM -0800, Ben Widawsky wrote:
> > The initial implementation of this function used MMIO to write the PDPs.
> > Upon review it was determined (correctly) that the docs say to use LRI.
> > The issue is there are times where we want to do a synchronous write
> > (GPU reset).
> >
> > I've tested this, and it works. I've verified with as many people as
> > possible that it should work.
> >
> > This should fix the failing reset problems.
> >
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > ---
> > drivers/gpu/drm/i915/i915_gem_gtt.c | 12 ++++++++++--
> > 1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > index 1a5272c..96dbf3d 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > @@ -197,12 +197,19 @@ static gen6_gtt_pte_t iris_pte_encode(dma_addr_t addr,
> >
> > /* Broadwell Page Directory Pointer Descriptors */
> > static int gen8_write_pdp(struct intel_ring_buffer *ring, unsigned entry,
> > - uint64_t val)
> > + uint64_t val, bool synchronous)
> > {
> > + struct drm_i915_private *dev_priv = ring->dev->dev_private;
> > int ret;
> >
>
> i915_reset_in_progress(&dev_priv->gpu_error));
> doesn't actually mean that we are in the middle of a reset. Or does
> it? Anyway intel_ring_begin() returns EIO/EAGAIN so we do not need
> to pass down the parameter. But the issue with mixing and matching LRI
> vs mmio is that if this was not a reset call, then we just upset the
> GPU even further.
> -Chris
/me sighs
The synchronous argument comes from the future. There are
three places where one could conceivably use it:
1. before rings are up
2. during hang
3. after rings are shut down
With the current code, only #2 is actually possible. I don't like
checking EIO/EAGAIN as there are cases where we expect failure, and
cases where we do not. Being able to strain out which one is which, is
helpful, and [in the future] the caller is the one that can take
appropriate action. Also I found also using the argument a bit nicer
since every gen would have to implement the same logic to determine if
the rings were usage.
You'll have to trust me that I won't use MMIO when I shouldn't be using
it.
I can understand your comment at this stage, but I hope my reasoning
makes sense. (Feel free to view my ppgtt branch if you'd like)
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-11-25 18:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 17:54 [PATCH 00/12] PPGTT pre-work Ben Widawsky
2013-11-25 17:54 ` [PATCH 01/12] drm/i915: Fix BDW PPGTT error path Ben Widawsky
2013-11-25 20:11 ` Chris Wilson
2013-11-25 17:54 ` [PATCH 02/12] drm/i915: Provide PDP updates via MMIO Ben Widawsky
2013-11-25 18:00 ` Ben Widawsky
2013-11-25 18:18 ` Chris Wilson
2013-11-25 18:28 ` Ben Widawsky [this message]
2013-11-25 18:44 ` Chris Wilson
2013-11-25 18:49 ` Ben Widawsky
2013-11-26 9:05 ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 03/12] drm/i915: Add a few missed bits to the mm Ben Widawsky
2013-11-25 17:54 ` [PATCH 04/12] drm/i915: Don't unconditionally try to deref aliasing ppgtt Ben Widawsky
2013-11-25 18:06 ` Chris Wilson
2013-11-25 18:10 ` Ben Widawsky
2013-11-25 19:08 ` Ville Syrjälä
2013-11-26 9:09 ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 05/12] drm/i915: Disallow dynamic ppgtt param modification Ben Widawsky
2013-11-25 18:50 ` Chris Wilson
2013-11-25 17:54 ` [PATCH 06/12] drm/i915: Demote drop_caches_set print Ben Widawsky
2013-11-25 18:08 ` Chris Wilson
2013-11-25 17:54 ` [PATCH 07/12] drm/i915: Removed unused vm args Ben Widawsky
2013-11-25 17:54 ` [PATCH 08/12] drm/i915: Remove defunct ctx switch comments Ben Widawsky
2013-11-25 17:54 ` [PATCH 09/12] drm/i915: Missed dropped VMA conversion Ben Widawsky
2013-11-25 17:54 ` [PATCH 10/12] drm/i915: Allow ggtt lookups to not WARN Ben Widawsky
2013-11-26 9:16 ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 11/12] drm/i915: Takedown drm_mm on failed gtt setup Ben Widawsky
2013-11-26 9:21 ` Daniel Vetter
2013-11-25 17:54 ` [PATCH 12/12] drm/i915: Move the gtt mm takedown to cleanup Ben Widawsky
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=20131125182826.GA8977@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 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.