summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-08-20 16:09:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-08-20 16:09:25 +0100
commit3c611087e8ae09fc3fe4271f16d912ac8ae89f6b (patch)
tree7619dd82f2673566a754739f5de7ec6bdb53e7fd /src/sna/sna_driver.c
parentdd6c67b32f726b6ad7f12f3b83f6d8c868ff4dc1 (diff)
Only open the matching BusID and not the first named
If you pass a name to drmOpen() it will attempt to open any device corresponding to that name if it first fails to open the device corresponding to the BusID. Obviously we want the failure from opening the specified device in order to prevent wrongly opening the first found device multiple times. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 6810c7a1..a0beb4cf 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -259,7 +259,7 @@ static int sna_open_drm_master(ScrnInfoPtr scrn)
snprintf(busid, sizeof(busid), "pci:%04x:%02x:%02x.%d",
pci->domain, pci->bus, pci->dev, pci->func);
- fd = drmOpen("i915", busid);
+ fd = drmOpen(NULL, busid);
if (fd == -1) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"[drm] Failed to open DRM device for %s: %s\n",