fix some thinkos in the pciaccess patch, this now works on real hardware

This commit is contained in:
Dave Airlie
2008-01-17 15:49:41 +10:00
parent 797e6215ad
commit 36ed5521af

View File

@@ -7294,7 +7294,7 @@ SISMapMem(ScrnInfoPtr pScrn)
pSiS->PciTag, pSiS->IOAddress, (pSiS->mmioSize * 1024));
#else
{
void **result = (void **)&pSiSEnt->IOBase;
void **result = (void **)&pSiS->IOBase;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOAddress,
(pSiS->mmioSize * 1024),
@@ -7348,7 +7348,7 @@ SISMapMem(ScrnInfoPtr pScrn)
pSiS->IOBaseDense = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pSiS->PciTag, pSiS->IOAddress, (pSiS->mmioSize * 1024));
#else
void **result = (void **)&pSiSEnt->IOBaseDense;
void **result = (void **)&pSiS->IOBaseDense;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOAddress,
(pSiS->mmioSize * 1024),
@@ -7400,7 +7400,7 @@ SISMapMem(ScrnInfoPtr pScrn)
#endif
#ifndef XSERVER_LIBPCIACCESS
pSiSEnt->FbBase = pSiSEnt->RealFbBase =
pSiS->FbBase = pSiS->RealFbBase =
xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pSiS->PciTag, (ULong)pSiS->realFbAddress,
pSiS->FbMapSize);
@@ -7410,14 +7410,14 @@ SISMapMem(ScrnInfoPtr pScrn)
pSiS->FbMapSize,
PCI_DEV_MAP_FLAG_WRITABLE |
PCI_DEV_MAP_FLAG_WRITE_COMBINE,
(void *)&pSiSEnt->FbBase);
(void *)&pSiS->FbBase);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map FB aperture. %s (%d)\n",
strerror (err), err);
return FALSE;
}
pSiSEnt->RealFbBase = pSiSEnt->FbBase;
pSiS->RealFbBase = pSiS->FbBase;
#endif
pSiS->FbBase += pSiS->dhmOffset;