From d11d5bb80d21f2aaa54ddf2f26a50aa6ef31d2fa Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 28 Mar 2018 12:46:01 -0400 Subject: [PATCH] glamor: Hide new DRI behind Option "Debug" "dmabuf_capable" ... for xfree86, at least for now. Things appear to work for Xwayland but not yet for modesetting. Hopefully we can fix that before 1.20 but in the meantime this makes testing both paths easier than a rebuild. Signed-off-by: Adam Jackson --- glamor/glamor_egl.c | 4 +++- hw/xfree86/man/xorg.conf.man | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 2ea3efc58..4a550932a 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #define EGL_DISPLAY_NO_X_MESA @@ -960,7 +961,8 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) "EGL_EXT_image_dma_buf_import") && epoxy_has_egl_extension(glamor_egl->display, "EGL_EXT_image_dma_buf_import_modifiers")) - glamor_egl->dmabuf_capable = TRUE; + glamor_egl->dmabuf_capable = !!strstr(xf86Info.debug, + "dmabuf_capable"); #endif glamor_egl->saved_free_screen = scrn->FreeScreen; diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man index 46ddd0ec9..958926243 100644 --- a/hw/xfree86/man/xorg.conf.man +++ b/hw/xfree86/man/xorg.conf.man @@ -498,6 +498,9 @@ The options recognised by this section are: .BI "Option \*qDebug\*q \*q" string \*q This comma-separated list provides a way to control various debugging switches from the config file. +At the moment the only defined value is +.B dmabuf_capable +which instructs glamor to enable some unstable buffer management code. .TP 7 .BI "Option \*qDefaultServerLayout\*q \*q" layout\-id \*q This specifies the default