[Intel-gfx] [PATCH 1/3] drm/i915: Unbind the bo if the user requests a different alignment

Eric Anholt eric at anholt.net
Wed Apr 14 01:49:46 CEST 2010


On Mon, 12 Apr 2010 18:23:22 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Mon, 12 Apr 2010 10:10:22 -0700, Eric Anholt <eric at anholt.net> wrote:
> > On Sun,  4 Apr 2010 22:35:19 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > > If the buffer is currently bound and does not meet the requested
> > > alignment, then unbind it and repin.
> > 
> > Do we have any users legitimately requesting an alignment?  I thought
> > they never existed or only lied when they did.
> 
> Yes, I invented one. ;-) Reusing surfaces within a batch with different
> per-surface tiling parameters on pre-i965, without informing the kernel
> that the buffer is tiled [so we can get away with reusing the surface
> multiple times in the batch with different parameters...], and so having 
> to manually request the minimal legal alignment for the relocated bo.
> Given the transient nature of clip masks, glyph masks and intermediate
> back buffers, we can reuse a lot of buffers within a single batch and
> avoid catastrophic aperture thrashing.
> -ickle

And you're guaranteeing that the transient tiled data doesn't need to
have coherent contents across batchbuffer boundaries? (since it could
get swapped, which means needing a17 swizzling, so the kernel would need
to know about it).  This sounds like madness.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100413/c2df97f0/attachment.sig>


More information about the Intel-gfx mailing list