From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Ben Widawsky <ben@bwidawsk.net>,
intel-gfx@lists.freedesktop.org,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: Re: [PATCH] drm/i915: bdw expands ACTHD to 64bit
Date: Thu, 20 Mar 2014 16:17:26 +0100 [thread overview]
Message-ID: <20140320151726.GQ30571@phenom.ffwll.local> (raw)
In-Reply-To: <20140320075419.GN4890@nuc-i3427.alporthouse.com>
On Thu, Mar 20, 2014 at 07:54:19AM +0000, Chris Wilson wrote:
> On Wed, Mar 19, 2014 at 04:06:38PM -0700, Ben Widawsky wrote:
> > On Wed, Mar 19, 2014 at 09:54:48PM +0000, Chris Wilson wrote:
> > > As Broadwell has an increased virtual address size, it requires more
> > > than 32 bits to store offsets into its address space. This includes the
> > > debug registers to track the current HEAD of the individual rings, which
> > > may be anywhere within the per-process address spaces. In order to find
> > > the full location, we need to read the high bits from a second register.
> > > We then also need to expand our storage to keep track of the larger
> > > address.
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Ben Widawsky <benjamin.widawsky@intel.com>
> > > Cc: Timo Aaltonen <tjaalton@ubuntu.com>
> > > ---
> > > drivers/gpu/drm/i915/i915_drv.h | 2 +-
> > > drivers/gpu/drm/i915/i915_gpu_error.c | 2 +-
> > > drivers/gpu/drm/i915/i915_irq.c | 8 +++++---
> > > drivers/gpu/drm/i915/i915_reg.h | 1 +
> > > drivers/gpu/drm/i915/intel_ringbuffer.c | 21 +++++++++++++++------
> > > drivers/gpu/drm/i915/intel_ringbuffer.h | 6 +++---
> > > 6 files changed, 26 insertions(+), 14 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > > index ed67b4abf9e3..ee913b63a945 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > @@ -354,12 +354,12 @@ struct drm_i915_error_state {
> > > u32 ipeir;
> > > u32 ipehr;
> > > u32 instdone;
> > > - u32 acthd;
> > > u32 bbstate;
> > > u32 instpm;
> > > u32 instps;
> > > u32 seqno;
> > > u64 bbaddr;
> > > + u64 acthd;
> > > u32 fault_reg;
> > > u32 faddr;
> > > u32 rc_psmi; /* sleep state */
> > > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> > > index b153a16ead0a..9519aa240614 100644
> > > --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> > > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> > > @@ -248,7 +248,7 @@ static void i915_ring_error_state(struct drm_i915_error_state_buf *m,
> > > err_printf(m, " TAIL: 0x%08x\n", ring->tail);
> > > err_printf(m, " CTL: 0x%08x\n", ring->ctl);
> > > err_printf(m, " HWS: 0x%08x\n", ring->hws);
> > > - err_printf(m, " ACTHD: 0x%08x\n", ring->acthd);
> > > + err_printf(m, " ACTHD: 0x%08llx\n", ring->acthd);
> >
> > %016x?
> >
> > if (gen8)
> > %016x
> > ?
>
> I wasn't sure either, but I thought since we didn't do anything special
> for BBADDR, to leave ACTHD alone.
>
> I wonder if it would help splitting it up, having to count 8 extra
> leading zeros is going to be a nightmare (especially as the decoder
> doesn't pad it right either...)
>
> For reading, I think I would prefer
> err_printf(m, " ACTHD: 0x%016llx [0x%08x %08x]\n",
> ring->acthd, (u32)(ring->acthd>>32), (u32)(ring->acthd));
>
> or maybe just
> err_printf(m, " ACTHD: 0x%08x %08x\n",
> (u32)(ring->acthd>>32), (u32)(ring->acthd));
I expect this to lead to a day-long wtf session once we have 64b ppgtt
enabled and a leaking X hung ;-) I use g* a lot in vim when reading error
states, so dropping information is dangerous.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-03-20 15:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 21:54 [PATCH] drm/i915: bdw expands ACTHD to 64bit Chris Wilson
2014-03-19 23:06 ` Ben Widawsky
2014-03-20 7:54 ` Chris Wilson
2014-03-20 15:17 ` Daniel Vetter [this message]
2014-03-20 16:28 ` Chris Wilson
2014-03-20 16:34 ` Daniel Vetter
2014-03-20 16:56 ` Tvrtko Ursulin
2014-03-20 21:41 ` Chris Wilson
2014-03-20 21:48 ` [PATCH] drm/i915: Broadwell " Chris Wilson
2014-03-21 10:03 ` Tvrtko Ursulin
2014-03-21 10:14 ` Chris Wilson
2014-03-21 10:50 ` Tvrtko Ursulin
2014-03-21 12:00 ` Chris Wilson
2014-03-21 12:05 ` [PATCH] drm/i915: Split 64bit hexadecimal addresses to make them easier to read Chris Wilson
2014-03-21 12:19 ` [PATCH] drm/i915: Broadwell expands ACTHD to 64bit Tvrtko Ursulin
2014-03-21 12:41 ` Chris Wilson
2014-03-25 2:41 ` Ben Widawsky
2014-03-25 2:43 ` Ben Widawsky
2014-03-25 7:31 ` Chris Wilson
2014-03-27 0:09 ` Ben Widawsky
2014-03-27 7:32 ` Daniel Vetter
2014-03-27 7:45 ` 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=20140320151726.GQ30571@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=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