xserver: Branch 'master' - 3 commits

Michel Daenzer daenzer at kemper.freedesktop.org
Mon Sep 17 11:53:41 PDT 2007


 exa/exa_accel.c     |    6 +++---
 exa/exa_migration.c |    8 ++++----
 exa/exa_unaccel.c   |    7 +++++++
 3 files changed, 14 insertions(+), 7 deletions(-)

New commits:
diff-tree 547ad2125ece93bbe01f6d09a3baf176ebd16bb3 (from 56cc24ffb21f7fd41f9ea9e8f969aa85021b9f53)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Sep 17 20:33:56 2007 +0200

    EXA: Make sure driver hooks get correct offscreen offsets from exaCopyDirty.
    
    This should ensure the driver UploadTo/DownloadFromScreen hooks can always
    work as intended.

diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index ace9076..c0e022c 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -127,7 +127,7 @@ exaCopyDirty(ExaMigrationPtr migrate, Re
     ExaPixmapPriv (pPixmap);
     RegionPtr damage = DamageRegion (pExaPixmap->pDamage);
     RegionRec CopyReg;
-    CARD8 *save_ptr;
+    Bool save_offscreen;
     int save_pitch;
     BoxPtr pBox;
     int nbox;
@@ -176,9 +176,9 @@ exaCopyDirty(ExaMigrationPtr migrate, Re
     pBox = REGION_RECTS(&CopyReg);
     nbox = REGION_NUM_RECTS(&CopyReg);
 
-    save_ptr = pPixmap->devPrivate.ptr;
+    save_offscreen = pExaPixmap->offscreen;
     save_pitch = pPixmap->devKind;
-    pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
+    pExaPixmap->offscreen = TRUE;
     pPixmap->devKind = pExaPixmap->fb_pitch;
 
     while (nbox--) {
@@ -216,7 +216,7 @@ exaCopyDirty(ExaMigrationPtr migrate, Re
     else
 	sync (pPixmap->drawable.pScreen);
 
-    pPixmap->devPrivate.ptr = save_ptr;
+    pExaPixmap->offscreen = save_offscreen;
     pPixmap->devKind = save_pitch;
 
     /* The copied bits are now valid in destination */
diff-tree 56cc24ffb21f7fd41f9ea9e8f969aa85021b9f53 (from 7ac89060e02c7a803018afd580720f8326561fd8)
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Mon Sep 17 20:33:56 2007 +0200

    EXA: Don't crash in ExaCheckPolyArc.
    
    See https://bugs.freedesktop.org/show_bug.cgi?id=12286 .

diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index fcd4af9..c55ef03 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -196,6 +196,12 @@ ExaCheckPolyArc (DrawablePtr pDrawable, 
 		int narcs, xArc *pArcs)
 {
     EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
+
+    /* Disable this as fbPolyArc can call miZeroPolyArc which in turn
+     * can call accelerated functions, that as yet, haven't been notified
+     * with exaFinishAccess().
+     */
+#if 0
     if (pGC->lineWidth == 0)
     {
 	exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
@@ -205,6 +211,7 @@ ExaCheckPolyArc (DrawablePtr pDrawable, 
 	exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
 	return;
     }
+#endif
     miPolyArc (pDrawable, pGC, narcs, pArcs);
 }
 
diff-tree 7ac89060e02c7a803018afd580720f8326561fd8 (from 3876c6c80534a6f7412ec806a2ba9ada22c5e505)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Sep 17 20:33:55 2007 +0200

    EXA: Don't crash in exaGetImage when swapped out.

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 8500c5b..2acade2 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1324,9 +1324,6 @@ exaGetImage (DrawablePtr pDrawable, int 
     int xoff, yoff;
     Bool ok;
 
-    if (pExaScr->swappedOut)
-	goto fallback;
-
     pixmaps[0].as_dst = FALSE;
     pixmaps[0].as_src = TRUE;
     pixmaps[0].pPix = pPix = exaGetDrawablePixmap (pDrawable);
@@ -1341,6 +1338,9 @@ exaGetImage (DrawablePtr pDrawable, int 
 
     REGION_INIT(pScreen, &Reg, &Box, 1);
 
+    if (pExaScr->swappedOut)
+	goto fallback;
+
     exaDoMigration(pixmaps, 1, FALSE);
 
     pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);


More information about the xorg-commit mailing list