From 9fcfd1aa760023e449cbb8c1eebd0bb570a6aacb Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 19 Oct 2011 00:12:15 -0700 Subject: [PATCH] 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 --- src/alp_driver.c | 5 +++++ src/cir.h | 2 +- src/lg_driver.c | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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]);