OSDN Git Service

Weston: Fix authentication error for egl clients
authorHarish Krupo <harishkrupo@gmail.com>
Fri, 30 Mar 2018 15:15:16 +0000 (20:45 +0530)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Mon, 2 Apr 2018 16:52:51 +0000 (09:52 -0700)
When a wayland egl client initializes, it tries to authenticate
with the server. This is done using drm{Get,Auth}magic calls.
These calls would fail if weston opens card0 because IAHWC also
opens card0 and is the actual master/control client.
Mesa ignores the authentication part when opening the render node
and sends the authenticated response to the client.

Jira: None
Tests: weston-simple-egl app should run.

Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
os/linux/weston/plugin/compositor-iahwc.c

index 95b8fe8..82207ca 100644 (file)
@@ -1705,8 +1705,7 @@ static struct iahwc_backend *iahwc_backend_create(
   iahwc_module_t *iahwc_module;
   iahwc_device_t *iahwc_device;
 
-  /* const char* device = "/dev/dri/renderD128"; */
-  const char *device = "/dev/dri/card0";
+  const char* device = "/dev/dri/renderD128";
   const char *seat_id = default_seat;
 
   weston_log(stderr, "Initializing iahwc backend\n");
@@ -1803,7 +1802,7 @@ static struct iahwc_backend *iahwc_backend_create(
     goto err_compositor;
   }
 
-  b->iahwc.fd = weston_launcher_open(b->compositor->launcher, device, O_RDWR);
+  b->iahwc.fd = open(device, O_RDWR);
   if (b->iahwc.fd < 0) {
     weston_log("unable to open gpu file\n");
     goto err_compositor;