summaryrefslogtreecommitdiff
path: root/src/atidri.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2007-03-18 16:15:20 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-03-21 20:18:54 +0200
commit321db6d87c9110654ab386e5ec270116eca1e04f (patch)
treecc8b1e8ba11d0bef543567c448754de3076d1e38 /src/atidri.c
parentdfd07b6e99020d1db43d7ce0cae4423d8c6b1f05 (diff)
[mach64] Add macros for pci-rework source-code compatibilty.
Diffstat (limited to 'src/atidri.c')
-rw-r--r--src/atidri.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/atidri.c b/src/atidri.c
index 83cb25f1..d017040c 100644
--- a/src/atidri.c
+++ b/src/atidri.c
@@ -774,8 +774,8 @@ static Bool ATIDRISetAgpMode( ScreenPtr pScreen )
xf86DrvMsg( pScreen->myNum, X_INFO,
"[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n",
mode, vendor, device,
- pATI->PCIInfo->vendor,
- pATI->PCIInfo->chipType );
+ PCI_DEV_VENDOR_ID(pATI->PCIInfo),
+ PCI_DEV_DEVICE_ID(pATI->PCIInfo) );
if ( drmAgpEnable( pATI->drmFD, mode ) < 0 ) {
xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] AGP not enabled\n" );
@@ -1134,18 +1134,15 @@ static Bool ATIDRIIrqInit( ScreenPtr pScreen )
if ( pATI->irq <= 0 ) {
pATI->irq = drmGetInterruptFromBusID(pATI->drmFD,
- ((pciConfigPtr)pATI->PCIInfo
- ->thisCard)->busnum,
- ((pciConfigPtr)pATI->PCIInfo
- ->thisCard)->devnum,
- ((pciConfigPtr)pATI->PCIInfo
- ->thisCard)->funcnum);
+ PCI_CFG_BUS(pATI->PCIInfo),
+ PCI_CFG_DEV(pATI->PCIInfo),
+ PCI_CFG_FUNC(pATI->PCIInfo));
if ( pATI->irq <= 0 ) {
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
"[drm] Couldn't find IRQ for bus id %d:%d:%d\n",
- ((pciConfigPtr)pATI->PCIInfo->thisCard)->busnum,
- ((pciConfigPtr)pATI->PCIInfo->thisCard)->devnum,
- ((pciConfigPtr)pATI->PCIInfo->thisCard)->funcnum);
+ PCI_CFG_BUS(pATI->PCIInfo),
+ PCI_CFG_DEV(pATI->PCIInfo),
+ PCI_CFG_FUNC(pATI->PCIInfo));
pATI->irq = 0;
} else if ((drmCtlInstHandler(pATI->drmFD, pATI->irq)) != 0) {
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
@@ -1243,9 +1240,9 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen )
pDRIInfo->busIdString = xalloc( 64 );
sprintf( pDRIInfo->busIdString,
"PCI:%d:%d:%d",
- pATI->PCIInfo->bus,
- pATI->PCIInfo->device,
- pATI->PCIInfo->func );
+ PCI_DEV_BUS(pATI->PCIInfo),
+ PCI_DEV_DEV(pATI->PCIInfo),
+ PCI_DEV_FUNC(pATI->PCIInfo) );
}
pDRIInfo->ddxDriverMajorVersion = ATI_VERSION_MAJOR;
pDRIInfo->ddxDriverMinorVersion = ATI_VERSION_MINOR;