summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-03-13 08:14:48 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-03-13 08:14:48 +0000
commit923b158e5c5dd50f943fe315a058410aeaa76269 (patch)
tree128ff07119016a19bee9662b7a00016f077fc75a /src
parent202787ffa2bae5b1455137a344dabb9d85ee3aa0 (diff)
intel: Fallback to drmGetDeviceNameFromFd()
If we are not supplied the path, call the libdrm function to search for the canonical name for our device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/intel_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel_device.c b/src/intel_device.c
index 87804698..c0e15822 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -207,7 +207,8 @@ static char *find_master_node(int fd)
(st.st_rdev & 0x7f) == master.st_rdev)
return strdup(buf);
- return NULL;
+ /* Fallback to iterating over the usual suspects */
+ return drmGetDeviceNameFromFd(fd);
}
static char *find_render_node(int fd)