On Die, 2011-08-09 at 09:23 -0700, Keith Packard wrote:
> On Tue, 09 Aug 2011 17:51:40 +0200, Michel Dänzer <[email protected]> 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:
Maybe it should. Janne, does the patch below fix your problem as well?
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index fd1afb2..cf01b48 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -186,17 +186,20 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width,
int height, int 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;
- RegionEmpty(&pExaPixmap->validSys);
+ if (has_gpu_copy) {
+ if (pExaPixmap->sys_ptr) {
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+ RegionEmpty(&pExaPixmap->validSys);
- if (pExaScr->deferred_mixed_pixmap == pPixmap)
- pExaScr->deferred_mixed_pixmap = NULL;
+ if (pExaScr->deferred_mixed_pixmap == pPixmap)
+ pExaScr->deferred_mixed_pixmap = NULL;
+ }
+
+ pExaPixmap->sys_pitch = PixmapBytePad(width, depth);
}
}
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel