From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Imre Deak <imre.deak@intel.com>, Daniel Vetter <daniel@ffwll.ch>,
danh@ghs.com, intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Only fence tiled region of object.
Date: Fri, 19 Dec 2014 11:15:59 +0100 [thread overview]
Message-ID: <20141219101559.GH2711@phenom.ffwll.local> (raw)
In-Reply-To: <20141219091740.GE554@nuc-i3427.alporthouse.com>
On Fri, Dec 19, 2014 at 09:17:40AM +0000, Chris Wilson wrote:
> On Fri, Dec 19, 2014 at 11:05:36AM +0200, Imre Deak wrote:
> > On Fri, 2014-12-19 at 08:26 +0000, Chris Wilson wrote:
> > > On Fri, Dec 19, 2014 at 12:14:00AM +0200, Imre Deak wrote:
> > > > On Thu, 2014-12-18 at 22:19 +0100, Daniel Vetter wrote:
> > > > > On Thu, Dec 18, 2014 at 11:04:11PM +0200, Ville Syrjälä wrote:
> > > > > > On Thu, Dec 18, 2014 at 09:37:37PM +0100, Daniel Vetter wrote:
> > > > > > > On Thu, Dec 18, 2014 at 09:51:26AM -0800, Bob Paauwe wrote:
> > > > > > > > When creating a fence for a tiled object, only fence the area that
> > > > > > > > makes up the actual tiles. The object may be larger than the tiled
> > > > > > > > area and if we allow those extra addresses to be fenced, they'll
> > > > > > > > get converted to addresses beyond where the object is mapped. This
> > > > > > > > opens up the possiblity of writes beyond the end of object.
> > > > > > > >
> > > > > > > > To prevent this, we adjust the size of the fence to only encompass
> > > > > > > > the area that makes up the actual tiles. The extra space is considered
> > > > > > > > un-tiled and now behaves as if it was a linear object.
> > > > > > > >
> > > > > > > > Testcase: igt/gem_tiled_fence_overflow
> > > > > > > > Reported-by: Dan Hettena <danh@ghs.com>
> > > > > > > > Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
> > > > > > >
> > > > > > > Presuming this indeed blows up (I didn't try your test) this is one for
> > > > > > > Jani.
> > > > > >
> > > > > > Hmm. Wasn't this problem discussed a few years ago already? My recollection
> > > > > > is that Imre had patches but you said you don't care about the problem.
> > > > >
> > > > > Imre had patches iirc to resize the allocation , which would have caused
> > > > > major havoc with moving stuff around I think.
> > > >
> > > > It did that only for old GENs where the POT fence size constraint gives
> > > > you no other choice to fix this issue. On new HW I also rounded down the
> > > > fence size.
> > >
> > > If we were to be consistent, then we would pad in the GTT so that no
> > > other object fitted in the full fenced region.
> >
> > Yes, I did that. In v2 I changed this (based on your feedback) so the
> > padding happens only on old GENs with the POT constraint, since on new
> > GENs we can instead reduce the fence region size. The end of the buffer
> > couldn't contain even a single whole pixel line, so would display
> > incorrectly anyway.
>
> Maybe they allocated one very large object for a mipmap, each level of
> varying pitches but uploading through a single fence with a single
> pitch, and so carefully wrote the trailing levels to account for the
> different tile row size (but it knew the individual pages would be
> correct).
>
> Technically reducing the fenced region size is an ABI change... :p
Well the last incomplete tile-row couldn't ever really be used anyway
since writes just go somewhere. So I don't think this is a user-observable
ABI change. And it's simpler than enlarging the tiled gtt size on gen4+,
which might result in some more gtt thrashing. So I only want to do that
if we really need it.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-12-19 10:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 17:51 [PATCH] drm/i915: Only fence tiled region of object Bob Paauwe
2014-12-18 20:37 ` Daniel Vetter
2014-12-18 21:04 ` Ville Syrjälä
2014-12-18 21:19 ` Daniel Vetter
2014-12-18 22:14 ` Imre Deak
2014-12-19 8:26 ` Chris Wilson
2014-12-19 9:05 ` Imre Deak
2014-12-19 9:17 ` Chris Wilson
2014-12-19 10:15 ` Daniel Vetter [this message]
2014-12-19 12:31 ` Dan Hettena
2014-12-19 13:17 ` Chris Wilson
2014-12-18 21:23 ` Imre Deak
2015-01-21 17:09 ` Jani Nikula
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=20141219101559.GH2711@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=danh@ghs.com \
--cc=imre.deak@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox