[PATCH] EXA/mixed: Don't consider devKind for detecting dimension change.

Michel Dänzer michel at daenzer.net
Thu Dec 10 03:36:53 PST 2009


On Wed, 2009-12-09 at 15:14 -0800, Keith Packard wrote: 
> On Thu, 10 Dec 2009 00:04:53 +0100, Michel Dänzer <michel at daenzer.net> wrote:
> > From: Michel Dänzer <daenzer at vmware.com>
> > 
> > Fixes http://bugs.freedesktop.org/show_bug.cgi?id=25536 .
> > 
> > There should be no reason for the pitch to actually change when none of the
> > other dimensions do, and this could lead to incorrectly freeing the system
> > memory copy when allocating a GPU copy, resulting in loss of valid pixmap
> > contents.
> 
> One can imagine the driver wanting to change padding requirements to hit
> some different tiling mode; is this not a reasonable thing to account
> for?

That's taken care of by the CreatePixmap2 driver hook.

> And, of course, why would someone send a devKind that wasn't the same
> without intending to change it? Sure seems like you're masking a bug in
> other code.

exaCreatePixmap_mixed() calls ModifyPixmapHeader to set the GPU copy
pitch, which in general isn't the same as the system memory copy pitch.


FWIW, the patch has been

Acked-by: Maarten Maathuis <madman2003 at gmail.com>


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list