From: Ben Widawsky <ben@bwidawsk.net>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 02/12] drm/i915: BUG_ON bad PPGTT offset
Date: Wed, 8 May 2013 09:48:40 -0700 [thread overview]
Message-ID: <20130508164838.GA1077@bwidawsk.net> (raw)
In-Reply-To: <CAKMK7uGvrqJFhwP4T1C0XGCEARRhD7aqsmqmbuOfOvCSyb-Z9A@mail.gmail.com>
On Mon, May 06, 2013 at 08:37:37PM +0200, Daniel Vetter wrote:
> On Mon, May 6, 2013 at 8:03 PM, Ben Widawsky <ben@bwidawsk.net> wrote:
> > On Mon, May 06, 2013 at 11:48:05AM +0200, Daniel Vetter wrote:
> >> On Thu, May 02, 2013 at 01:28:23PM -0700, Jesse Barnes wrote:
> >> > On Tue, 23 Apr 2013 23:15:30 -0700
> >> > Ben Widawsky <ben@bwidawsk.net> wrote:
> >> >
> >> > > Because PPGTT PDEs within the GTT are calculated in cachelines
> >> > > (HW guys consistency ftw) we do a divide which will wreak havoc if this
> >> > > is wrong, and I know that from experience).
> >> > >
> >> > > If/when we move to multiple PPGTTs this will have to become a WARN, and
> >> > > return an error. For now however it should always be considered fatal,
> >> > > and only a developer could hit it.
> >> > >
> >> > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> >> > > ---
> >> > > drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++
> >> > > 1 file changed, 2 insertions(+)
> >> > >
> >> > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >> > > index 50df194..0503f09 100644
> >> > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> >> > > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >> > > @@ -85,6 +85,8 @@ static int gen6_ppgtt_enable(struct drm_device *dev)
> >> > > uint32_t pd_entry;
> >> > > int i;
> >> > >
> >> > > + BUG_ON(ppgtt->pd_offset & 0x3f);
> >> > > +
> >> > > pd_addr = (gen6_gtt_pte_t __iomem*)dev_priv->gtt.gsm +
> >> > > ppgtt->pd_offset / sizeof(gen6_gtt_pte_t);
> >> > > for (i = 0; i < ppgtt->num_pd_entries; i++) {
> >> >
> >> > Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >>
> >> Queued for -next with the same s/BUG/WARN bikeshed, thanks for the patch.
> >> -Daniel
> >
> > If you're going to change to WARN, please fixup the patch to return
> > early... if (WARN_ON(...)) return
> >
> > The GPU will end up hanging if we've messed this up...
>
> I don't care about the gpu, only that the logs hit the disc. And I
> don't see how an early return can safe anything in here, since
> something went horribly wrong already anyway.
> -Daniel
Seriously? Feels a bit like this has become an argument for arguments
sake, but: I'd much rather have an assertion fail than a gpu error state
from same random point in time later.
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-05-08 16:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 6:15 [PATCH 00/12] [RFC] PPGTT prep patches part 1 Ben Widawsky
2013-04-24 6:15 ` [PATCH 01/12] drm/i915: Assert mutex_is_locked on context lookup Ben Widawsky
2013-05-02 20:27 ` Jesse Barnes
2013-05-06 9:40 ` Daniel Vetter
2013-05-06 9:44 ` Daniel Vetter
2013-05-06 17:59 ` Ben Widawsky
2013-05-06 18:35 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 02/12] drm/i915: BUG_ON bad PPGTT offset Ben Widawsky
2013-05-02 20:28 ` Jesse Barnes
2013-05-06 9:48 ` Daniel Vetter
2013-05-06 18:03 ` Ben Widawsky
2013-05-06 18:37 ` Daniel Vetter
2013-05-08 16:48 ` Ben Widawsky [this message]
2013-05-08 17:55 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 03/12] drm/i915: make PDE|PTE platform specific Ben Widawsky
2013-05-02 21:26 ` Jesse Barnes
2013-05-02 22:49 ` Ben Widawsky
2013-05-02 22:55 ` Jesse Barnes
2013-05-06 9:47 ` Daniel Vetter
2013-05-08 16:49 ` Ben Widawsky
2013-05-08 17:52 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 04/12] drm/i915: Extract PDE writes Ben Widawsky
2013-05-02 21:27 ` Jesse Barnes
2013-05-06 9:50 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 05/12] drm: Optionally create mm blocks from top-to-bottom Ben Widawsky
2013-04-24 6:15 ` [PATCH 06/12] drm/i915: Use drm_mm for PPGTT PDEs Ben Widawsky
2013-05-02 21:42 ` Jesse Barnes
2013-04-24 6:15 ` [PATCH 07/12] drm/i915: Use PDEs as the guard page Ben Widawsky
2013-04-24 6:15 ` [PATCH 08/12] drm/i915: Update context_fini Ben Widawsky
2013-04-24 15:11 ` Mika Kuoppala
2013-04-25 4:11 ` Ben Widawsky
2013-04-25 5:17 ` Ben Widawsky
2013-04-25 15:01 ` Mika Kuoppala
2013-04-25 17:22 ` Ben Widawsky
2013-04-24 6:15 ` [PATCH 09/12] drm/i915: Split context enabling from init Ben Widawsky
2013-04-24 10:04 ` Chris Wilson
2013-04-24 16:39 ` Ben Widawsky
2013-04-24 6:15 ` [PATCH 10/12] drm/i915: destroy i915_gem_init_global_gtt Ben Widawsky
2013-04-24 6:15 ` [PATCH 11/12] drm/i915: Embed PPGTT into the context Ben Widawsky
2013-04-24 6:15 ` [PATCH 12/12] drm/i915: No contexts without ppgtt Ben Widawsky
2013-04-24 10:06 ` Chris Wilson
2013-04-24 16:39 ` Ben Widawsky
2013-04-24 9:53 ` [PATCH 00/12] [RFC] PPGTT prep patches part 1 Chris Wilson
2013-04-24 19:58 ` 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=20130508164838.GA1077@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=daniel@ffwll.ch \
--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