[Nouveau] [PATCH 2/7] nouveau: stop using dri1 function DRICreatePCIBusID
Emil Velikov
emil.l.velikov at gmail.com
Sat Feb 16 12:48:42 PST 2013
Step 1 to completely rip out dri1 out of nouveau
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/nv_driver.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/nv_driver.c b/src/nv_driver.c
index b1410f5..2b2f698 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -254,11 +254,13 @@ NVHasKMS(struct pci_device *pci_dev)
char *busid;
int chipset, ret;
- if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
- xf86DrvMsg(-1, X_ERROR, "[drm] No DRICreatePCIBusID symbol\n");
- return FALSE;
- }
- busid = DRICreatePCIBusID(pci_dev);
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
+ XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
+ pci_dev->domain, pci_dev->bus, pci_dev->dev, pci_dev->func);
+#else
+ busid = XNFprintf("pci:%04x:%02x:%02x.%d",
+ pci_dev->domain, pci_dev->bus, pci_dev->dev, pci_dev->func);
+#endif
ret = nouveau_device_open(busid, &dev);
if (ret) {
--
1.8.1.3
More information about the Nouveau
mailing list