summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-05 23:00:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-05 23:00:49 +0100
commit7284e7f48b812948b40d67396214f7929c1c00eb (patch)
tree71da12e0b7318929e273fd2f51709fd75770832c
parent524a45da56e2a052ffafa3887891caa90ba39f76 (diff)
intel: Filter out the control bit from the device minor
When computing the render node for the device, filter out the potential control node. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel_device.c b/src/intel_device.c
index 91405fa2..0db65cad 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -238,10 +238,10 @@ static char *find_render_node(int fd)
if (master.st_rdev & 0x80)
return NULL;
- sprintf(buf, "/dev/dri/renderD%d", (int)((master.st_rdev | 0x80) & 0xff));
+ sprintf(buf, "/dev/dri/renderD%d", (int)((master.st_rdev | 0x80) & 0xbf));
if (stat(buf, &render) == 0 &&
master.st_mode == render.st_mode &&
- render.st_rdev == (master.st_rdev | 0x80))
+ render.st_rdev == ((master.st_rdev | 0x80) & 0xbf))
return strdup(buf);
#endif