diff options
author | Adam Jackson <ajax@redhat.com> | 2009-12-30 13:08:51 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-12-30 13:08:51 -0500 |
commit | 1331623dbee4fbfa36188a4460a95bed4128f11e (patch) | |
tree | 9336337246cdf18199c08abcb7ed059a1064dff0 | |
parent | d6f5105ff4bab91a2af4cf5655b88ff27cba74bd (diff) |
Make banking support properly conditional on ISA support
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | src/trident.h | 7 | ||||
-rw-r--r-- | src/trident_dac.c | 2 | ||||
-rw-r--r-- | src/trident_driver.c | 17 | ||||
-rw-r--r-- | src/tvga_dac.c | 2 |
4 files changed, 19 insertions, 9 deletions
diff --git a/src/trident.h b/src/trident.h index 1142b50..c15d39c 100644 --- a/src/trident.h +++ b/src/trident.h @@ -46,6 +46,13 @@ #include "xf86Pci.h" #include "vbe.h" +/* Banked framebuffer only supported on ISA */ +#ifdef HAVE_ISA +#define LINEAR() (pTrident->Linear) +#else +#define LINEAR() (1) +#endif + #define PCI_CHIP_2200 0x2200 typedef struct { diff --git a/src/trident_dac.c b/src/trident_dac.c index cd7da80..a46f22b 100644 --- a/src/trident_dac.c +++ b/src/trident_dac.c @@ -640,7 +640,7 @@ TridentInit(ScrnInfoPtr pScrn, DisplayModePtr mode) pReg->tridentRegs3C4[Protection] = 0x92; pReg->tridentRegs3x4[LinearAddReg] = 0; - if (pTrident->Linear) { + if (LINEAR()) { /* This is used for VLB, when we support it again in 4.0 */ if (pTrident->Chipset < CYBER9385) pReg->tridentRegs3x4[LinearAddReg] |= diff --git a/src/trident_driver.c b/src/trident_driver.c index addb1af..31cbb83 100644 --- a/src/trident_driver.c +++ b/src/trident_driver.c @@ -35,7 +35,9 @@ #include "fb.h" +#ifdef HAVE_ISA #include "mibank.h" +#endif #include "micmap.h" #include "xf86.h" #include "xf86_OSproc.h" @@ -72,7 +74,6 @@ #include <X11/extensions/dpms.h> #endif - #include "xf86xv.h" static const OptionInfoRec * TRIDENTAvailableOptions(int chipid, int busid); @@ -1353,7 +1354,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) pTrident->OverrideBskew); } if (xf86ReturnOptValBool(pTrident->Options, OPTION_SHADOW_FB, FALSE)) { - if (!pTrident->Linear) + if (!LINEAR()) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Ignoring Option SHADOW_FB" " in non-Linear Mode\n"); else { @@ -1365,7 +1366,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) } pTrident->Rotate = 0; if ((s = xf86GetOptValString(pTrident->Options, OPTION_ROTATE))) { - if (!pTrident->Linear) + if (!LINEAR()) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Ignoring Option ROTATE " "in non-Linear Mode\n"); else { @@ -1415,7 +1416,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags) /* FIXME ACCELERATION */ if (!UseMMIO) pTrident->NoAccel = TRUE; - if (pTrident->Linear) { + if (LINEAR()) { if (pTrident->pEnt->device->MemBase != 0) { /* * XXX Should check that the config file value matches one of the @@ -2498,7 +2499,7 @@ TRIDENTMapMem(ScrnInfoPtr pScrn) if (pTrident->IOBase == NULL) return FALSE; - if (pTrident->Linear) { + if (LINEAR()) { if (pTrident->FbMapSize != 0) { #ifndef XSERVER_LIBPCIACCESS pTrident->FbBase = xf86MapPciMem(pScrn->scrnIndex, @@ -2559,7 +2560,7 @@ TRIDENTUnmapMem(ScrnInfoPtr pScrn) #endif pTrident->IOBase = NULL; - if (pTrident->Linear) { + if (LINEAR()) { if (pTrident->FbMapSize != 0) { #ifdef XSERVER_LIBPCIACCESS pci_device_unmap_range(pTrident->PciInfo, (pointer)pTrident->FbBase, pTrident->FbMapSize); @@ -2931,7 +2932,8 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!pTrident->ShadowFB) TRIDENTDGAInit(pScreen); - if (!pTrident->Linear) { +#ifdef HAVE_ISA + if (!LINEAR()) { miBankInfoPtr pBankInfo; /* Setup the vga banking variables */ @@ -2965,6 +2967,7 @@ TRIDENTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) return FALSE; } } +#endif { BoxRec AvailFBArea; diff --git a/src/tvga_dac.c b/src/tvga_dac.c index 422005d..7f2e89a 100644 --- a/src/tvga_dac.c +++ b/src/tvga_dac.c @@ -110,7 +110,7 @@ TVGAInit(ScrnInfoPtr pScrn, DisplayModePtr mode) pReg->tridentRegs3C4[NewMode1] = 0x80; - if (pTrident->Linear) + if (LINEAR()) pReg->tridentRegs3x4[LinearAddReg] = ((pTrident->FbAddress >> 24) << 6)| ((pTrident->FbAddress >> 20) & 0x0F)| 0x20; |