[PATCH xserver] EXA/mixed: Update sys_pitch in MPH even when there's no system memory copy.

Keith Packard keithp at keithp.com
Tue Aug 9 09:23:41 PDT 2011


On Tue, 09 Aug 2011 17:51:40 +0200, Michel Dänzer <michel at daenzer.net> wrote:

> It does, in the block this line moved out of. This fix is for the
> pExaPixmap->sys_ptr == NULL case.

That isn't clearly the case looking at the code in isolation; are you
saying that has_gpu_copy is always true in this code? Or that the
patch could look more like:

@@ -185,11 +185,13 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
             RegionEmpty(&pExaPixmap->validFB);
         }
 
+	if (has_gpu_copy)
+	    pExaPixmap->sys_pitch = PixmapBytePad(width, depth);
+
 	/* Need to re-create system copy if there's also a GPU copy */
 	if (has_gpu_copy && pExaPixmap->sys_ptr) {
 	    free(pExaPixmap->sys_ptr);
 	    pExaPixmap->sys_ptr = NULL;
-	    pExaPixmap->sys_pitch = PixmapBytePad(width, depth);
 	    DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
 	    DamageDestroy(pExaPixmap->pDamage);
 	    pExaPixmap->pDamage = NULL;

(written to minimize the diff)

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110809/1a7ddc31/attachment.pgp>


More information about the xorg-devel mailing list