[Intel-gfx] [PATCH] drm/i915: Promote invalid buffer alignment.

Chris Wilson chris at chris-wilson.co.uk
Sat Dec 5 09:56:57 CET 2009


On Fri, 04 Dec 2009 20:34:15 -0800, Eric Anholt <eric at anholt.net> wrote:
> On Wed,  2 Dec 2009 21:07:37 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > WARN if somebody tries to pin a buffer with a too lax alignment, and use
> > the minimum required alignment instead.
> 
> Does this impact any existing userland code?

The two callers who can pass an alignment parameter to the kernel are pin
and execbuffer.

pin should only be used by root, and is being phased out in the KMS world.
execbuffer accepts an alignment per relocation from the normal user,
however libdrm only fills that value with 0.

Maybe it would be more appropriate to push the error checking to the
userland boundary and make this a BUG_ON instead? I've seen two cases of
an invalid alignment reported since enabling tiling for some X Pixmaps:
256k and 4k. The 256k was the erroneous hack that we accidentally
commited, but the source of the 4k invalid alignment is still a mystery.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list