Patchwork [meta-fsl-arm,v2,5/6] qtbase: Disable eglfs build for i.MX6 SoCs using X11

login
register
mail settings
Submitter Otavio Salvador
Date March 7, 2014, 2:52 p.m.
Message ID <1394203965-9775-5-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/68275/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Otavio Salvador - March 7, 2014, 2:52 p.m.
The eglfs hooks require the Framebuffer API calls which are not
available when building for X11; to allow qtbase to build for X11 we
must disable eglfs support due this restriction.

Signed-off-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2:
- new patch

 .../qt5/qtbase/Force_egl_visual_ID_33.patch        | 23 ++++++++++++++++++++++
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         |  5 +++++
 2 files changed, 28 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
Eric BENARD - March 7, 2014, 3:01 p.m.
Le Fri,  7 Mar 2014 11:52:44 -0300,
Otavio Salvador <otavio@ossystems.com.br> a écrit :

> The eglfs hooks require the Framebuffer API calls which are not
> available when building for X11; to allow qtbase to build for X11 we
> must disable eglfs support due this restriction.
> 
> Signed-off-by: Lauren Post <lauren.post@freescale.com>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> 
> Changes in v2:
> - new patch
> 
>  .../qt5/qtbase/Force_egl_visual_ID_33.patch        | 23 ++++++++++++++++++++++
>  qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         |  5 +++++
>  2 files changed, 28 insertions(+)
>  create mode 100644 qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
> 
> diff --git a/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch b/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
> new file mode 100644
> index 0000000..b0be292
> --- /dev/null
> +++ b/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
> @@ -0,0 +1,23 @@
> +Workaround EGL initialization failure due visual mismatch
> +
> +Error:
> +
> +Warning: EGL suggested using X Visual ID 33 (RGB888) for EGL config 28 (RGB444), but this is incompatable
> +Unable to find an X11 visual which matches EGL config 28
> +Could not initialize EGL
> +Aborted
> +
> +Upstream-Status: Inappropriate [workaround]
> +
> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> +
> +diff -Naur qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
> +--- qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp	2013-12-25 19:08:42.163895341 -0800
> ++++ qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp	2013-12-25 19:09:37.207893799 -0800
> +@@ -180,5 +180,5 @@
> +     }
> + 
> +     qWarning("Unable to find an X11 visual which matches EGL config %d", configId);
> +-    return (VisualID)0;
> ++    return (VisualID)33;
> + }
> diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
> index 310d7f7..c1df764 100644
> --- a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
> +++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
> @@ -1,5 +1,9 @@
>  # Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
>  
> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> +
> +SRC_URI += "file://Force_egl_visual_ID_33.patch"
> +
this change is not documented anywhere in the commit log.

Eric
Otavio Salvador - March 7, 2014, 3:25 p.m.
Hello Eric,

On Fri, Mar 7, 2014 at 12:01 PM, Eric Bénard <eric@eukrea.com> wrote:
> Le Fri,  7 Mar 2014 11:52:44 -0300,
> Otavio Salvador <otavio@ossystems.com.br> a écrit :
>
>> The eglfs hooks require the Framebuffer API calls which are not
>> available when building for X11; to allow qtbase to build for X11 we
>> must disable eglfs support due this restriction.
>>
>> Signed-off-by: Lauren Post <lauren.post@freescale.com>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>
>> Changes in v2:
>> - new patch
>>
>>  .../qt5/qtbase/Force_egl_visual_ID_33.patch        | 23 ++++++++++++++++++++++
>>  qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         |  5 +++++
>>  2 files changed, 28 insertions(+)
>>  create mode 100644 qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
>>
>> diff --git a/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch b/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
>> new file mode 100644
>> index 0000000..b0be292
>> --- /dev/null
>> +++ b/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
>> @@ -0,0 +1,23 @@
>> +Workaround EGL initialization failure due visual mismatch
>> +
>> +Error:
>> +
>> +Warning: EGL suggested using X Visual ID 33 (RGB888) for EGL config 28 (RGB444), but this is incompatable
>> +Unable to find an X11 visual which matches EGL config 28
>> +Could not initialize EGL
>> +Aborted
>> +
>> +Upstream-Status: Inappropriate [workaround]
>> +
>> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> +
>> +diff -Naur qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
>> +--- qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp  2013-12-25 19:08:42.163895341 -0800
>> ++++ qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp   2013-12-25 19:09:37.207893799 -0800
>> +@@ -180,5 +180,5 @@
>> +     }
>> +
>> +     qWarning("Unable to find an X11 visual which matches EGL config %d", configId);
>> +-    return (VisualID)0;
>> ++    return (VisualID)33;
>> + }
>> diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
>> index 310d7f7..c1df764 100644
>> --- a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
>> +++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
>> @@ -1,5 +1,9 @@
>>  # Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
>>
>> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>> +
>> +SRC_URI += "file://Force_egl_visual_ID_33.patch"
>> +
> this change is not documented anywhere in the commit log.

Good catch.

New changelog is:

--
qtbase: Disable eglfs build for i.MX6 SoCs using X11

The eglfs hooks require the Framebuffer API calls which are not
available when building for X11; to allow qtbase to build for X11 we
must disable eglfs support due this restriction.

A patch to workaround EGL initialization failure due visual mismatch
has been included as well, forcing Visual ID 33.
--

I will send a v3 but please advice if you think it is good now.

Patch

diff --git a/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch b/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
new file mode 100644
index 0000000..b0be292
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qtbase/Force_egl_visual_ID_33.patch
@@ -0,0 +1,23 @@ 
+Workaround EGL initialization failure due visual mismatch
+
+Error:
+
+Warning: EGL suggested using X Visual ID 33 (RGB888) for EGL config 28 (RGB444), but this is incompatable
+Unable to find an X11 visual which matches EGL config 28
+Could not initialize EGL
+Aborted
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff -Naur qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
+--- qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp	2013-12-25 19:08:42.163895341 -0800
++++ qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp	2013-12-25 19:09:37.207893799 -0800
+@@ -180,5 +180,5 @@
+     }
+ 
+     qWarning("Unable to find an X11 visual which matches EGL config %d", configId);
+-    return (VisualID)0;
++    return (VisualID)33;
+ }
diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
index 310d7f7..c1df764 100644
--- a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
+++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
@@ -1,5 +1,9 @@ 
 # Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
 
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://Force_egl_visual_ID_33.patch"
+
 HAS_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"
 
 PACKAGECONFIG_GL_mx5 = "gles2"
@@ -7,6 +11,7 @@  PACKAGECONFIG_append_mx5 = " tslib icu examples"
 
 PACKAGECONFIG_GL_mx6 = "gles2"
 PACKAGECONFIG_append_mx6 = " tslib icu examples"
+QT_CONFIG_FLAGS_append_mx6 = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', '', d)}"
 
 do_configure_prepend_mx5() {
     sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf