diff --git a/.cvsignore b/.cvsignore index c980ef0..525ff68 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xf86-video-vesa-1.3.0.tar.bz2 +xf86-video-vesa-20071113.tar.bz2 diff --git a/sources b/sources index c023643..ee06f0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a307852f3b4850e436a41dab2a73676 xf86-video-vesa-1.3.0.tar.bz2 +67b0db9408cdcb1a70111a567eaca701 xf86-video-vesa-20071113.tar.bz2 diff --git a/vesa-1.2.1-fix-shadowfb.patch b/vesa-1.2.1-fix-shadowfb.patch deleted file mode 100644 index 87ed376..0000000 --- a/vesa-1.2.1-fix-shadowfb.patch +++ /dev/null @@ -1,124 +0,0 @@ ---- 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; - - diff --git a/vesa-1.2.1-randr-crash.patch b/vesa-1.2.1-randr-crash.patch deleted file mode 100644 index 085045d..0000000 --- a/vesa-1.2.1-randr-crash.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- xf86-video-vesa-1.2.1/src/vesa.c.randr-crash 2006-06-03 05:46:00.000000000 -0400 -+++ xf86-video-vesa-1.2.1/src/vesa.c 2006-07-28 16:56:44.000000000 -0400 -@@ -1020,15 +1020,9 @@ - VESASwitchMode(int scrnIndex, DisplayModePtr pMode, int flags) - { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; -- VESAPtr pVesa = VESAGetRec(pScrn); - Bool ret; - -- if (pVesa->ModeSetClearScreen) -- pScrn->EnableDisableFBAccess(scrnIndex,FALSE); -- ret = VESASetMode(xf86Screens[scrnIndex], pMode); -- if (pVesa->ModeSetClearScreen) -- pScrn->EnableDisableFBAccess(scrnIndex,TRUE); -- return ret; -+ return VESASetMode(pScrn, pMode); - } - - /* Set a graphics mode */ diff --git a/vesa-1.2.1-validmode.patch b/vesa-1.2.1-validmode.patch deleted file mode 100644 index 5b2eebf..0000000 --- a/vesa-1.2.1-validmode.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- xf86-video-vesa-1.3.0/src/vesa.c.validmode 2007-01-24 19:29:16.000000000 -0500 -+++ xf86-video-vesa-1.3.0/src/vesa.c 2007-01-24 19:34:16.000000000 -0500 -@@ -273,6 +273,85 @@ - xf86PrintChipsets(VESA_NAME, "driver for VESA chipsets", VESAChipsets); - } - -+static VESAPtr -+VESAGetRec(ScrnInfoPtr pScrn) -+{ -+ if (!pScrn->driverPrivate) -+ pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1); -+ -+ return ((VESAPtr)pScrn->driverPrivate); -+} -+ -+static ModeStatus -+VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass) -+{ -+ static int warned = 0; -+ int found = 0; -+ ScrnInfoPtr pScrn = xf86Screens[scrn]; -+ VESAPtr pVesa = VESAGetRec(pScrn); -+ MonPtr mon = pScrn->monitor, vesamon = pVesa->monitor; -+ ModeStatus ret; -+ DisplayModePtr mode; -+ float v; -+ -+ pVesa = VESAGetRec(pScrn); -+ -+ if (pass != MODECHECK_FINAL) { -+ if (!warned) { -+ xf86DrvMsg(scrn, X_WARNING, "VESAValidMode called unexpectedly\n"); -+ warned = 1; -+ } -+ return MODE_OK; -+ } -+ -+ /* -+ * This is suboptimal. We pass in just the barest description of a mode -+ * we can get away with to VBEValidateModes, so it can't really throw -+ * out anything we give it. But we need to filter the list so that we -+ * don't populate the mode list with things the monitor can't do. -+ * -+ * So first off, if this isn't a mode we handed to the server (ie, -+ * M_T_BUILTIN), then we know we can't do it. -+ */ -+ if (!(p->type & M_T_BUILTIN)) -+ return MODE_NOMODE; -+ -+ /* -+ * Next, walk through the mode list from DDC (if any) and look for a -+ * matching resolution. -+ */ -+ if (pScrn->monitor->DDC) { -+ for (mode = pScrn->monitor->Modes; mode; mode = mode->next) { -+ if (mode->type & M_T_DRIVER && -+ mode->HDisplay == p->HDisplay && -+ mode->VDisplay == p->VDisplay) { -+ found = 1; -+ break; -+ } -+ if (mode == pScrn->monitor->Last) -+ break; -+ } -+ if (!found) -+ return MODE_NOMODE; -+ } -+ -+ /* -+ * Finally, walk through the vsync rates 1Hz at a time looking for a mode -+ * that will fit. This is assuredly a terrible way to do this, but -+ * there's no obvious method for computing a mode of a given size that -+ * will pass xf86CheckModeForMonitor. -+ */ -+ for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) { -+ mode = xf86CVTMode(p->HDisplay, p->VDisplay, v, 0, 0); -+ ret = xf86CheckModeForMonitor(mode, mon); -+ xfree(mode); -+ if (ret == MODE_OK) -+ break; -+ } -+ -+ return ret; -+} -+ - /* - * This function is called once, at the start of the first server generation to - * do a minimal probe for supported hardware. -@@ -318,6 +397,7 @@ - pScrn->PreInit = VESAPreInit; - pScrn->ScreenInit = VESAScreenInit; - pScrn->SwitchMode = VESASwitchMode; -+ pScrn->ValidMode = VESAValidMode; - pScrn->AdjustFrame = VESAAdjustFrame; - pScrn->EnterVT = VESAEnterVT; - pScrn->LeaveVT = VESALeaveVT; -@@ -391,15 +471,6 @@ - return (int)CHIP_VESA_GENERIC; - } - --static VESAPtr --VESAGetRec(ScrnInfoPtr pScrn) --{ -- if (!pScrn->driverPrivate) -- pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1); -- -- return ((VESAPtr)pScrn->driverPrivate); --} -- - static void - VESAFreeRec(ScrnInfoPtr pScrn) - { diff --git a/vesa-1.3.0-mode-heuristics.patch b/vesa-1.3.0-mode-heuristics.patch deleted file mode 100644 index b83ba8b..0000000 --- a/vesa-1.3.0-mode-heuristics.patch +++ /dev/null @@ -1,155 +0,0 @@ ---- xf86-video-vesa-1.3.0/src/vesa.h.validmode 2006-11-30 16:04:02.000000000 -0500 -+++ xf86-video-vesa-1.3.0/src/vesa.h 2007-03-20 14:39:31.000000000 -0400 -@@ -108,7 +108,7 @@ - CARD32 *pal, *savedPal; - CARD8 *fonts; - xf86MonPtr monitor; -- Bool shadowFB, primary; -+ Bool shadowFB, primary, strict_validation; - CARD32 windowAoffset; - /* Don't override the default refresh rate. */ - Bool defaultRefresh; ---- xf86-video-vesa-1.3.0/src/vesa.c.validmode 2007-01-24 19:34:19.000000000 -0500 -+++ xf86-video-vesa-1.3.0/src/vesa.c 2007-03-20 14:39:31.000000000 -0400 -@@ -273,6 +273,88 @@ - xf86PrintChipsets(VESA_NAME, "driver for VESA chipsets", VESAChipsets); - } - -+static VESAPtr -+VESAGetRec(ScrnInfoPtr pScrn) -+{ -+ if (!pScrn->driverPrivate) -+ pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1); -+ -+ return ((VESAPtr)pScrn->driverPrivate); -+} -+ -+static ModeStatus -+VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass) -+{ -+ static int warned = 0; -+ int found = 0; -+ ScrnInfoPtr pScrn = xf86Screens[scrn]; -+ VESAPtr pVesa = VESAGetRec(pScrn); -+ MonPtr mon = pScrn->monitor, vesamon = pVesa->monitor; -+ ModeStatus ret; -+ DisplayModePtr mode; -+ float v; -+ -+ pVesa = VESAGetRec(pScrn); -+ -+ if (pass != MODECHECK_FINAL) { -+ if (!warned) { -+ xf86DrvMsg(scrn, X_WARNING, "VESAValidMode called unexpectedly\n"); -+ warned = 1; -+ } -+ return MODE_OK; -+ } -+ -+ /* -+ * This is suboptimal. We pass in just the barest description of a mode -+ * we can get away with to VBEValidateModes, so it can't really throw -+ * out anything we give it. But we need to filter the list so that we -+ * don't populate the mode list with things the monitor can't do. -+ * -+ * So first off, if this isn't a mode we handed to the server (ie, -+ * M_T_BUILTIN), then we know we can't do it. -+ */ -+ if (!(p->type & M_T_BUILTIN)) -+ return MODE_NOMODE; -+ -+ /* -+ * Next, walk through the mode list from DDC (if any) and look for a -+ * matching resolution. Only do this on the first try though; on the -+ * second VBEValidateModes, let things through if they fit at all. -+ */ -+ if (pVesa->strict_validation) { -+ if (pScrn->monitor->DDC) { -+ for (mode = pScrn->monitor->Modes; mode; mode = mode->next) { -+ if (mode->type & M_T_DRIVER && -+ mode->HDisplay == p->HDisplay && -+ mode->VDisplay == p->VDisplay) { -+ found = 1; -+ break; -+ } -+ if (mode == pScrn->monitor->Last) -+ break; -+ } -+ if (!found) -+ return MODE_NOMODE; -+ } -+ } -+ -+ /* -+ * Finally, walk through the vsync rates 1Hz at a time looking for a mode -+ * that will fit. This is assuredly a terrible way to do this, but -+ * there's no obvious method for computing a mode of a given size that -+ * will pass xf86CheckModeForMonitor. -+ */ -+ for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) { -+ mode = xf86CVTMode(p->HDisplay, p->VDisplay, v, 0, 0); -+ ret = xf86CheckModeForMonitor(mode, mon); -+ xfree(mode); -+ if (ret == MODE_OK) -+ break; -+ } -+ -+ return ret; -+} -+ - /* - * This function is called once, at the start of the first server generation to - * do a minimal probe for supported hardware. -@@ -318,6 +400,7 @@ - pScrn->PreInit = VESAPreInit; - pScrn->ScreenInit = VESAScreenInit; - pScrn->SwitchMode = VESASwitchMode; -+ pScrn->ValidMode = VESAValidMode; - pScrn->AdjustFrame = VESAAdjustFrame; - pScrn->EnterVT = VESAEnterVT; - pScrn->LeaveVT = VESALeaveVT; -@@ -391,15 +474,6 @@ - return (int)CHIP_VESA_GENERIC; - } - --static VESAPtr --VESAGetRec(ScrnInfoPtr pScrn) --{ -- if (!pScrn->driverPrivate) -- pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1); -- -- return ((VESAPtr)pScrn->driverPrivate); --} -- - static void - VESAFreeRec(ScrnInfoPtr pScrn) - { -@@ -595,6 +669,7 @@ - - VBESetModeNames(pScrn->modePool); - -+ pVesa->strict_validation = TRUE; - i = VBEValidateModes(pScrn, NULL, pScrn->display->modes, - NULL, NULL, 0, 2048, 1, 0, 2048, - pScrn->display->virtualX, -@@ -602,6 +677,20 @@ - pVesa->mapSize, LOOKUP_BEST_REFRESH); - - if (i <= 0) { -+ DisplayModePtr mode; -+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, -+ "No valid modes left. Trying less strict filter...\n"); -+ for (mode = pScrn->monitor->Modes; mode; mode = mode->next) -+ mode->status = MODE_OK; -+ pVesa->strict_validation = FALSE; -+ i = VBEValidateModes(pScrn, NULL, pScrn->display->modes, -+ NULL, NULL, 0, 2048, 1, 0, 2048, -+ pScrn->display->virtualX, -+ pScrn->display->virtualY, -+ pVesa->mapSize, LOOKUP_BEST_REFRESH); -+ } -+ -+ if (i <= 0) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes\n"); - vbeFree(pVesa->pVbe); - return (FALSE); diff --git a/vesa-1.9-mode-heuristics.patch b/vesa-1.9-mode-heuristics.patch new file mode 100644 index 0000000..7b6eeb9 --- /dev/null +++ b/vesa-1.9-mode-heuristics.patch @@ -0,0 +1,157 @@ +diff -up xf86-video-vesa-20071113/src/vesa.c.mode-heuristics xf86-video-vesa-20071113/src/vesa.c +--- xf86-video-vesa-20071113/src/vesa.c.mode-heuristics 2007-11-13 18:02:17.000000000 -0500 ++++ xf86-video-vesa-20071113/src/vesa.c 2007-11-13 18:27:47.000000000 -0500 +@@ -296,6 +296,88 @@ VESAIdentify(int flags) + xf86PrintChipsets(VESA_NAME, "driver for VESA chipsets", VESAChipsets); + } + ++static VESAPtr ++VESAGetRec(ScrnInfoPtr pScrn) ++{ ++ if (!pScrn->driverPrivate) ++ pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1); ++ ++ return ((VESAPtr)pScrn->driverPrivate); ++} ++ ++static ModeStatus ++VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass) ++{ ++ static int warned = 0; ++ int found = 0; ++ ScrnInfoPtr pScrn = xf86Screens[scrn]; ++ VESAPtr pVesa = VESAGetRec(pScrn); ++ MonPtr mon = pScrn->monitor, vesamon = pVesa->monitor; ++ ModeStatus ret; ++ DisplayModePtr mode; ++ float v; ++ ++ pVesa = VESAGetRec(pScrn); ++ ++ if (pass != MODECHECK_FINAL) { ++ if (!warned) { ++ xf86DrvMsg(scrn, X_WARNING, "VESAValidMode called unexpectedly\n"); ++ warned = 1; ++ } ++ return MODE_OK; ++ } ++ ++ /* ++ * This is suboptimal. We pass in just the barest description of a mode ++ * we can get away with to VBEValidateModes, so it can't really throw ++ * out anything we give it. But we need to filter the list so that we ++ * don't populate the mode list with things the monitor can't do. ++ * ++ * So first off, if this isn't a mode we handed to the server (ie, ++ * M_T_BUILTIN), then we know we can't do it. ++ */ ++ if (!(p->type & M_T_BUILTIN)) ++ return MODE_NOMODE; ++ ++ /* ++ * Next, walk through the mode list from DDC (if any) and look for a ++ * matching resolution. Only do this on the first try though; on the ++ * second VBEValidateModes, let things through if they fit at all. ++ */ ++ if (pVesa->strict_validation) { ++ if (pScrn->monitor->DDC) { ++ for (mode = pScrn->monitor->Modes; mode; mode = mode->next) { ++ if (mode->type & M_T_DRIVER && ++ mode->HDisplay == p->HDisplay && ++ mode->VDisplay == p->VDisplay) { ++ found = 1; ++ break; ++ } ++ if (mode == pScrn->monitor->Last) ++ break; ++ } ++ if (!found) ++ return MODE_NOMODE; ++ } ++ } ++ ++ /* ++ * Finally, walk through the vsync rates 1Hz at a time looking for a mode ++ * that will fit. This is assuredly a terrible way to do this, but ++ * there's no obvious method for computing a mode of a given size that ++ * will pass xf86CheckModeForMonitor. ++ */ ++ for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) { ++ mode = xf86CVTMode(p->HDisplay, p->VDisplay, v, 0, 0); ++ ret = xf86CheckModeForMonitor(mode, mon); ++ xfree(mode); ++ if (ret == MODE_OK) ++ break; ++ } ++ ++ return ret; ++} ++ + /* + * This function is called once, at the start of the first server generation to + * do a minimal probe for supported hardware. +@@ -373,6 +455,7 @@ VESAProbe(DriverPtr drv, int flags) + pScrn->PreInit = VESAPreInit; + pScrn->ScreenInit = VESAScreenInit; + pScrn->SwitchMode = VESASwitchMode; ++ pScrn->ValidMode = VESAValidMode; + pScrn->AdjustFrame = VESAAdjustFrame; + pScrn->EnterVT = VESAEnterVT; + pScrn->LeaveVT = VESALeaveVT; +@@ -447,15 +530,6 @@ VESAFindIsaDevice(GDevPtr dev) + return (int)CHIP_VESA_GENERIC; + } + +-static VESAPtr +-VESAGetRec(ScrnInfoPtr pScrn) +-{ +- if (!pScrn->driverPrivate) +- pScrn->driverPrivate = xcalloc(sizeof(VESARec), 1); +- +- return ((VESAPtr)pScrn->driverPrivate); +-} +- + static void + VESAFreeRec(ScrnInfoPtr pScrn) + { +@@ -650,6 +724,7 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags + + VBESetModeNames(pScrn->modePool); + ++ pVesa->strict_validation = TRUE; + i = VBEValidateModes(pScrn, NULL, pScrn->display->modes, + NULL, NULL, 0, 2048, 1, 0, 2048, + pScrn->display->virtualX, +@@ -657,6 +732,20 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags + pVesa->mapSize, LOOKUP_BEST_REFRESH); + + if (i <= 0) { ++ DisplayModePtr mode; ++ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, ++ "No valid modes left. Trying less strict filter...\n"); ++ for (mode = pScrn->monitor->Modes; mode; mode = mode->next) ++ mode->status = MODE_OK; ++ pVesa->strict_validation = FALSE; ++ i = VBEValidateModes(pScrn, NULL, pScrn->display->modes, ++ NULL, NULL, 0, 2048, 1, 0, 2048, ++ pScrn->display->virtualX, ++ pScrn->display->virtualY, ++ pVesa->mapSize, LOOKUP_BEST_REFRESH); ++ } ++ ++ if (i <= 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes\n"); + vbeFree(pVesa->pVbe); + return (FALSE); +diff -up xf86-video-vesa-20071113/src/vesa.h.mode-heuristics xf86-video-vesa-20071113/src/vesa.h +--- xf86-video-vesa-20071113/src/vesa.h.mode-heuristics 2007-11-13 18:02:17.000000000 -0500 ++++ xf86-video-vesa-20071113/src/vesa.h 2007-11-13 18:28:23.000000000 -0500 +@@ -116,7 +116,7 @@ typedef struct _VESARec + CARD32 *pal, *savedPal; + CARD8 *fonts; + xf86MonPtr monitor; +- Bool shadowFB; ++ Bool shadowFB, strict_validation; + CARD32 windowAoffset; + /* Don't override the default refresh rate. */ + Bool defaultRefresh; diff --git a/vesa-1.9-no-legacy-fb.patch b/vesa-1.9-no-legacy-fb.patch new file mode 100644 index 0000000..bfc8723 --- /dev/null +++ b/vesa-1.9-no-legacy-fb.patch @@ -0,0 +1,119 @@ +From a1fbfb880dc51c81bf5dadd20aa9a166e59e4269 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 13 Nov 2007 18:25:28 -0500 +Subject: [PATCH] Nuke legacy fb support. + +--- + src/vesa.c | 48 ++---------------------------------------------- + src/vesa.h | 8 -------- + 2 files changed, 2 insertions(+), 54 deletions(-) + +diff --git a/src/vesa.c b/src/vesa.c +index e4e6547..0079cd0 100644 +--- a/src/vesa.c ++++ b/src/vesa.c +@@ -181,16 +181,6 @@ static const OptionInfoRec VESAOptions[] = { + * xf86LoaderReqSymLists(). The purpose is this is to avoid warnings about + * unresolved symbols that are not required. + */ +-#ifdef XFree86LOADER +-static const char *miscfbSymbols[] = { +- "xf1bppScreenInit", +- "xf4bppScreenInit", +-#ifdef USE_AFB +- "afbScreenInit", +-#endif +- NULL +-}; +-#endif + + static const char *fbSymbols[] = { + "fbPictureInit", +@@ -268,8 +258,7 @@ vesaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) + { + Initialised = TRUE; + xf86AddDriver(&VESA, Module, 1); +- LoaderRefSymLists(miscfbSymbols, +- fbSymbols, ++ LoaderRefSymLists(fbSymbols, + shadowSymbols, + vbeSymbols, + ddcSymbols, +@@ -729,23 +718,9 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags) + } + else { + switch (pScrn->bitsPerPixel) { +- case 1: +- mod = "xf1bpp"; +- reqSym = "xf1bppScreenInit"; +- break; +- case 4: +- mod = "xf4bpp"; +- reqSym = "xf4bppScreenInit"; +- break; + default: +-#ifdef USE_AFB +- mod = "afb"; +- reqSym = "afbScreenInit"; +- break; +-#else + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unsupported bpp: %d", pScrn->bitsPerPixel); +-#endif + } + } + break; +@@ -921,28 +896,9 @@ VESAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + return (FALSE); + case 0x3: /* Planar */ + switch (pScrn->bitsPerPixel) { +- case 1: +- if (!xf1bppScreenInit(pScreen, pVesa->base, +- pScrn->virtualX, pScrn->virtualY, +- pScrn->xDpi, pScrn->yDpi, +- pScrn->displayWidth)) +- return (FALSE); +- break; +- case 4: +- if (!xf4bppScreenInit(pScreen, pVesa->base, +- pScrn->virtualX, pScrn->virtualY, +- pScrn->xDpi, pScrn->yDpi, +- pScrn->displayWidth)) +- return (FALSE); +- break; + default: +-#ifdef USE_AFB +- if (!afbScreenInit(pScreen, pVesa->base, +- pScrn->virtualX, pScrn->virtualY, +- pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) +-#endif + return (FALSE); +- break; ++ break; + } + break; + case 0x4: /* Packed pixel */ +diff --git a/src/vesa.h b/src/vesa.h +index 0705d76..6c5b8c0 100644 +--- a/src/vesa.h ++++ b/src/vesa.h +@@ -69,16 +69,8 @@ + #include "xf86Resources.h" + #include "xf86RAC.h" + +-#include "xf1bpp.h" +-#include "xf4bpp.h" + #include "fb.h" + +-#ifdef USE_AFB +-#include "afb.h" +-#endif +- +-#include "mfb.h" +- + #ifdef XSERVER_LIBPCIACCESS + #include + #endif +-- +1.5.3.4 + diff --git a/xorg-x11-drv-vesa.spec b/xorg-x11-drv-vesa.spec index 8860a2d..3fd83e4 100644 --- a/xorg-x11-drv-vesa.spec +++ b/xorg-x11-drv-vesa.spec @@ -2,37 +2,41 @@ %define moduledir %(pkg-config xorg-server --variable=moduledir ) %define driverdir %{moduledir}/drivers +%define gitdate 20071113 + Summary: Xorg X11 vesa video driver Name: xorg-x11-drv-vesa Version: 1.3.0 -Release: 10%{?dist} +Release: 11.%{gitdate}%{?dist} URL: http://www.x.org -Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2 +Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{gitdate}.tar.bz2 License: MIT Group: User Interface/X Hardware Support BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: s390 s390x -Patch0: vesa-1.2.1-randr-crash.patch -Patch1: vesa-1.3.0-mode-heuristics.patch +Patch1: vesa-1.9-mode-heuristics.patch Patch2: vesa-1.3.0-range-hack.patch +Patch3: vesa-1.9-no-legacy-fb.patch -BuildRequires: xorg-x11-server-sdk >= 1.3.0.0-6 +BuildRequires: xorg-x11-server-sdk >= 1.4.99.1 +BuildRequires: autoconf automake libtool -Requires: xorg-x11-server-Xorg >= 1.3.0.0-6 +Requires: xorg-x11-server-Xorg >= 1.4.99.1 %description X.Org X11 vesa video driver. %prep -%setup -q -n %{tarball}-%{version} +%setup -q -n %{tarball}-%{gitdate} -%patch0 -p1 -b .randr-crash %patch1 -p1 -b .mode-heuristics %patch2 -p1 -b .range-hack +%patch3 -p1 -b .legacy %build +autoreconf -v --install || exit 1 %configure --disable-static make @@ -54,6 +58,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/vesa.4* %changelog +* Tue Nov 13 2007 Adam Jackson 1.3.0-11.20071113 +- Update to git snapshot for pciaccess goodness. +- Rip out legacy framebuffer support. + * Thu Aug 23 2007 Adam Jackson - 1.3.0-10 - Rebuild for ppc toolchain bug