Dont force 888 format instead set only when the corresponding force888
config is set.

Signed-off-by: Gowtham Tammana <[email protected]>
---
 ...fs-Force-888-format-only-on-env-flag.patch | 44 +++++++++++++++++++
 .../recipes-qt/qt5/qtbase_%.bbappend          |  3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 
meta-arago-distro/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch

diff --git 
a/meta-arago-distro/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch
 
b/meta-arago-distro/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch
new file mode 100644
index 00000000..b6f0eec8
--- /dev/null
+++ 
b/meta-arago-distro/recipes-qt/qt5/qtbase/0001-eglfs-Force-888-format-only-on-env-flag.patch
@@ -0,0 +1,44 @@
+From 7288496d08108b8b6514f9fb20c575fd42f8027e Mon Sep 17 00:00:00 2001
+From: Gowtham Tammana <[email protected]>
+Date: Mon, 6 Jul 2020 12:47:23 -0500
+Subject: [PATCH] eglfs: Force 888 format only on env flag
+
+[ChangeLog][Platform Specific Changes][eglfs] In the case of elgfs
+platform the surface format is being forced to RGB888 format which
+conflicts if a different default format is specified in the json config
+file. Force the surface format to be of RGB888 only when the environment
+flag QT_QPA_EGLFS_FORCE888 is set.
+set.
+
+Upstream-Status: Pending
+
+Change-Id: Id63f11eed2f41b322a95e103860888694ccd44db
+---
+ .../eglfs_kms_support/qeglfskmsintegration.cpp        | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git 
a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
 
b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
+index 06bc272050..41f2265208 100644
+--- 
a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
++++ 
b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
+@@ -102,9 +102,14 @@ QSurfaceFormat 
QEglFSKmsIntegration::surfaceFormatFor(const QSurfaceFormat &inpu
+     QSurfaceFormat format(inputFormat);
+     format.setRenderableType(QSurfaceFormat::OpenGLES);
+     format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
+-    format.setRedBufferSize(8);
+-    format.setGreenBufferSize(8);
+-    format.setBlueBufferSize(8);
++
++    static const bool force888 = 
qEnvironmentVariableIntValue("QT_QPA_EGLFS_FORCE888");
++    if (force888) {
++        format.setRedBufferSize(8);
++        format.setGreenBufferSize(8);
++        format.setBlueBufferSize(8);
++    }
++
+     return format;
+ }
+
+--
+2.17.1
+
diff --git a/meta-arago-distro/recipes-qt/qt5/qtbase_%.bbappend 
b/meta-arago-distro/recipes-qt/qt5/qtbase_%.bbappend
index 88fea3b2..21dc4f88 100644
--- a/meta-arago-distro/recipes-qt/qt5/qtbase_%.bbappend
+++ b/meta-arago-distro/recipes-qt/qt5/qtbase_%.bbappend
@@ -4,7 +4,7 @@ GLES_EXTRA_DEPS = "libdrm wayland"
 
 PACKAGECONFIG[gles2] = "-opengl es2 -eglfs,,virtual/libgles2 virtual/egl 
${GLES_EXTRA_DEPS}"
 
-PR_append = ".arago16"
+PR_append = ".arago17"
 
 QT_CONFIG_FLAGS += "-qpa ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 
'wayland', 'eglfs', d)}"
 
@@ -20,6 +20,7 @@ SRC_URI += "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 
"${QT_EGLFS_PATCHES}", d)}\
     file://0001-deform-Fix-how-controls-are-shown.patch \
     file://0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch \
+    file://0001-eglfs-Force-888-format-only-on-env-flag.patch \
 "
 
 python do_patch_append() {
-- 
2.27.0

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to