diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-11 20:31:43 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-11 20:31:43 +0000 |
commit | 524ef0872517d48d61db75834d55a7d7f126e0c0 (patch) | |
tree | 691045ccd3c1b0383025cc2b8cdc25df57877642 | |
parent | 035746dbde0c4c4bb235326528e38b6c690aee84 (diff) |
Fix from X.Org master git for XAA screen corruption.
XAA PixmapOps: Sync before accessing unwrapped callbacks.
When using any XAAPixmapOps, we call into unknown but freshly
unwrapped callbacks (like fb ones). Unlike the XAA*Fallback calls,
we did so without syncing first, exposing us to all kinds of
synchronisation issues.
I believe that the rendering errors appeared now because *PaintWindow
vanished (e4d11e58), and we just use miPaintWindow instead. This
takes a less direct route to the hw and ends up at
PolyFillRectPixmap, which very often left drawing artifacts.
We now sync accordingly, and no longer get the rendering artifacts i
was methodically reproducing on radeonhd, radeon, unichrome...
Also, in order to allow driver authors to remove extensive syncing
or flushing to hide this issue, create XAA_VERSION_ defines, put
them in xaa.h and bump the patchlevel.
tested by naddy@ and Edd Barrett. ok oga@.
-rw-r--r-- | xserver/hw/xfree86/xaa/xaa.h | 4 | ||||
-rw-r--r-- | xserver/hw/xfree86/xaa/xaaInitAccel.c | 4 | ||||
-rw-r--r-- | xserver/hw/xfree86/xaa/xaawrap.h | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/xserver/hw/xfree86/xaa/xaa.h b/xserver/hw/xfree86/xaa/xaa.h index 1dc7ed2d5..d6ccc31e2 100644 --- a/xserver/hw/xfree86/xaa/xaa.h +++ b/xserver/hw/xfree86/xaa/xaa.h @@ -2,6 +2,10 @@ #ifndef _XAA_H #define _XAA_H +#define XAA_VERSION_MAJOR 1 +#define XAA_VERSION_MINOR 2 +#define XAA_VERSION_RELEASE 1 + /* ******** OPERATION SPECIFIC FLAGS ********* diff --git a/xserver/hw/xfree86/xaa/xaaInitAccel.c b/xserver/hw/xfree86/xaa/xaaInitAccel.c index 00483e3ed..7ca1f45a4 100644 --- a/xserver/hw/xfree86/xaa/xaaInitAccel.c +++ b/xserver/hw/xfree86/xaa/xaaInitAccel.c @@ -103,7 +103,9 @@ static XF86ModuleVersionInfo xaaVersRec = MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - 1, 2, 0, + XAA_VERSION_MAJOR, + XAA_VERSION_MINOR, + XAA_VERSION_RELEASE, ABI_CLASS_VIDEODRV, /* requires the video driver ABI */ ABI_VIDEODRV_VERSION, MOD_CLASS_NONE, diff --git a/xserver/hw/xfree86/xaa/xaawrap.h b/xserver/hw/xfree86/xaa/xaawrap.h index 38c97d70b..857dbc3ed 100644 --- a/xserver/hw/xfree86/xaa/xaawrap.h +++ b/xserver/hw/xfree86/xaa/xaawrap.h @@ -48,8 +48,8 @@ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\ GCFuncs *oldFuncs = pGC->funcs;\ pGC->funcs = pGCPriv->wrapFuncs;\ - pGC->ops = pGCPriv->wrapOps - + pGC->ops = pGCPriv->wrapOps; \ + SYNC_CHECK(pGC) #define XAA_PIXMAP_OP_EPILOGUE(pGC)\ pGCPriv->wrapOps = pGC->ops;\ |