From 88f5aca25ee842a60ba38f2e21e04dedf049ee3e Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 9 Jan 2019 15:15:05 +0200 Subject: freescale: egl_viv: cast EGLNative types from vivante functions All vivante functions return void* even when the actual native type (EGLNativeDisplayType, EGLNativeWindowType, etc.) might be typedef'ed as something else, as they do when the CFLAGS from egl.pc are now used. Change-Id: I23bbe223a77d9233bbe0325c1e96f6e0612799cc Reviewed-by: Mikko Gronoff --- ...st-EGLNative-types-from-vivante-functions.patch | 57 ++++++++++++++++++++++ meta-fsl-extras/recipes/qt5/qtbase_git.bbappend | 33 +++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 meta-fsl-extras/recipes/qt5/qtbase/0001-egl_viv-cast-EGLNative-types-from-vivante-functions.patch create mode 100644 meta-fsl-extras/recipes/qt5/qtbase_git.bbappend diff --git a/meta-fsl-extras/recipes/qt5/qtbase/0001-egl_viv-cast-EGLNative-types-from-vivante-functions.patch b/meta-fsl-extras/recipes/qt5/qtbase/0001-egl_viv-cast-EGLNative-types-from-vivante-functions.patch new file mode 100644 index 0000000..dc56cfc --- /dev/null +++ b/meta-fsl-extras/recipes/qt5/qtbase/0001-egl_viv-cast-EGLNative-types-from-vivante-functions.patch @@ -0,0 +1,57 @@ +From 40e76307c1ee1ebe4e0142d623071d0f768f2450 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Wed, 9 Jan 2019 13:01:01 +0000 +Subject: [PATCH] egl_viv: cast EGLNative types from vivante functions + +All vivante functions return void* even when the actual native type +(EGLNativeDisplayType, EGLNativeWindowType, etc.) might be typedef'ed +as something else, as they do when the CFLAGS from egl.pc are now used. +--- + .../deviceintegration/eglfs_viv/qeglfsvivintegration.cpp | 4 ++-- + .../deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp +index 763a4a462b..2fc076ad0c 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp +@@ -65,7 +65,7 @@ void QEglFSVivIntegration::platformInit() + VivanteInit(); + mNativeDisplay = fbGetDisplay(); + #else +- mNativeDisplay = fbGetDisplayByIndex(framebufferIndex()); ++ mNativeDisplay = static_cast(fbGetDisplayByIndex(framebufferIndex())); + #endif + + fbGetDisplayGeometry(mNativeDisplay, &width, &height); +@@ -88,7 +88,7 @@ EGLNativeWindowType QEglFSVivIntegration::createNativeWindow(QPlatformWindow *wi + Q_UNUSED(window) + Q_UNUSED(format) + +- EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height()); ++ EGLNativeWindowType eglWindow = static_cast(fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height())); + return eglWindow; + } + +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp +index 61e2f17766..3bdae239cd 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp +@@ -60,7 +60,7 @@ void QEglFSVivWaylandIntegration::platformInit() + } + + mWaylandDisplay = wl_display_create(); +- mNativeDisplay = fbGetDisplay(mWaylandDisplay); ++ mNativeDisplay = static_cast(fbGetDisplay(mWaylandDisplay)); + fbGetDisplayGeometry(mNativeDisplay, &width, &height); + mScreenSize.setHeight(height); + mScreenSize.setWidth(width); +@@ -81,7 +81,7 @@ EGLNativeWindowType QEglFSVivWaylandIntegration::createNativeWindow(QPlatformWin + Q_UNUSED(window) + Q_UNUSED(format) + +- EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height()); ++ EGLNativeWindowType eglWindow = static_cast(fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height())); + return eglWindow; + } + diff --git a/meta-fsl-extras/recipes/qt5/qtbase_git.bbappend b/meta-fsl-extras/recipes/qt5/qtbase_git.bbappend new file mode 100644 index 0000000..373e614 --- /dev/null +++ b/meta-fsl-extras/recipes/qt5/qtbase_git.bbappend @@ -0,0 +1,33 @@ +############################################################################ +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += " \ + file://0001-egl_viv-cast-EGLNative-types-from-vivante-functions.patch \ + " -- cgit v1.2.3-54-g00ecf