diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2015-05-23 15:40:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2015-05-23 15:40:27 +0000 |
commit | 85c838ab948ff2772025e117817a7d97eed05771 (patch) | |
tree | fdaf9d80730e9514abffdf1f98ea56d2e86e2983 /driver/xf86-video-neomagic/src | |
parent | 0b3ac33516aace197ffaa85bbb5daba171ebc248 (diff) |
Update to xf86-video-neomagic 1.2.9
Diffstat (limited to 'driver/xf86-video-neomagic/src')
-rw-r--r-- | driver/xf86-video-neomagic/src/neo_driver.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/driver/xf86-video-neomagic/src/neo_driver.c b/driver/xf86-video-neomagic/src/neo_driver.c index 7e60f3eeb..62d674263 100644 --- a/driver/xf86-video-neomagic/src/neo_driver.c +++ b/driver/xf86-video-neomagic/src/neo_driver.c @@ -636,7 +636,7 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) int apertureSize; Bool height_480 = FALSE; Bool lcdCenterOptSet = FALSE; - char *s; + const char *s; if (flags & PROBE_DETECT) { neoProbeDDC( pScrn, xf86GetEntityInfo(pScrn->entityList[0])->index ); @@ -1439,6 +1439,12 @@ NEOShadowInit(ScreenPtr pScreen) return TRUE; } +static Bool +NEOSaveScreen(ScreenPtr pScreen, int mode) +{ + return vgaHWSaveScreen(pScreen, mode); +} + /* Mandatory */ static Bool NEOScreenInit(SCREEN_INIT_ARGS_DECL) @@ -1712,7 +1718,7 @@ NEOScreenInit(SCREEN_INIT_ARGS_DECL) NEOInitVideo(pScreen); - pScreen->SaveScreen = vgaHWSaveScreenWeak(); + pScreen->SaveScreen = NEOSaveScreen; /* Setup DPMS mode */ if (nPtr->NeoChipset != NM2070) @@ -1988,10 +1994,12 @@ neoMapMem(ScrnInfoPtr pScrn) } #endif } else +#ifdef VIDMEM_MMIO nPtr->NeoMMIOBase = xf86MapVidMem(pScrn->scrnIndex, VIDMEM_MMIO, nPtr->NeoMMIOAddr, 0x200000L); +#endif if (nPtr->NeoMMIOBase == NULL) return FALSE; } @@ -2018,10 +2026,12 @@ neoMapMem(ScrnInfoPtr pScrn) } #endif else +#ifdef VIDMEM_FRAMEBUFFER nPtr->NeoFbBase = xf86MapVidMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER, (unsigned long)nPtr->NeoLinearAddr, nPtr->NeoFbMapSize); +#endif if (nPtr->NeoFbBase == NULL) return FALSE; return TRUE; @@ -3049,6 +3059,12 @@ neo_ddc1Read(ScrnInfoPtr pScrn) return (tmp); } +static void +neo_ddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) +{ + vgaHWddc1SetSpeed(pScrn, speed); +} + static xf86MonPtr neo_ddc1(ScrnInfoPtr pScrn) { @@ -3063,7 +3079,7 @@ neo_ddc1(ScrnInfoPtr pScrn) VGAwCR(0x21,0x00); VGAwCR(0x1D,0x01); /* some Voodoo */ VGAwGR(0xA1,0x2F); - ret = xf86DoEDID_DDC1(XF86_SCRN_ARG(pScrn),vgaHWddc1SetSpeedWeak(),neo_ddc1Read); + ret = xf86DoEDID_DDC1(XF86_SCRN_ARG(pScrn),neo_ddc1SetSpeed,neo_ddc1Read); /* undo initialization */ VGAwCR(0x21,reg1); VGAwCR(0x1D,reg2); |