diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2018-06-05 19:38:39 +0200 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-06-21 10:54:10 -0400 |
commit | de004eefc60ec595f5d6d81658468e082f8df930 (patch) | |
tree | 239bb73ba4f8fbd0a45ea9f5b7eeb318801917cb | |
parent | b823b43dca143810146f563d09e8996058b9d09e (diff) |
xwayland: skip drm authentication with render node
If using a render node, we can skip DRM authentication.
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r-- | hw/xwayland/xwayland-glamor-gbm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c index 939a3c030..4ac7d50f6 100644 --- a/hw/xwayland/xwayland-glamor-gbm.c +++ b/hw/xwayland/xwayland-glamor-gbm.c @@ -837,11 +837,16 @@ error: static Bool xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen) { + struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen); + if (!dri3_screen_init(xwl_screen->screen, &xwl_dri3_info)) { ErrorF("Failed to initialize dri3\n"); goto error; } + if (xwl_gbm->fd_render_node) + goto skip_drm_auth; + if (!dixRegisterPrivateKey(&xwl_auth_state_private_key, PRIVATE_CLIENT, 0)) { ErrorF("Failed to register private key\n"); @@ -854,6 +859,7 @@ xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen) goto error; } +skip_drm_auth: xwl_screen->screen->CreatePixmap = xwl_glamor_gbm_create_pixmap; xwl_screen->screen->DestroyPixmap = xwl_glamor_gbm_destroy_pixmap; |