diff options
author | Dave Airlie <airlied@redhat.com> | 2009-07-28 13:32:31 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-07-28 13:32:31 +1000 |
commit | 44c8d148f8a68c13a65fc989adb09b1a675f1a2a (patch) | |
tree | cb3a878ba7af33bc5fd82f371994b4e5d5c316d1 | |
parent | e822477ae9cb0f7dd859a49e5da3f30993532ca5 (diff) |
neomagic: update for resources/RAC API removal
-rw-r--r-- | src/neo_driver.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/neo_driver.c b/src/neo_driver.c index 686fc05..29d003a 100644 --- a/src/neo_driver.c +++ b/src/neo_driver.c @@ -54,7 +54,11 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Everything using inb/outb, etc needs "compiler.h" */ #include "compiler.h" +#ifndef XSERVER_LIBPCIACCESS #include "xf86Resources.h" +/* Needed by Resources Access Control (RAC) */ +#include "xf86RAC.h" +#endif /* Drivers for PCI hardware need this */ #include "xf86PciInfo.h" @@ -81,9 +85,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "fb.h" -/* Needed by Resources Access Control (RAC) */ -#include "xf86RAC.h" - /* int10 */ #include "xf86int10.h" #include "vbe.h" @@ -687,7 +688,9 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) /* This is the general case */ for (i = 0; i<pScrn->numEntities; i++) { nPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[i]); +#ifndef XSERVER_LIBPCIACCESS if (nPtr->pEnt->resources) return FALSE; +#endif nPtr->NeoChipset = nPtr->pEnt->chipset; pScrn->chipset = (char *)xf86TokenToString(NEOChipsets, nPtr->pEnt->chipset); @@ -1171,11 +1174,15 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) nPtr->NeoMMIOAddr2); } } +#ifndef XSERVER_LIBPCIACCESS /* XXX What about VGA resources in OPERATING mode? */ if (xf86RegisterResources(nPtr->pEnt->index, NULL, ResExclusive)) RETURN; +#endif - } else if (nPtr->pEnt->location.type == BUS_ISA) { + } +#ifndef XSERVER_LIBPCIACCESS + else if (nPtr->pEnt->location.type == BUS_ISA) { unsigned int addr; resRange linearRes[] = { {ResExcMemBlock|ResBios|ResBus,0,0},_END }; @@ -1194,12 +1201,15 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags) "MMIO base address is set at 0x%lX.\n", nPtr->NeoMMIOAddr); } + linearRes[0].rBegin = nPtr->NeoLinearAddr; linearRes[1].rEnd = nPtr->NeoLinearAddr + nPtr->NeoFbMapSize - 1; if (xf86RegisterResources(nPtr->pEnt->index,linearRes,ResNone)) { nPtr->noLinear = TRUE; /* XXX */ } - } else + } +#endif + else RETURN; if (nPtr->pEnt->device->videoRam != 0) { @@ -1426,7 +1436,9 @@ NEOScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) int ret; VisualPtr visual; int allocatebase, freespace, currentaddr; +#ifndef XSERVER_LIBPCIACCESS unsigned int racflag = RAC_FB; +#endif unsigned char *FBStart; int height, width, displayWidth; @@ -1718,11 +1730,13 @@ NEOScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) CMAP_PALETTED_TRUECOLOR | CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE; +#ifndef XSERVER_LIBPCIACCESS racflag |= RAC_COLORMAP; if (nPtr->NeoHWCursorInitialized) racflag |= RAC_CURSOR; pScrn->racIoFlags = pScrn->racMemFlags = racflag; +#endif NEOInitVideo(pScreen); |