summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-12-19 11:54:40 +0200
committerScott Murray <scott.murray@konsulko.com>2022-12-29 23:07:54 +0000
commit0959dc5496364ef3b3af9605b58d1d00f330d299 (patch)
treed7cc1bdcfef9671dc52c1b7b32d8ce581f714995
parent95fbe1535d21b7a1a1a0959602d2642ced198ab1 (diff)
virtualization-layer/recipes-graphics/mesa: Workaround for virgl
This is a just a workaround for the time being, to avoid some graphical artefacts seen only when booting up for the first time the image. Introduced with https://gitlab.freedesktop.org/mesa/mesa/-/commit/6f68cacf619f7f13bc870355709224c1f3e9bbd8. Bug-AGL: SPEC-4651 Change-Id: Ie2ac5d170790293dc5860d5f27f26ee811f4a4b5 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/28337 Reviewed-by: Scott Murray <scott.murray@konsulko.com> Tested-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch34
-rw-r--r--meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend3
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch
new file mode 100644
index 000000000..8bc102c92
--- /dev/null
+++ b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch
@@ -0,0 +1,34 @@
+From 39dea63ebce2764c683c8c2eddbb10cf07a970c4 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 19 Dec 2022 11:51:28 +0200
+Subject: [PATCH] virgl/virgl_driinfo.h.in: Disable by default emulated BGRA
+ and swizzling
+
+Workaround in place for virtio aarch64 to avoid graphical artefacts when
+first time booting up on PVR host driver.
+
+Introduced with patch 'virgl: Always enable emulated BGRA and swizzling
+unless specifically told not to' in mesa-20.3.0.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ src/gallium/drivers/virgl/virgl_driinfo.h.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/drivers/virgl/virgl_driinfo.h.in b/src/gallium/drivers/virgl/virgl_driinfo.h.in
+index f57e5880965..1c06f932c5c 100644
+--- a/src/gallium/drivers/virgl/virgl_driinfo.h.in
++++ b/src/gallium/drivers/virgl/virgl_driinfo.h.in
+@@ -8,7 +8,7 @@
+ // 5. Implement the tweak in virglrenderer
+ DRI_CONF_SECTION_MISCELLANEOUS
+ DRI_CONF_FORMAT_L8_SRGB_ENABLE_READBACK(false)
+- DRI_CONF_GLES_EMULATE_BGRA(true)
+- DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(true)
++ DRI_CONF_GLES_EMULATE_BGRA(false)
++ DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(false)
+ DRI_CONF_GLES_SAMPLES_PASSED_VALUE(1024, 1, 400000000)
+ DRI_CONF_SECTION_END
+--
+2.35.1
+
diff --git a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend
new file mode 100644
index 000000000..0a6606ebf
--- /dev/null
+++ b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch"