diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-13 08:14:48 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-13 08:14:48 +0000 |
commit | 923b158e5c5dd50f943fe315a058410aeaa76269 (patch) | |
tree | 128ff07119016a19bee9662b7a00016f077fc75a /src/intel_device.c | |
parent | 202787ffa2bae5b1455137a344dabb9d85ee3aa0 (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/intel_device.c')
-rw-r--r-- | src/intel_device.c | 3 |
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) |