]> code.ossystems Code Review - meta-freescale.git/commitdiff
xserver-xorg: enable atomic/dri3
authorAndreas Müller <schnitzeltony@gmail.com>
Wed, 7 Apr 2021 21:55:04 +0000 (23:55 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 20 Apr 2021 15:10:12 +0000 (12:10 -0300)
Inspired by [1-2]

[1] https://gitlab.freedesktop.org/mesa/mesa/-/issues/4584
[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/3721

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Vinicius Aquino <voa.aquino@gmail.com>
recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf
recipes-graphics/xorg-xserver/xserver-xorg/0001-Allow-to-enable-atomic-in-modesetting-DDX.patch [new file with mode: 0644]
recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend

index c58ae207e7ffed312a7fd4c71911dfae230b161f..0c52ad3b6273bf763960c2eb7af5e53e4cd9cae5 100644 (file)
@@ -3,9 +3,11 @@ Section "Device"
     Driver     "modesetting"
     Option     "kmsdev"      "/dev/dri/card0"
     Option     "AccelMethod" "glamor"
+    Option     "Atomic"      "On"
 EndSection
 
 Section "ServerFlags"
     Option     "AutoAddGPU"  "false"
+    Option     "DRI"         "3"
 EndSection
 
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg/0001-Allow-to-enable-atomic-in-modesetting-DDX.patch b/recipes-graphics/xorg-xserver/xserver-xorg/0001-Allow-to-enable-atomic-in-modesetting-DDX.patch
new file mode 100644 (file)
index 0000000..caf2fcd
--- /dev/null
@@ -0,0 +1,34 @@
+From 9c8b815520bf52caf780dc4defea0fe2fe8e33a3 Mon Sep 17 00:00:00 2001
+From: Daniel Abrecht <public@danielabrecht.ch>
+Date: Wed, 21 Oct 2020 21:13:30 +0200
+Subject: [PATCH] Allow to enable atomic in modesetting DDX
+
+The linux kernel blacklisted atomic for the modesetting DDX to deal with
+problems with old Xorg versions which didn't have it disabled by default.
+Ever since, it wasn't possible to enable atomic in modesetting at all
+anymore.
+
+This change doesn't enable atomic by default, but it allows a user to
+enabled it again.
+
+Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
+---
+ hw/xfree86/drivers/modesetting/driver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
+index 6549ef8e1..bd8576f81 100644
+--- a/hw/xfree86/drivers/modesetting/driver.c
++++ b/hw/xfree86/drivers/modesetting/driver.c
+@@ -1216,7 +1216,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
+     }
+     if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) {
+-        ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
++        ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 2);
+         ms->atomic_modeset = (ret == 0);
+     } else {
+         ms->atomic_modeset = FALSE;
+-- 
+GitLab
+
index a828e5188b88a907dc912f158da32474097f9b51..68c6d2d2f9d61724310eca2a92a578c4ceda2333 100644 (file)
@@ -11,4 +11,10 @@ IMX_OPENGL_PKGCONFIGS_REMOVE        = ""
 IMX_OPENGL_PKGCONFIGS_REMOVE_imxgpu = "glamor"
 OPENGL_PKGCONFIGS_remove_mx6        = "${IMX_OPENGL_PKGCONFIGS_REMOVE}"
 OPENGL_PKGCONFIGS_remove_mx7        = "${IMX_OPENGL_PKGCONFIGS_REMOVE}"
+OPENGL_PKGCONFIGS_remove_mx8        = "${IMX_OPENGL_PKGCONFIGS_REMOVE}"
 OPENGL_PKGCONFIGS_remove_imxdrm     = "dri glx"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+SRC_URI_append_imxgpu2d = " file://0003-Remove-check-for-useSIGIO-option.patch"
+SRC_URI_append_use-mainline-bsp = " file://0001-Allow-to-enable-atomic-in-modesetting-DDX.patch"
+