diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2013-02-16 20:48:42 +0000 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2013-06-12 10:33:20 +0200 |
commit | 7c3f6cd8d6b14aea561fb877f6006d339d156f35 (patch) | |
tree | bc264a357fce7b57ad536994e79ec0c43b5799b4 | |
parent | 3b1a45325d5fd46f0e7fad17168742b4c9a2465a (diff) |
nouveau: stop using dri1 function DRICreatePCIBusID
Step 1 to completely rip out dri1 out of nouveau
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | src/nv_driver.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nv_driver.c b/src/nv_driver.c index 38eddac..a6a12ec 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -272,11 +272,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 = drmCheckModesettingSupported(busid); if (ret) { |