xserver: Branch 'no-pci-rework' - 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 77cb8b9a8adf0ea65fe703d42509c6ce67571a0e (from 81b6509863f3257d4abbf8cccb6c0589d57155ff)
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 81b6509863f3257d4abbf8cccb6c0589d57155ff (from 0521d64e5eabafe612549d09f70e1dd647f9efae)
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 f4d453e..fb21944 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 0521d64e5eabafe612549d09f70e1dd647f9efae (from 032c729bb8d925d7b8a4a81ddc9dd03e9031cf91)
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 232ec99..ecb4fd9 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1372,9 +1372,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);
@@ -1389,6 +1386,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