summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2019-07-18 13:57:02 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2019-10-11 12:03:42 +0000
commitf3ab3d0c6123c8e7ddd3be6142f721590d153848 (patch)
tree5f136e910c90afe4b0c1eddd3cef14f90b60732f /hw/xfree86
parent4018811838c344ee92d10e60789853e4ba512612 (diff)
glamor_egl: disable modifiers via glamor_init()
Currently we parse through xf86Info.debug to check if we the modifiers should be disabled. Handle that within DDX and pass GLAMOR_NO_MODIFIERS into the glamor_init() flags. This allows individual DDX control over the setting - say when modifiers are woking OK with one implementation and not the other. Most importantly, this removes the final xf86 piece from the codebase. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index f621df52f..27a520743 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -36,6 +36,7 @@
#include "dumb_bo.h"
#include "inputstr.h"
#include "xf86str.h"
+#include "xf86Priv.h"
#include "X11/Xatom.h"
#include "micmap.h"
#include "xf86cmap.h"
@@ -3412,7 +3413,12 @@ drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
if (drmmode->glamor) {
- if (!glamor_init(pScreen, GLAMOR_USE_EGL_SCREEN)) {
+ unsigned int flags = GLAMOR_USE_EGL_SCREEN;
+
+ if (xf86Info.debug != NULL && !strstr(xf86Info.debug, "dmabuf_capable"))
+ flags |= GLAMOR_NO_MODIFIERS;
+
+ if (!glamor_init(pScreen, flags)) {
return FALSE;
}
#ifdef GBM_BO_WITH_MODIFIERS