summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2008-12-04 16:06:35 +0100
committerLuc Verhaegen <libv@skynet.be>2008-12-04 16:06:35 +0100
commit0d6e607fd8067166961a82eabf25328a84d5f431 (patch)
tree4e5f1c07b6d2532f6b6a11dda6c0c2c36c3c86f7
parent34f4ae1710060e86f9dde140346136ffb8e7b678 (diff)
MapFB: move MTRR hack to a place where we _do_ know the FrameBufferBase.
Stupidity... MapFB and host mapping moved around, but the MTRR hack remained put.
-rw-r--r--src/via_driver.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/via_driver.c b/src/via_driver.c
index 5cfb337..b900f80 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1985,16 +1985,18 @@ ViaMapFB(ScrnInfoPtr pScrn)
"Framebuffer: No Direct CPU access possible.\n");
#ifdef XSERVER_LIBPCIACCESS
- if (pci_device_map_range(pVia->PciInfo, pVia->FrameBufferBase,
- pVia->videoRambytes,
- PCI_DEV_MAP_FLAG_WRITABLE | PCI_DEV_MAP_FLAG_WRITE_COMBINE,
- (pointer *) &pVia->FBBase))
- pVia->FBBase = NULL;
+ if (pci_device_map_range(pVia->PciInfo, pVia->FrameBufferBase,
+ pVia->videoRambytes,
+ PCI_DEV_MAP_FLAG_WRITABLE | PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+ (pointer *) &pVia->FBBase))
+ pVia->FBBase = NULL;
#else
+ ViaBrokenMTRRHack(pScrn);
pVia->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pVia->PciTag, pVia->FrameBufferBase,
pVia->videoRambytes);
#endif
+
if (!pVia->FBBase) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Internal error: could not map framebuffer\n");
@@ -2122,9 +2124,6 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
VIAFUNC(scrnIndex);
-#ifndef XSERVER_LIBPCIACCESS
- ViaBrokenMTRRHack(pScrn);
-#endif
if (!VIAMapMMIO(pScrn))
return FALSE;