rpms/xorg-x11-server/devel xserver-1.5.0-exa-master-upgrade.patch, NONE, 1.1 xorg-x11-server.spec, 1.346, 1.347

Dave Airlie airlied at fedoraproject.org
Wed Sep 10 10:47:51 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-server/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30175

Modified Files:
	xorg-x11-server.spec 
Added Files:
	xserver-1.5.0-exa-master-upgrade.patch 
Log Message:
* Wed Sep 10 2008 Dave Airlie <airlied at redhat.com> 1.5.0-2
- bring master exa back


xserver-1.5.0-exa-master-upgrade.patch:

--- NEW FILE xserver-1.5.0-exa-master-upgrade.patch ---
>From e99347a3e82e6db47dd482169b6799968afc3893 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied at redhat.com>
Date: Wed, 20 Aug 2008 10:11:07 -0400
Subject: [PATCH] Upgrade to master EXA

---


diff --git a/exa/Makefile.am b/exa/Makefile.am
index e2f7ed3..2b3f1e4 100644
--- a/exa/Makefile.am
+++ b/exa/Makefile.am
@@ -18,6 +18,7 @@ libexa_la_SOURCES = \
 	exa.c \
 	exa.h \
 	exa_accel.c \
+	exa_glyphs.c \
 	exa_migration.c \
 	exa_offscreen.c \
 	exa_render.c \
diff --git a/exa/exa.c b/exa/exa.c
index ccf148a..12c1549 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -35,8 +35,6 @@
 #include <stdlib.h>
 
 #include "exa_priv.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
 #include "exa.h"
 #include "cw.h"
 
@@ -161,7 +159,7 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
     RegionPtr pDamageReg;
     RegionRec region;
 
-    if (!pExaPixmap)
+    if (!pExaPixmap || !pExaPixmap->pDamage)
 	return;
 	
     box.x1 = max(x1, 0);
@@ -261,6 +259,21 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
                                      pExaScr->info->pixmapPitchAlign);
 }
 
+
+static void
+ExaDamageReport(DamagePtr pDamage, RegionPtr pReg, void *pClosure)
+{
+    PixmapPtr pPixmap = pClosure;
+    ExaPixmapPriv(pPixmap);
+    RegionPtr pDamageReg = DamageRegion(pDamage);
+
+    if (pExaPixmap->pendingDamage) {
+	REGION_UNION(pScreen, pDamageReg, pDamageReg, pReg);
+	pExaPixmap->pendingDamage = FALSE;
+    }
+}
+
+
 /**
  * exaCreatePixmap() creates a new pixmap.
  *
@@ -321,6 +334,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
                                        paddedWidth, NULL);
         pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
         pExaPixmap->fb_ptr = NULL;
+        pExaPixmap->pDamage = NULL;
     } else {
         pExaPixmap->driverPriv = NULL;
         /* Scratch pixmaps may have w/h equal to zero, and may not be
@@ -345,21 +359,22 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
 	     fbDestroyPixmap(pPixmap);
 	     return NULL;
         }
-    }
- 
-    pExaPixmap->area = NULL;
 
-    /* Set up damage tracking */
-    pExaPixmap->pDamage = DamageCreate (NULL, NULL, DamageReportNone, TRUE,
-					pScreen, pPixmap);
+	/* Set up damage tracking */
+	pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL,
+					    DamageReportRawRegion, TRUE,
+					    pScreen, pPixmap);
 
-    if (pExaPixmap->pDamage == NULL) {
-	fbDestroyPixmap (pPixmap);
-	return NULL;
-    }
+	if (pExaPixmap->pDamage == NULL) {
+	    fbDestroyPixmap (pPixmap);
+	    return NULL;
+	}
 
-    DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
-    DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
+	DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
+	DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
+    }
+ 
+    pExaPixmap->area = NULL;
 
     /* None of the pixmap bits are valid initially */
     REGION_NULL(pScreen, &pExaPixmap->validSys);
@@ -656,34 +671,25 @@ exaCreateGC (GCPtr pGC)
     return TRUE;
 }
 
-void
-exaPrepareAccessWindow(WindowPtr pWin)
+static Bool
+exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 {
-    if (pWin->backgroundState == BackgroundPixmap) 
+    Bool ret;
+
+    if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) 
         exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
 
-    if (pWin->borderIsPixel == FALSE)
-        exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
-}
+    if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE)
+        exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK);
 
-void
-exaFinishAccessWindow(WindowPtr pWin)
-{
-    if (pWin->backgroundState == BackgroundPixmap) 
-        exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
+    ret = fbChangeWindowAttributes(pWin, mask);
 
-    if (pWin->borderIsPixel == FALSE)
-        exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
-}
+    if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE)
+        exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK);
 
-static Bool
-exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
-{
-    Bool ret;
+    if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) 
+        exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
 
-    exaPrepareAccessWindow(pWin);
-    ret = fbChangeWindowAttributes(pWin, mask);
-    exaFinishAccessWindow(pWin);
     return ret;
 }
 
@@ -737,6 +743,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
     PictureScreenPtr	ps = GetPictureScreenIfSet(pScreen);
 #endif
 
