From: Harish Krupo Date: Fri, 30 Mar 2018 15:15:16 +0000 (+0530) Subject: Weston: Fix authentication error for egl clients X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c98309145be9520c75e4e3bddb8058343dbdc154;p=android-x86%2Fexternal-IA-Hardware-Composer.git Weston: Fix authentication error for egl clients 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 --- diff --git a/os/linux/weston/plugin/compositor-iahwc.c b/os/linux/weston/plugin/compositor-iahwc.c index 95b8fe8..82207ca 100644 --- a/os/linux/weston/plugin/compositor-iahwc.c +++ b/os/linux/weston/plugin/compositor-iahwc.c @@ -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;