summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-19 00:12:15 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-19 00:12:15 -0700
commit9fcfd1aa760023e449cbb8c1eebd0bb570a6aacb (patch)
tree099ae10d46ad1417e472007014defba50089f6e9
parent80f60e4af0e0b124335c5a09cad0b1eb42583536 (diff)
Build fix for ABI Version 12
ABI Version 12 removes support for multiple PCI domains. If you need to use this driver on a system with more than one PCI domain, you should either port this driver to using libpciaccess directly or stick with an older server. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--src/alp_driver.c5
-rw-r--r--src/cir.h2
-rw-r--r--src/lg_driver.c5
3 files changed, 11 insertions, 1 deletions
diff --git a/src/alp_driver.c b/src/alp_driver.c
index edcaef3..e773471 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -480,7 +480,12 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
pCir = CIRPTR(pScrn);
pCir->pScrn = pScrn;
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
pCir->PIOReg = hwp->PIOOffset + 0x3CE;
+#else
+ pCir->PIOReg = 0x3CE;
+#endif
/* Get the entity, and make sure it is PCI. */
pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
diff --git a/src/cir.h b/src/cir.h
index 64531f5..861966d 100644
--- a/src/cir.h
+++ b/src/cir.h
@@ -21,7 +21,7 @@ typedef struct {
CARD32 properties;
pciVideoPtr PciInfo;
PCITAG PciTag;
- IOADDRESS PIOReg;
+ unsigned long PIOReg;
union {
struct lgRec *lg;
struct alpRec *alp;
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 0f9f1f6..fc864f8 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -372,7 +372,12 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
pCir = CIRPTR(pScrn);
pCir->pScrn = pScrn;
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
pCir->PIOReg = hwp->PIOOffset + 0x3CE;
+#else
+ pCir->PIOReg = 0x3CE;
+#endif
/* Get the entity, and make sure it is PCI. */
pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);