+    if (ps->Glyphs == exaGlyphs)
+	exaGlyphsFini(pScreen);
+
     pScreen->CreateGC = pExaScr->SavedCreateGC;
     pScreen->CloseScreen = pExaScr->SavedCloseScreen;
     pScreen->GetImage = pExaScr->SavedGetImage;
@@ -750,8 +759,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
 #ifdef RENDER
     if (ps) {
 	ps->Composite = pExaScr->SavedComposite;
+	ps->Glyphs = pExaScr->SavedGlyphs;
 	ps->Trapezoids = pExaScr->SavedTrapezoids;
-	ps->AddTraps = pExaScr->SavedAddTraps;
+	ps->Triangles = pExaScr->SavedTriangles;
     }
 #endif
 
@@ -913,14 +923,16 @@ exaDriverInit (ScreenPtr		pScreen,
         pExaScr->SavedComposite = ps->Composite;
 	ps->Composite = exaComposite;
 
+	if (pScreenInfo->PrepareComposite) {
+	    pExaScr->SavedGlyphs = ps->Glyphs;
+	    ps->Glyphs = exaGlyphs;
+	}
+	
 	pExaScr->SavedTriangles = ps->Triangles;
 	ps->Triangles = exaTriangles;
 
 	pExaScr->SavedTrapezoids = ps->Trapezoids;
 	ps->Trapezoids = exaTrapezoids;
-
-	pExaScr->SavedAddTraps = ps->AddTraps;
-	ps->AddTraps = ExaCheckAddTraps;
     }
 #endif
 
@@ -968,6 +980,9 @@ exaDriverInit (ScreenPtr		pScreen,
 	}
     }
 
[...1695 lines suppressed...]
 	ExaPixmapPriv (pixmap);
 	RegionRec migration;
-	RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
-	int xoff, yoff;
-
-	exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
 
-	xoff += pDraw->x;
-	yoff += pDraw->y;
+	if (pExaPixmap->pDamage) {
+	    bounds.x1 += pDraw->x;
+	    bounds.y1 += pDraw->y;
+	    bounds.x2 += pDraw->x;
+	    bounds.y2 += pDraw->y;
 
-	bounds.x1 += xoff;
-	bounds.y1 += yoff;
-	bounds.x2 += xoff;
-	bounds.y2 += yoff;
-
-	REGION_INIT(pScreen, &migration, &bounds, 1);
-	REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
-	REGION_UNINIT(pScreen, &migration);
+	    REGION_INIT(pScreen, &migration, &bounds, 1);
+	    exaDamageDestForMigration(pDraw, pixmap, &migration);
+	}
 
 	exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
 
@@ -866,6 +1082,13 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	    (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
 
 	exaFinishAccess(pDraw, EXA_PREPARE_DEST);
+
+	/* Damage manually, because Trapezoids expects to hit Composite normally. */
+	/* Composite is wrapped by damage, but Trapezoids isn't. */
+	if (pExaPixmap->pDamage) {
+	    DamageDamageRegion(pDraw, &migration);
+	    REGION_UNINIT(pScreen, &migration);
+	}
     }
     else if (maskFormat)
     {
@@ -946,26 +1169,27 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
 	ExaPixmapPriv (pixmap);
 	RegionRec migration;
-	RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
-	int xoff, yoff;
-
-	exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
-
-	xoff += pDraw->x;
-	yoff += pDraw->y;
 
-	bounds.x1 += xoff;
-	bounds.y1 += yoff;
-	bounds.x2 += xoff;
-	bounds.y2 += yoff;
+	if (pExaPixmap->pDamage) {
+	    bounds.x1 += pDraw->x;
+	    bounds.y1 += pDraw->y;
+	    bounds.x2 += pDraw->x;
+	    bounds.y2 += pDraw->y;
 
-	REGION_INIT(pScreen, &migration, &bounds, 1);
-	REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
-	REGION_UNINIT(pScreen, &migration);
+	    REGION_INIT(pScreen, &migration, &bounds, 1);
+	    exaDamageDestForMigration(pDraw, pixmap, &migration);
+	}
 
 	exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
 	(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
 	exaFinishAccess(pDraw, EXA_PREPARE_DEST);
+
+	/* Damage manually, because Triangles expects to hit Composite normally. */
+	/* Composite is wrapped by damage, but Triangles isn't. */
+	if (pExaPixmap->pDamage) {
+	    DamageDamageRegion(pDraw, &migration);
+	    REGION_UNINIT(pScreen, &migration);
+	}
     }
     else if (maskFormat)
     {
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index d7bd06c..d5d6a30 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -97,12 +97,15 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
 		 int x, int y, int w, int h, int leftPad, int format,
 		 char *bits)
 {
+    ExaPixmapPriv(exaGetDrawablePixmap(pDrawable));
+
     EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
     if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
 			      pGC->alu))
 	exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
     else
-	ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST);
+	exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ?
+			     DamagePendingRegion(pExaPixmap->pDamage) : NULL);
     fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
     exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
 }
