Module Name: xsrc Committed By: jmcneill Date: Thu Jan 20 18:23:56 UTC 2011
Modified Files: xsrc/external/mit/xf86-video-openchrome/dist/src: via_dri.c Log Message: Use DRICreatePCIBusID if present instead of building the Bus ID string manually. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-openchrome/dist/src/via_dri.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-openchrome/dist/src/via_dri.c diff -u xsrc/external/mit/xf86-video-openchrome/dist/src/via_dri.c:1.1.1.1 xsrc/external/mit/xf86-video-openchrome/dist/src/via_dri.c:1.2 --- xsrc/external/mit/xf86-video-openchrome/dist/src/via_dri.c:1.1.1.1 Thu May 27 07:31:59 2010 +++ xsrc/external/mit/xf86-video-openchrome/dist/src/via_dri.c Thu Jan 20 18:23:55 2011 @@ -599,17 +599,21 @@ pDRIInfo->clientDriverName = VIAClientDriverName; break; } - pDRIInfo->busIdString = xalloc(64); - sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", + if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { + pDRIInfo->busIdString = DRICreatePCIBusID(pVia->PciInfo); + } else { + pDRIInfo->busIdString = xalloc(64); + sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", #ifdef XSERVER_LIBPCIACCESS - ((pVia->PciInfo->domain << 8) | pVia->PciInfo->bus), - pVia->PciInfo->dev, pVia->PciInfo->func + ((pVia->PciInfo->domain << 8) | pVia->PciInfo->bus), + pVia->PciInfo->dev, pVia->PciInfo->func #else - ((pciConfigPtr)pVia->PciInfo->thisCard)->busnum, - ((pciConfigPtr)pVia->PciInfo->thisCard)->devnum, - ((pciConfigPtr)pVia->PciInfo->thisCard)->funcnum + ((pciConfigPtr)pVia->PciInfo->thisCard)->busnum, + ((pciConfigPtr)pVia->PciInfo->thisCard)->devnum, + ((pciConfigPtr)pVia->PciInfo->thisCard)->funcnum #endif - ); + ); + } pDRIInfo->ddxDriverMajorVersion = VIA_DRIDDX_VERSION_MAJOR; pDRIInfo->ddxDriverMinorVersion = VIA_DRIDDX_VERSION_MINOR; pDRIInfo->ddxDriverPatchVersion = VIA_DRIDDX_VERSION_PATCH;