wayland: Fix the logic in disabling the prime capability
authorNeil Roberts <neil@linux.intel.com>
Tue, 8 Apr 2014 20:28:40 +0000 (23:28 +0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 25 Apr 2014 20:17:05 +0000 (21:17 +0100)
It looks like this bit of code is trying to disable the prime capability if
the driver doesn't support createImageFromFds. However the logic looks a bit
broken and what it would actually do is disable all other capabilities apart
from prime. This patch fixes it to actually disable prime.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/platform_wayland.c

index 691f3e1ef8402767ed7e7b83f986b0ee0025c4dd..37dcf19f9bec6e9fc812547e4cd606cd371bd3f7 100644 (file)
@@ -1049,7 +1049,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
 
    if (dri2_dpy->image->base.version < 7 ||
        dri2_dpy->image->createImageFromFds == NULL)
-      dri2_dpy->capabilities &= WL_DRM_CAPABILITY_PRIME;
+      dri2_dpy->capabilities &= ~WL_DRM_CAPABILITY_PRIME;
 
    types = EGL_WINDOW_BIT;
    for (i = 0; dri2_dpy->driver_configs[i]; i++) {