xf86-video-vesa 1.3.0 from X.Org 7.2RC3
This commit is contained in:
parent
0475110e4b
commit
485391e465
@ -22,7 +22,7 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-video-vesa],
|
||||
1.2.2,
|
||||
1.3.0,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-video-vesa)
|
||||
|
||||
|
@ -746,6 +746,23 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -788,6 +805,16 @@ VESAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
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 @@ VESAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
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 @@ VESAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
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 @@ VESACloseScreen(int scrnIndex, ScreenPtr pScreen)
|
||||
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 @@ VESACloseScreen(int scrnIndex, ScreenPtr pScreen)
|
||||
}
|
||||
pScrn->vtSema = FALSE;
|
||||
|
||||
pScreen->CreateScreenResources = pVesa->CreateScreenResources;
|
||||
pScreen->CloseScreen = pVesa->CloseScreen;
|
||||
return pScreen->CloseScreen(scrnIndex, pScreen);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@
|
||||
#define VESA_NAME "VESA"
|
||||
#define VESA_DRIVER_NAME "vesa"
|
||||
#define VESA_MAJOR_VERSION 1
|
||||
#define VESA_MINOR_VERSION 2
|
||||
#define VESA_MINOR_VERSION 3
|
||||
#define VESA_PATCHLEVEL 0
|
||||
|
||||
/*XXX*/
|
||||
@ -116,9 +116,13 @@ typedef struct _VESARec
|
||||
DGAModePtr pDGAMode;
|
||||
int nDGAMode;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
OptionInfoPtr Options;
|
||||
IOADDRESS ioBase;
|
||||
Bool ModeSetClearScreen;
|
||||
void *shadow;
|
||||
ShadowUpdateProc update;
|
||||
ShadowWindowProc window;
|
||||
} VESARec, *VESAPtr;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user