diff options
Diffstat (limited to 'src/i810_dri.c')
-rw-r--r-- | src/i810_dri.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/i810_dri.c b/src/i810_dri.c index 72718d34..e5e15651 100644 --- a/src/i810_dri.c +++ b/src/i810_dri.c @@ -354,9 +354,15 @@ I810DRIScreenInit(ScreenPtr pScreen) } else { pDRIInfo->busIdString = xalloc(64); sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", +#if XSERVER_LIBPCIACCESS + ((pI810->PciInfo->domain << 8) | pI810->PciInfo->bus), + pI810->PciInfo->dev, pI810->PciInfo->func +#else ((pciConfigPtr) pI810->PciInfo->thisCard)->busnum, ((pciConfigPtr) pI810->PciInfo->thisCard)->devnum, - ((pciConfigPtr) pI810->PciInfo->thisCard)->funcnum); + ((pciConfigPtr) pI810->PciInfo->thisCard)->funcnum +#endif + ); } pDRIInfo->ddxDriverMajorVersion = I810_MAJOR_VERSION; pDRIInfo->ddxDriverMinorVersion = I810_MINOR_VERSION; @@ -972,12 +978,20 @@ I810DRIScreenInit(ScreenPtr pScreen) if (!pI810DRI->irq) { pI810DRI->irq = drmGetInterruptFromBusID(pI810->drmSubFD, +#if XSERVER_LIBPCIACCESS + ((pI810->PciInfo->domain << 8) | + pI810->PciInfo->bus), + pI810->PciInfo->dev, + pI810->PciInfo->func +#else ((pciConfigPtr) pI810-> PciInfo->thisCard)->busnum, ((pciConfigPtr) pI810-> PciInfo->thisCard)->devnum, ((pciConfigPtr) pI810-> - PciInfo->thisCard)->funcnum); + PciInfo->thisCard)->funcnum +#endif + ); if ((drmCtlInstHandler(pI810->drmSubFD, pI810DRI->irq)) != 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] failure adding irq handler, there is a device " @@ -991,7 +1005,7 @@ I810DRIScreenInit(ScreenPtr pScreen) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] dma control initialized, using IRQ %d\n", pI810DRI->irq); - pI810DRI->deviceID = pI810->PciInfo->chipType; + pI810DRI->deviceID = DEVICE_ID(pI810->PciInfo); pI810DRI->width = pScrn->virtualX; pI810DRI->height = pScrn->virtualY; pI810DRI->mem = pScrn->videoRam * 1024; |