aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-10-05 09:58:50 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2020-10-05 11:08:14 +0300
commite754f28566467659fc2d884d0569cd22f21c0340 (patch)
treeeba50889856a840ec4c587d89d79448ea8f86085
parentff154cda1e1bbe421843443e37b6f9642735f074 (diff)
qtbase: support eglfs_viv plugin for imx6
Add patches that enabled eglfs_viv integration plugin build for imx6 boards, and that will set it as the default plugin without need to specify it at runtime. Change-Id: I444c24c649d61cd93de010f231ebbb0ab15f445a Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rw-r--r--recipes-qt/qt6/qtbase/0001-CMake-enable-egl_viv-plugins.patch120
-rw-r--r--recipes-qt/qt6/qtbase/0001-CMake-set-default-eglfs-device-integration-plugin.patch47
-rw-r--r--recipes-qt/qt6/qtbase_git.bb2
3 files changed, 169 insertions, 0 deletions
diff --git a/recipes-qt/qt6/qtbase/0001-CMake-enable-egl_viv-plugins.patch b/recipes-qt/qt6/qtbase/0001-CMake-enable-egl_viv-plugins.patch
new file mode 100644
index 0000000..ce20880
--- /dev/null
+++ b/recipes-qt/qt6/qtbase/0001-CMake-enable-egl_viv-plugins.patch
@@ -0,0 +1,120 @@
+From fe20227639b2bacdb35237754c821632707d87db Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Fri, 2 Oct 2020 11:16:34 +0300
+Subject: [PATCH] CMake: enable egl_viv plugins
+
+Add needed define for egl_viv compile test and generate CMakeLists
+for the egl_viv plugins.
+
+Task-number: QTBUG-77809
+Change-Id: I3b354faee36cbb85adcee895430eb5e8998108e1
+---
+ src/gui/configure.cmake | 2 ++
+ .../eglfs/deviceintegration/CMakeLists.txt | 4 +--
+ .../eglfs_viv/CMakeLists.txt | 27 +++++++++++++++++
+ .../eglfs_viv_wl/CMakeLists.txt | 29 +++++++++++++++++++
+ 4 files changed, 60 insertions(+), 2 deletions(-)
+ create mode 100644 src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/CMakeLists.txt
+ create mode 100644 src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/CMakeLists.txt
+
+diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
+index 52da746d4d..40bf652f43 100644
+--- a/src/gui/configure.cmake
++++ b/src/gui/configure.cmake
+@@ -278,6 +278,8 @@ qt_config_compile_test(egl_viv
+ LABEL "i.Mx6 EGL"
+ LIBRARIES
+ EGL::EGL
++ COMPILE_OPTIONS # special case
++ "-DEGL_API_FB=1" # special case
+ CODE
+ "
+ #include <EGL/egl.h>
+diff --git a/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
+index 7ddcb8993f..827bb51fd3 100644
+--- a/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
++++ b/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
+@@ -22,13 +22,13 @@ if(QT_FEATURE_eglfs_mali)
+ # add_subdirectory(eglfs_mali) # special case TODO
+ endif()
+ if(QT_FEATURE_eglfs_viv)
+- # add_subdirectory(eglfs_viv) # special case TODO
++ add_subdirectory(eglfs_viv)
+ endif()
+ if(QT_FEATURE_eglfs_rcar)
+ # add_subdirectory(eglfs_rcar) # special case TODO
+ endif()
+ if(QT_FEATURE_eglfs_viv_wl)
+- # add_subdirectory(eglfs_viv_wl) # special case TODO
++ add_subdirectory(eglfs_viv_wl)
+ endif()
+ if(QT_FEATURE_eglfs_openwfd)
+ # add_subdirectory(eglfs_openwfd) # special case TODO
+diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/CMakeLists.txt
+new file mode 100644
+index 0000000000..72952c6c5d
+--- /dev/null
++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/CMakeLists.txt
+@@ -0,0 +1,27 @@
++# Generated from eglfs_viv.pro.
++
++#####################################################################
++## QEglFSVivIntegrationPlugin Plugin:
++#####################################################################
++
++qt_internal_add_plugin(QEglFSVivIntegrationPlugin
++ OUTPUT_NAME qeglfs-viv-integration
++ TYPE egldeviceintegrations
++ SOURCES
++ qeglfsvivintegration.cpp qeglfsvivintegration.h
++ qeglfsvivmain.cpp
++ DEFINES
++ EGL_API_FB=1
++ LINUX=1
++ INCLUDE_DIRECTORIES
++ ../../api
++ PUBLIC_LIBRARIES
++ Qt::Core
++ Qt::CorePrivate
++ Qt::EglFSDeviceIntegrationPrivate
++ Qt::Gui
++ Qt::GuiPrivate
++)
++
++#### Keys ignored in scope 1:.:.:eglfs_viv.pro:<TRUE>:
++# OTHER_FILES = "$$PWD/eglfs_viv.json"
+diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/CMakeLists.txt
+new file mode 100644
+index 0000000000..269bdde02c
+--- /dev/null
++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/CMakeLists.txt
+@@ -0,0 +1,29 @@
++# Generated from eglfs_viv_wl.pro.
++
++#####################################################################
++## QEglFSVivWaylandIntegrationPlugin Plugin:
++#####################################################################
++
++qt_internal_add_plugin(QEglFSVivWaylandIntegrationPlugin
++ OUTPUT_NAME qeglfs-viv-wl-integration
++ TYPE egldeviceintegrations
++ SOURCES
++ qeglfsvivwlintegration.cpp qeglfsvivwlintegration.h
++ qeglfsvivwlmain.cpp
++ DEFINES
++ EGL_API_FB=1
++ LINUX=1
++ INCLUDE_DIRECTORIES
++ ../../api
++ LIBRARIES
++ Wayland::Server
++ PUBLIC_LIBRARIES
++ Qt::Core
++ Qt::CorePrivate
++ Qt::EglFSDeviceIntegrationPrivate
++ Qt::Gui
++ Qt::GuiPrivate
++)
++
++#### Keys ignored in scope 1:.:.:eglfs_viv_wl.pro:<TRUE>:
++# OTHER_FILES = "$$PWD/eglfs_viv_wl.json"
diff --git a/recipes-qt/qt6/qtbase/0001-CMake-set-default-eglfs-device-integration-plugin.patch b/recipes-qt/qt6/qtbase/0001-CMake-set-default-eglfs-device-integration-plugin.patch
new file mode 100644
index 0000000..403ea5f
--- /dev/null
+++ b/recipes-qt/qt6/qtbase/0001-CMake-set-default-eglfs-device-integration-plugin.patch
@@ -0,0 +1,47 @@
+From 00b272026f528c47a8c5fe69ddff59d381a67037 Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Fri, 2 Oct 2020 13:41:33 +0300
+Subject: [PATCH] CMake: set default eglfs device integration plugin
+
+Use QT_QPA_DEFAULT_EGLFS_INTEGRATION for setting the default eglfs
+device integration plugin, which can be overwritten at runtime using
+QT_QPA_EGLFS_INTEGRATION environment variable.
+
+Change-Id: I1c3ac0c58cdbbb7bb08c2f0ea5abe4d04eb8d61a
+---
+ src/plugins/platforms/eglfs/CMakeLists.txt | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt
+index 00b24aa03c..81b53ee234 100644
+--- a/src/plugins/platforms/eglfs/CMakeLists.txt
++++ b/src/plugins/platforms/eglfs/CMakeLists.txt
+@@ -1,5 +1,19 @@
+ # Generated from eglfs.pro.
+-qt_find_package(EGL) # special case
++# special case begin
++qt_find_package(EGL)
++
++if(QT_FEATURE_eglfs_gbm)
++ set(_device_integration "eglfs_kms")
++elseif(QT_FEATURE_eglfs_egldevice)
++ set(_device_integration "eglfs_kms_egldevice")
++elseif(QT_FEATURE_eglfs_viv)
++ set(_device_integration "eglfs_viv")
++elseif(QT_FEATURE_eglfs_brcm)
++ set(_device_integration "eglfs_brcm")
++endif()
++
++set(QT_QPA_DEFAULT_EGLFS_INTEGRATION "${_device_integration}" CACHE STRING "Default EGLFS device integration plugin")
++# special case end
+
+ #####################################################################
+ ## EglFSDeviceIntegration Module:
+@@ -18,6 +32,7 @@ qt_internal_add_module(EglFSDeviceIntegration
+ DEFINES
+ QT_BUILD_EGL_DEVICE_LIB
+ QT_EGL_NO_X11
++ EGLFS_PREFERRED_PLUGIN=${QT_QPA_DEFAULT_EGLFS_INTEGRATION} # special case
+ INCLUDE_DIRECTORIES
+ api
+ PUBLIC_LIBRARIES
diff --git a/recipes-qt/qt6/qtbase_git.bb b/recipes-qt/qt6/qtbase_git.bb
index 706db01..6305fbe 100644
--- a/recipes-qt/qt6/qtbase_git.bb
+++ b/recipes-qt/qt6/qtbase_git.bb
@@ -18,6 +18,8 @@ SRC_URI += "\
file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0005-Allow-build-without-opengl.patch \
file://0001-CMake-use-HostInfo-when-QT_HOST_PATH-is-set.patch \
+ file://0001-CMake-enable-egl_viv-plugins.patch \
+ file://0001-CMake-set-default-eglfs-device-integration-plugin.patch \
"
DEPENDS += "\