diff options
author | Dave Airlie <airlied@redhat.com> | 2009-07-28 13:32:39 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-07-28 13:32:39 +1000 |
commit | 314cb60172135abb5efe40fd0a0e6837f2662780 (patch) | |
tree | 7831cc9bbd94f6adf81e1ebb53e79e29de035c2c | |
parent | 6ef2f6e2e7628311e25d2fe35452372cd03bfb57 (diff) |
trident: update for resources/RAC API removal
-rw-r--r-- | src/trident_driver.c | 15 | ||||
-rw-r--r-- | src/trident_shadow.c | 1 | ||||
-rw-r--r-- | src/trident_video.c | 1 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/trident_driver.c b/src/trident_driver.c index 79afa2f..e745069 100644 --- a/src/trident_driver.c +++ b/src/trident_driver.c @@ -39,12 +39,15 @@ #include "micmap.h" #include "xf86.h" #include "xf86_OSproc.h" +#ifndef XSERVER_LIBPCIACCESS #include "xf86Resources.h" +#include "xf86RAC.h" +#endif #include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86cmap.h" #include "vgaHW.h" -#include "xf86RAC.h" + #include "vbe.h" #include "dixstruct.h" #include "compiler.h" @@ -1016,7 +1019,9 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) /* This is the general case */ for (i = 0; i<pScrn->numEntities; i++) { pTrident->pEnt = xf86GetEntityInfo(pScrn->entityList[i]); +#ifndef XSERVER_LIBPCIACCESS if (pTrident->pEnt->resources) return FALSE; +#endif pTrident->Chipset = pTrident->pEnt->chipset; pScrn->chipset = (char *)xf86TokenToString(TRIDENTChipsets, pTrident->pEnt->chipset); @@ -1105,7 +1110,9 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) vgaIOBase = hwp->IOBase; pTrident->PIOBase = hwp->PIOOffset; +#ifndef XSERVER_LIBPCIACCESS xf86SetOperatingState(resVga, pTrident->pEnt->index, ResUnusedOpr); +#endif /* The ramdac module should be loaded here when needed */ if (!xf86LoadSubModule(pScrn, "ramdac")) @@ -1447,13 +1454,14 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) (unsigned long)pTrident->IOAddress); } +#ifndef XSERVER_LIBPCIACCESS /* Register the PCI-assigned resources. */ if (xf86RegisterResources(pTrident->pEnt->index, NULL, ResExclusive)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "xf86RegisterResources() found resource conflicts\n"); return FALSE; } - +#endif /* Initialize VBE if possible * Don't move this past MMIO enable!! * PIO access will be blocked @@ -2432,13 +2440,14 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) TRIDENTUnmapMem(pScrn); } +#ifndef XSERVER_LIBPCIACCESS pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; if (pTrident->IsCyber && pTrident->MMIOonly) pScrn->racIoFlags = 0; else pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; - +#endif pTrident->FbMapSize = pScrn->videoRam * 1024; return TRUE; diff --git a/src/trident_shadow.c b/src/trident_shadow.c index d2169c8..6a86f7c 100644 --- a/src/trident_shadow.c +++ b/src/trident_shadow.c @@ -10,7 +10,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Resources.h" #include "xf86PciInfo.h" #include "xf86Pci.h" #include "shadowfb.h" diff --git a/src/trident_video.c b/src/trident_video.c index 7b6fb10..0c5497b 100644 --- a/src/trident_video.c +++ b/src/trident_video.c @@ -28,7 +28,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Resources.h" #include "compiler.h" #include "xf86PciInfo.h" #include "xf86Pci.h" |