| diff -rup xf86-video-vesa-2.3.0.orig/src/vesa.c xf86-video-vesa-2.3.0.work/src/vesa.c |
| --- xf86-video-vesa-2.3.0.orig/src/vesa.c 2010-01-04 11:19:13.000000000 -0800 |
| +++ xf86-video-vesa-2.3.0.work/src/vesa.c 2011-03-08 11:06:58.264579000 -0800 |
| @@ -143,8 +143,6 @@ vesaUpdatePacked(ScreenPtr pScreen, shad |
| shadowUpdatePacked(pScreen, pBuf); |
| } |
| |
| -static Bool VESADGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen); |
| - |
| enum GenericTypes |
| { |
| CHIP_VESA_GENERIC |
| @@ -1050,8 +1048,6 @@ VESAScreenInit(int scrnIndex, ScreenPtr |
| return FALSE; |
| } |
| |
| - VESADGAInit(pScrn, pScreen); |
| - |
| xf86SetBlackWhitePixels(pScreen); |
| miInitializeBackingStore(pScreen); |
| xf86SetBackingStore(pScreen); |
| @@ -1121,11 +1117,6 @@ VESACloseScreen(int scrnIndex, ScreenPtr |
| shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen)); |
| xfree(pVesa->shadow); |
| } |
| - if (pVesa->pDGAMode) { |
| - xfree(pVesa->pDGAMode); |
| - pVesa->pDGAMode = NULL; |
| - pVesa->nDGAMode = 0; |
| - } |
| pScrn->vtSema = FALSE; |
| |
| pScrn->EnableDisableFBAccess = pVesa->EnableDisableFBAccess; |
| @@ -1652,143 +1643,3 @@ VESADisplayPowerManagementSet(ScrnInfoPt |
| VBEDPMSSet(pVesa->pVbe, mode); |
| } |
| |
| -/*********************************************************************** |
| - * DGA stuff |
| - ***********************************************************************/ |
| -static Bool VESADGAOpenFramebuffer(ScrnInfoPtr pScrn, char **DeviceName, |
| - unsigned char **ApertureBase, |
| - int *ApertureSize, int *ApertureOffset, |
| - int *flags); |
| -static Bool VESADGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode); |
| -static void VESADGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags); |
| - |
| -static Bool |
| -VESADGAOpenFramebuffer(ScrnInfoPtr pScrn, char **DeviceName, |
| - unsigned char **ApertureBase, int *ApertureSize, |
| - int *ApertureOffset, int *flags) |
| -{ |
| - VESAPtr pVesa = VESAGetRec(pScrn); |
| - |
| - *DeviceName = NULL; /* No special device */ |
| - *ApertureBase = (unsigned char *)(long)(pVesa->mapPhys); |
| - *ApertureSize = pVesa->mapSize; |
| - *ApertureOffset = pVesa->mapOff; |
| - *flags = DGA_NEED_ROOT; |
| - |
| - return (TRUE); |
| -} |
| - |
| -static Bool |
| -VESADGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode) |
| -{ |
| - DisplayModePtr pMode; |
| - int scrnIdx = pScrn->pScreen->myNum; |
| - int frameX0, frameY0; |
| - |
| - if (pDGAMode) { |
| - pMode = pDGAMode->mode; |
| - frameX0 = frameY0 = 0; |
| - } |
| - else { |
| - if (!(pMode = pScrn->currentMode)) |
| - return (TRUE); |
| - |
| - frameX0 = pScrn->frameX0; |
| - frameY0 = pScrn->frameY0; |
| - } |
| - |
| - if (!(*pScrn->SwitchMode)(scrnIdx, pMode, 0)) |
| - return (FALSE); |
| - (*pScrn->AdjustFrame)(scrnIdx, frameX0, frameY0, 0); |
| - |
| - return (TRUE); |
| -} |
| - |
| -static void |
| -VESADGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) |
| -{ |
| - (*pScrn->AdjustFrame)(pScrn->pScreen->myNum, x, y, flags); |
| -} |
| - |
| -static int |
| -VESADGAGetViewport(ScrnInfoPtr pScrn) |
| -{ |
| - return (0); |
| -} |
| - |
| -static DGAFunctionRec VESADGAFunctions = |
| -{ |
| - VESADGAOpenFramebuffer, |
| - NULL, /* CloseFramebuffer */ |
| - VESADGASetMode, |
| - VESADGASetViewport, |
| - VESADGAGetViewport, |
| - NULL, /* Sync */ |
| - NULL, /* FillRect */ |
| - NULL, /* BlitRect */ |
| - NULL, /* BlitTransRect */ |
| -}; |
| - |
| -static void |
| -VESADGAAddModes(ScrnInfoPtr pScrn) |
| -{ |
| - VESAPtr pVesa = VESAGetRec(pScrn); |
| - DisplayModePtr pMode = pScrn->modes; |
| - DGAModePtr pDGAMode; |
| - |
| - do { |
| - pDGAMode = xrealloc(pVesa->pDGAMode, |
| - (pVesa->nDGAMode + 1) * sizeof(DGAModeRec)); |
| - if (!pDGAMode) |
| - break; |
| - |
| - pVesa->pDGAMode = pDGAMode; |
| - pDGAMode += pVesa->nDGAMode; |
| - (void)memset(pDGAMode, 0, sizeof(DGAModeRec)); |
| - |
| - ++pVesa->nDGAMode; |
| - pDGAMode->mode = pMode; |
| - pDGAMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE; |
| - pDGAMode->byteOrder = pScrn->imageByteOrder; |
| - pDGAMode->depth = pScrn->depth; |
| - pDGAMode->bitsPerPixel = pScrn->bitsPerPixel; |
| - pDGAMode->red_mask = pScrn->mask.red; |
| - pDGAMode->green_mask = pScrn->mask.green; |
| - pDGAMode->blue_mask = pScrn->mask.blue; |
| - pDGAMode->visualClass = pScrn->bitsPerPixel > 8 ? |
| - TrueColor : PseudoColor; |
| - pDGAMode->xViewportStep = 1; |
| - pDGAMode->yViewportStep = 1; |
| - pDGAMode->viewportWidth = pMode->HDisplay; |
| - pDGAMode->viewportHeight = pMode->VDisplay; |
| - |
| - pDGAMode->bytesPerScanline = pVesa->maxBytesPerScanline; |
| - pDGAMode->imageWidth = pMode->HDisplay; |
| - pDGAMode->imageHeight = pMode->VDisplay; |
| - pDGAMode->pixmapWidth = pDGAMode->imageWidth; |
| - pDGAMode->pixmapHeight = pDGAMode->imageHeight; |
| - pDGAMode->maxViewportX = pScrn->virtualX - |
| - pDGAMode->viewportWidth; |
| - pDGAMode->maxViewportY = pScrn->virtualY - |
| - pDGAMode->viewportHeight; |
| - |
| - pDGAMode->address = pVesa->base; |
| - |
| - pMode = pMode->next; |
| - } while (pMode != pScrn->modes); |
| -} |
| - |
| -static Bool |
| -VESADGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen) |
| -{ |
| - VESAPtr pVesa = VESAGetRec(pScrn); |
| - |
| - if (pScrn->depth < 8 || pVesa->mapPhys == 0xa0000L) |
| - return (FALSE); |
| - |
| - if (!pVesa->nDGAMode) |
| - VESADGAAddModes(pScrn); |
| - |
| - return (DGAInit(pScreen, &VESADGAFunctions, |
| - pVesa->pDGAMode, pVesa->nDGAMode)); |
| -} |
| Only in xf86-video-vesa-2.3.0.work/src: vesa.c~ |
| diff -rup xf86-video-vesa-2.3.0.orig/src/vesa.h xf86-video-vesa-2.3.0.work/src/vesa.h |
| --- xf86-video-vesa-2.3.0.orig/src/vesa.h 2010-01-04 11:19:13.000000000 -0800 |
| +++ xf86-video-vesa-2.3.0.work/src/vesa.h 2011-03-08 11:01:24.443622000 -0800 |
| @@ -64,9 +64,6 @@ |
| /* Int 10 support */ |
| #include "xf86int10.h" |
| |
| -/* Dga definitions */ |
| -#include "dgaproc.h" |
| - |
| #include "fb.h" |
| |
| #ifdef XSERVER_LIBPCIACCESS |
| @@ -108,9 +105,6 @@ typedef struct _VESARec |
| CARD32 windowAoffset; |
| /* Don't override the default refresh rate. */ |
| Bool defaultRefresh; |
| - /* DGA info */ |
| - DGAModePtr pDGAMode; |
| - int nDGAMode; |
| CloseScreenProcPtr CloseScreen; |
| CreateScreenResourcesProcPtr CreateScreenResources; |
| xf86EnableDisableFBAccessProc *EnableDisableFBAccess; |
| Only in xf86-video-vesa-2.3.0.work/src: vesa.h~ |