rpms/xorg-x11-drv-vesa/devel vesa-1.2.1-fix-shadowfb.patch, NONE, 1.1 xorg-x11-drv-vesa.spec, 1.15, 1.16
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Sep 19 23:16:14 UTC 2006
Author: ajackson
Update of /cvs/dist/rpms/xorg-x11-drv-vesa/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv29952
Modified Files:
xorg-x11-drv-vesa.spec
Added Files:
vesa-1.2.1-fix-shadowfb.patch
Log Message:
* Tue Sep 19 2006 Adam Jackson <ajackson at redhat.com> 1.2.1-3
- vesa-1.2.1-fix-shadowfb.patch: Fix massive performance regression relative
to FC5.
vesa-1.2.1-fix-shadowfb.patch:
vesa.c | 55 ++++++++++++++++++++++++++++++++++++++++++-------------
vesa.h | 4 ++++
2 files changed, 46 insertions(+), 13 deletions(-)
--- NEW FILE vesa-1.2.1-fix-shadowfb.patch ---
--- xf86-video-vesa-1.2.1/src/vesa.c.shadowfb 2006-09-19 15:22:36.000000000 -0400
+++ xf86-video-vesa-1.2.1/src/vesa.c 2006-09-19 15:25:02.000000000 -0400
@@ -747,6 +747,23 @@
}
static Bool
+vesaCreateScreenResources(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ VESAPtr pVesa = VESAGetRec(pScrn);
+ Bool ret;
+
+ pScreen->CreateScreenResources = pVesa->CreateScreenResources;
+ ret = pScreen->CreateScreenResources(pScreen);
+ pScreen->CreateScreenResources = vesaCreateScreenResources;
+
+ shadowAdd(pScreen, pScreen->GetScreenPixmap(pScreen), pVesa->update,
+ pVesa->window, 0, 0);
+
+ return ret;
+}
+
+static Bool
VESAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
@@ -788,6 +805,16 @@
if (pVesa->shadowFB && pScrn->bitsPerPixel == 4)
pScrn->bitsPerPixel = 8;
+ if (pVesa->shadowFB) {
+ pVesa->shadow = xcalloc(1, pScrn->displayWidth * pScrn->virtualY *
+ ((pScrn->bitsPerPixel + 7) / 8));
+ if (!pVesa->shadow) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to allocate shadow buffer\n");
+ return FALSE;
+ }
+ }
+
/* save current video state */
VESASaveRestore(pScrn, MODE_SAVE);
pVesa->savedPal = VBESetGetPaletteData(pVesa->pVbe, FALSE, 0, 256,
@@ -865,7 +892,7 @@
case 24:
case 32:
if (!fbScreenInit(pScreen,
- pVesa->base,
+ pVesa->shadowFB ? pVesa->shadow : pVesa->base,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth, pScrn->bitsPerPixel))
@@ -901,27 +928,26 @@
fbPictureInit(pScreen, 0, 0);
if (pVesa->shadowFB) {
- ShadowUpdateProc update;
- ShadowWindowProc window;
-
if (mode->MemoryModel == 3) { /* Planar */
if (pScrn->bitsPerPixel == 8)
- update = shadowUpdatePlanar4x8Weak();
+ pVesa->update = shadowUpdatePlanar4x8Weak();
else
- update = shadowUpdatePlanar4Weak();
- window = VESAWindowPlanar;
+ pVesa->update = shadowUpdatePlanar4Weak();
+ pVesa->window = VESAWindowPlanar;
}
else if (pVesa->mapPhys == 0xa0000) { /* Windowed */
- update = shadowUpdatePackedWeak();
- window = VESAWindowWindowed;
+ pVesa->update = shadowUpdatePackedWeak();
+ pVesa->window = VESAWindowWindowed;
}
else { /* Linear */
- update = shadowUpdatePackedWeak();
- window = VESAWindowLinear;
+ pVesa->update = shadowUpdatePackedWeak();
+ pVesa->window = VESAWindowLinear;
}
- if (!shadowInit(pScreen, update, window))
- return (FALSE);
+ if (!shadowSetup(pScreen))
+ return FALSE;
+ pVesa->CreateScreenResources = pScreen->CreateScreenResources;
+ pScreen->CreateScreenResources = vesaCreateScreenResources;
}
else if (pVesa->mapPhys == 0xa0000 && mode->MemoryModel != 0x3) {
unsigned int bankShift = 0;
@@ -1005,6 +1031,8 @@
pVesa->savedPal, FALSE, TRUE);
VESAUnmapVidMem(pScrn);
}
+ if (pVesa->shadowFB && pVesa->shadow)
+ xfree(pVesa->shadow);
if (pVesa->pDGAMode) {
xfree(pVesa->pDGAMode);
pVesa->pDGAMode = NULL;
@@ -1012,6 +1040,7 @@
}
pScrn->vtSema = FALSE;
+ pScreen->CreateScreenResources = pVesa->CreateScreenResources;
pScreen->CloseScreen = pVesa->CloseScreen;
return pScreen->CloseScreen(scrnIndex, pScreen);
}
--- xf86-video-vesa-1.2.1/src/vesa.h.shadowfb 2006-06-03 05:46:00.000000000 -0400
+++ xf86-video-vesa-1.2.1/src/vesa.h 2006-09-19 15:25:03.000000000 -0400
@@ -116,9 +116,13 @@
DGAModePtr pDGAMode;
int nDGAMode;
CloseScreenProcPtr CloseScreen;
+ CreateScreenResourcesProcPtr CreateScreenResources;
OptionInfoPtr Options;
IOADDRESS ioBase;
Bool ModeSetClearScreen;
+ void *shadow;
+ ShadowUpdateProc update;
+ ShadowWindowProc window;
} VESARec, *VESAPtr;
Index: xorg-x11-drv-vesa.spec
===================================================================
RCS file: /cvs/dist/rpms/xorg-x11-drv-vesa/devel/xorg-x11-drv-vesa.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- xorg-x11-drv-vesa.spec 28 Jul 2006 21:06:35 -0000 1.15
+++ xorg-x11-drv-vesa.spec 19 Sep 2006 23:16:12 -0000 1.16
@@ -17,6 +17,7 @@
ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 alpha sparc sparc64
Patch0: vesa-1.2.1-randr-crash.patch
+Patch1: vesa-1.2.1-fix-shadowfb.patch
BuildRequires: pkgconfig
BuildRequires: xorg-x11-server-sdk >= 1.1.0-1
@@ -30,6 +31,7 @@
%setup -q -n %{tarball}-%{version}
%patch0 -p1 -b .randr-crash
+%patch1 -p1 -b .shadowfb
%build
%configure --disable-static
@@ -56,6 +58,10 @@
%{_mandir}/man4/vesa.4*
%changelog
+* Tue Sep 19 2006 Adam Jackson <ajackson at redhat.com> 1.2.1-3
+- vesa-1.2.1-fix-shadowfb.patch: Fix massive performance regression relative
+ to FC5.
+
* Fri Jul 28 2006 Adam Jackson <ajackson at redhat.com> 1.2.1-2
- vesa-1.2.1-randr-crash.patch: Fix a RANDR crash.
More information about the fedora-cvs-commits
mailing list