xf86-video-intel: src/intel_device.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Oct 5 15:01:57 PDT 2013


 src/intel_device.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7284e7f48b812948b40d67396214f7929c1c00eb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Oct 5 23:00:49 2013 +0100

    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 at chris-wilson.co.uk>

diff --git a/src/intel_device.c b/src/intel_device.c
index 91405fa..0db65ca 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
 


More information about the xorg-commit mailing list