summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ast.h6
-rw-r--r--src/ast_driver.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/src/ast.h b/src/ast.h
index cbe62fb..3b56a6c 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -261,9 +261,11 @@ typedef struct _ASTRec {
unsigned long FbMapSize;
unsigned long MMIOMapSize;
- IOADDRESS IODBase; /* Base of PIO memory area */
- IOADDRESS PIOOffset;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
IOADDRESS RelocateIO;
+#else
+ int RelocateIO;
+#endif
VIDEOMODE VideoModeInfo;
ASTRegRec SavedReg;
diff --git a/src/ast_driver.c b/src/ast_driver.c
index c2ba129..639562d 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -570,23 +570,21 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n",
(pScrn->chipset != NULL) ? pScrn->chipset : "Unknown ast");
- /* Resource Allocation */
+
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
- pAST->IODBase = pScrn->domainIOBase;
-#else
- pAST->IODBase = 0;
-#endif
/* "Patch" the PIOOffset inside vgaHW in order to force
* the vgaHW module to use our relocated i/o ports.
*/
+ VGAHWPTR(pScrn)->PIOOffset =
+ pScrn->domainIOBase + PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) - 0x380;
+
+ pAST->RelocateIO = pScrn->domainIOBase +
+ PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO);
+#else
+ pAST->RelocateIO = (PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO));
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
- VGAHWPTR(pScrn)->PIOOffset = /* ... */
#endif
- pAST->PIOOffset =
- pAST->IODBase + PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) - 0x380;
- pAST->RelocateIO = (IOADDRESS)(PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) + pAST->IODBase);
if (pAST->pEnt->device->MemBase != 0) {
pAST->FBPhysAddr = pAST->pEnt->device->MemBase;