Granularity > 1 will cause linear->offset to be (generally) doubled. This is quite bad if running OpenGL for whatever reason (AIGLX+Beryl) is mine, and attempting to do XVideo (on the Radeon at least -- haven't checked to see if it applies to other drivers' video implementation). Either way it needs to be fixed. I couldn't find a bug that seems to be related, although some other xvideo bugs (especially those regarding corruption) _might_ be.
Attaching a patch.
Created attachment 8578 [details] [review]
Fixes bug (see bug)
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Wow, this was fixed in 2007.
Author: Eric Anholt <email@example.com>
Date: Tue Mar 6 16:18:59 2007 -0800
Bug #9931: Fix linear allocations with a non-1-byte granularity.
This was introduced in 83080809f9a1c1d24b0318e54632f25f5940da25. Instead of
aligning the offset, it doubled it. Results were appropriately spectacular.
*** This bug has been marked as a duplicate of bug 9931 ***