@@ -350,20 +353,6 @@ ExaCheckComposite (CARD8      op,
     REGION_UNINIT(pScreen, &region);
 }
 
-void
-ExaCheckAddTraps (PicturePtr	pPicture,
-		  INT16		x_off,
-		  INT16		y_off,
-		  int		ntrap,
-		  xTrap		*traps)
-{
-    EXA_FALLBACK(("to pict %p (%c)\n",
-		  exaDrawableLocation(pPicture->pDrawable)));
-    exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
-    fbAddTraps (pPicture, x_off, y_off, ntrap, traps);
-    exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
-}
-
 /**
  * Gets the 0,0 pixel of a pixmap.  Used for doing solid fills of tiled pixmaps
  * that happen to be 1x1.  Pixmap must be at least 8bpp.
@@ -373,23 +362,22 @@ ExaCheckAddTraps (PicturePtr	pPicture,
 CARD32
 exaGetPixmapFirstPixel (PixmapPtr pPixmap)
 {
-    ExaScreenPriv(pPixmap->drawable.pScreen);
     CARD32 pixel;
     void *fb;
     Bool need_finish = FALSE;
     BoxRec box;
     RegionRec migration;
     ExaPixmapPriv (pPixmap);
-    Bool sys_valid = !miPointInRegion(&pExaPixmap->validSys, 0, 0,  &box);
-    Bool damaged = miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0,
-				   &box);
+    Bool sys_valid = pExaPixmap->pDamage &&
+	!miPointInRegion(&pExaPixmap->validSys, 0, 0,  &box);
+    Bool damaged = pExaPixmap->pDamage &&
+ 	miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box);
     Bool offscreen = exaPixmapIsOffscreen(pPixmap);
 
     fb = pExaPixmap->sys_ptr;
 
     /* Try to avoid framebuffer readbacks */
-    if (pExaScr->info->CreatePixmap ||
-	(!offscreen && !sys_valid && !damaged) ||
+    if ((!offscreen && !sys_valid && !damaged) ||
 	(offscreen && (!sys_valid || damaged)))
     {
 	box.x1 = 0;
diff --git a/hw/xfree86/exa/exa.man.pre b/hw/xfree86/exa/exa.man.pre
index 14859bc..31e1cfe 100644
--- a/hw/xfree86/exa/exa.man.pre
+++ b/hw/xfree86/exa/exa.man.pre
@@ -31,12 +31,6 @@ Disables acceleration of downloading of pixmap data from the framebuffer.
 Not usable with drivers which rely on DownloadFromScreen succeeding.
 Default: No.
 .TP
-.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q
-Enables an additional optimization for migration of destination pixmaps. This
-may improve performance in some cases (e.g. when switching virtual desktops with
-no compositing manager) but causes corruption in others (e.g. when starting
-compiz). Default: No.
-.TP
 .BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
 Chooses an alternate pixmap migration heuristic, for debugging purposes.  The
 default is intended to be the best performing one for general use, though others
diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c
index e18da0a..4a8d8f2 100644
--- a/hw/xfree86/exa/examodule.c
+++ b/hw/xfree86/exa/examodule.c
@@ -145,7 +145,7 @@ exaDDXDriverInit(ScreenPtr pScreen)
 	pExaScr->optimize_migration =
 	    xf86ReturnOptValBool(pScreenPriv->options,
 				 EXAOPT_OPTIMIZE_MIGRATION,
-				 FALSE);
+				 TRUE);
     }
 
     if (xf86ReturnOptValBool(pScreenPriv->options,
@@ -179,13 +179,6 @@ exaDDXDriverInit(ScreenPtr pScreen)
     
 }
 
-/*ARGSUSED*/
-static const OptionInfoRec *
-EXAAvailableOptions(void *unused)
-{
-    return (EXAOptions);
-}
-
 static XF86ModuleVersionInfo exaVersRec =
 {
 	"exa",


Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -r1.346 -r1.347
--- xorg-x11-server.spec	3 Sep 2008 23:41:17 -0000	1.346
+++ xorg-x11-server.spec	10 Sep 2008 10:47:21 -0000	1.347
@@ -19,7 +19,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.5.0
-Release:   1%{?dist}
+Release:   2%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -44,7 +44,7 @@
 Patch100:  xorg-x11-server-1.1.0-no-move-damage.patch
 Patch101:  xserver-1.4.99-dont-backfill-bg-none.patch
 # XXX does this need rebasing still?
-#Patch102:  xserver-1.4.99-exa-master-upgrade.patch
+Patch102:  xserver-1.5.0-exa-master-upgrade.patch
 Patch103:  xserver-1.5.0-bg-none-root.patch
 
 # Red Hat specific tweaking, not intended for upstream
@@ -498,6 +498,9 @@
 
 
 %changelog
+* Wed Sep 10 2008 Dave Airlie <airlied at redhat.com> 1.5.0-2
+- bring master exa back
+
 * Wed Sep 03 2008 Adam Jackson <ajax at redhat.com> 1.5.0-1
 - xserver 1.5.0
 - Revert to the EXA from 1.5.0, should be good enough one hopes.




More information about the fedora-extras-commits mailing list