[PATCH xserver 04/10] xwayland: skip drm authentication with render node
Olivier Fourdan
ofourdan at redhat.com
Tue Jun 5 17:38:39 UTC 2018
If using a render node, we can skip DRM authentication.
Suggested-by: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 367e65a9a..b03e7ee17 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;
--
2.17.1
More information about the xorg-devel
mailing list