diff options
Diffstat (limited to 'recipes-graphics')
48 files changed, 483 insertions, 464 deletions
diff --git a/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch b/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch deleted file mode 100644 index ae6b0ab7..00000000 --- a/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 45f48f8a5de59c04b0510c23853772bc970f411e Mon Sep 17 00:00:00 2001 -From: Max Krummenacher <max.krummenacher@toradex.com> -Date: Thu, 9 Jan 2020 01:01:35 +0000 -Subject: [PATCH] meson: add libdrm-vivante to the meson meta data - -Upstream libdrm added the option to use meason as the buildsystem. -Integrate Vivante into the relevant meson build information. - -Upstream-Status: Pending - -Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> ---- - meson.build | 14 +++++++++++++ - meson_options.txt | 7 +++++++ - vivante/meson.build | 50 +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 71 insertions(+) - create mode 100644 vivante/meson.build - -diff --git a/meson.build b/meson.build -index e292554a..f4740634 100644 ---- a/meson.build -+++ b/meson.build -@@ -157,6 +157,15 @@ if _vc4 != 'false' - with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family()) - endif - -+with_vivante = false -+_vivante = get_option('vivante') -+if _vivante == 'true' -+ if not with_atomics -+ error('libdrm_vivante requires atomics.') -+ endif -+ with_vivante = true -+endif -+ - # XXX: Apparently only freebsd and dragonfly bsd actually need this (and - # gnu/kfreebsd), not openbsd and netbsd - with_libkms = false -@@ -312,6 +321,7 @@ install_headers( - 'include/drm/savage_drm.h', 'include/drm/sis_drm.h', - 'include/drm/tegra_drm.h', 'include/drm/vc4_drm.h', - 'include/drm/via_drm.h', 'include/drm/virtgpu_drm.h', -+ 'include/drm/vivante_drm.h', - subdir : 'libdrm', - ) - if with_vmwgfx -@@ -362,6 +372,9 @@ endif - if with_etnaviv - subdir('etnaviv') - endif -+if with_vivante -+ subdir('vivante') -+endif - if with_man_pages - subdir('man') - endif -@@ -382,5 +395,6 @@ message(' EXYNOS API @0@'.format(with_exynos)) - message(' Freedreno API @0@ (kgsl: @1@)'.format(with_freedreno, with_freedreno_kgsl)) - message(' Tegra API @0@'.format(with_tegra)) - message(' VC4 API @0@'.format(with_vc4)) -+message(' Vivante API @0@'.format(with_etnaviv)) - message(' Etnaviv API @0@'.format(with_etnaviv)) - message('') -diff --git a/meson_options.txt b/meson_options.txt -index 8af33f1c..dc69563d 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -95,6 +95,13 @@ option( - choices : ['true', 'false', 'auto'], - description : '''Enable support for vc4's KMS API.''', - ) -+option( -+ 'vivante', -+ type : 'combo', -+ value : 'false', -+ choices : ['true', 'false', 'auto'], -+ description : '''Enable support for vivante's propriatary experimental KMS API.''', -+) - option( - 'etnaviv', - type : 'combo', -diff --git a/vivante/meson.build b/vivante/meson.build -new file mode 100644 -index 00000000..f6adb598 ---- /dev/null -+++ b/vivante/meson.build -@@ -0,0 +1,50 @@ -+# Copyright © 2017-2018 Intel Corporation -+ -+# Permission is hereby granted, free of charge, to any person obtaining a copy -+# of this software and associated documentation files (the "Software"), to deal -+# in the Software without restriction, including without limitation the rights -+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+# copies of the Software, and to permit persons to whom the Software is -+# furnished to do so, subject to the following conditions: -+ -+# The above copyright notice and this permission notice shall be included in -+# all copies or substantial portions of the Software. -+ -+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -+# SOFTWARE. -+ -+ -+libdrm_vivante = shared_library( -+ 'drm_vivante', -+ [ -+ files( -+ 'vivante_bo.c', -+ ), -+ config_file -+ ], -+ include_directories : [inc_root, inc_drm], -+ link_with : libdrm, -+ c_args : libdrm_c_args, -+ dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops], -+ version : '1.0.0', -+ install : true, -+) -+ -+pkg.generate( -+ name : 'libdrm_vivante', -+ libraries : libdrm_vivante, -+ subdirs : ['.', 'libdrm'], -+ version : meson.project_version(), -+ requires_private : 'libdrm', -+ description : 'Userspace interface to Vivante kernel DRM services', -+) -+ -+ext_libdrm_vivante = declare_dependency( -+ link_with : [libdrm, libdrm_vivante], -+ include_directories : [inc_drm, include_directories('.')], -+) --- -2.20.1 - diff --git a/recipes-graphics/drm/libdrm_2.4.102.imx.bb b/recipes-graphics/drm/libdrm_2.4.109.imx.bb index bffef407..6a9ab254 100644 --- a/recipes-graphics/drm/libdrm_2.4.102.imx.bb +++ b/recipes-graphics/drm/libdrm_2.4.109.imx.bb @@ -11,14 +11,13 @@ PROVIDES = "drm" DEPENDS = "libpthread-stubs" IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1" -IMX_LIBDRM_BRANCH ?= "libdrm-imx-2.4.102" -SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \ - file://0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch " -SRCREV = "40ea53973b99b7df07f472318918a8c2b310e4a7" +SRCBRANCH ?= "libdrm-imx-2.4.109" +SRC_URI = "${IMX_LIBDRM_SRC};branch=${SRCBRANCH}" +SRCREV = "1d943abb1fccc350a129950d2690948f64503bb7" S = "${WORKDIR}/git" DEFAULT_PREFERENCE = "-1" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" inherit meson pkgconfig manpages @@ -40,7 +39,7 @@ PACKAGECONFIG[valgrind] = "-Dvalgrind=true,-Dvalgrind=false,valgrind" PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false" PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=true,-Dcairo-tests=false" PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev" -PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native" +PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native python3-docutils-native" ALLOW_EMPTY:${PN}-drivers = "1" PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ diff --git a/recipes-graphics/images/core-image-weston.bbappend b/recipes-graphics/images/core-image-weston.bbappend index 77d2fe74..0d4a0c6f 100644 --- a/recipes-graphics/images/core-image-weston.bbappend +++ b/recipes-graphics/images/core-image-weston.bbappend @@ -1,3 +1,3 @@ # FIXME: i.MX6SL cannot use mesa for Graphics and it lacks GL support, # so for now we skip it. -CORE_IMAGE_BASE_INSTALL:remove:mx6sl = "clutter-1.0-examples" +CORE_IMAGE_BASE_INSTALL:remove:mx6sl-nxp-bsp = "clutter-1.0-examples" diff --git a/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.9.4.bb b/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.9.4.bb deleted file mode 100644 index c340505e..00000000 --- a/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.9.4.bb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2021 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" -PROVIDES += "virtual/libg2d" - -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "0b7fc529b3af3ecc3087a99cca0c627d" -SRC_URI[sha256sum] = "42d470373fd72b2e2aa8d8a226e133c61b0a88e4e5bddbfec9509f7d2764f206" - -inherit fsl-eula-unpack - -do_install () { - install -d ${D}${libdir} - install -d ${D}${includedir} - cp -r ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} - cp -r ${S}/gpu-demos/opt ${D} -} - -FILES:${PN} = "${libdir}/libg2d* /opt" -FILES:${PN}-dev = "${libdir}/libg2d${SOLIBSDEV} ${includedir}" -INSANE_SKIP:${PN} += "ldflags" - -RDEPENDS:${PN} = "libgal-imx libdrm libopencl-imx" - -# This is required to provide support for VPU Amphion HEVC tile format -# From NXP [MGS-5547] (commit e175d6b4f78deab24d319b852998bef55cdecc99): -# VPU Amphion HEVC tile support was added using OpenCL, so add a dependency on libopencl-imx. -RDEPENDS:${PN} += "libopencl-imx" - -COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/recipes-graphics/imx-g2d/imx-dpu-g2d_2.0.0.bb b/recipes-graphics/imx-g2d/imx-dpu-g2d_2.0.0.bb new file mode 100644 index 00000000..c8e4169d --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-dpu-g2d_2.0.0.bb @@ -0,0 +1,27 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2022 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "G2D library using i.MX DPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=be5ff43682ed6c57dfcbeb97651c2829" + +DEPENDS = "libgal-imx libdrm" +PROVIDES += "virtual/libg2d" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" +SRC_URI[md5sum] = "96bc124401896dec1272a86cb2baef54" +SRC_URI[sha256sum] = "8e636b65b08cba6b4c2130c8dbff81ee1af42ef818c013aede81ab7e321899a4" + +inherit fsl-eula-unpack + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + cp -r ${S}/g2d/usr/lib/*.so* ${D}${libdir} + cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} +} + +INSANE_SKIP:${PN} += "ldflags" + +COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/recipes-graphics/imx-g2d/imx-g2d-samples_2.0.0.bb b/recipes-graphics/imx-g2d/imx-g2d-samples_2.0.0.bb new file mode 100644 index 00000000..9832aac2 --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-g2d-samples_2.0.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "i.MX G2D Samples" +DESCRIPTION = "Set of sample applications for i.MX G2D" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=0858ec9c7a80c4a2cf16e4f825a2cc91" + +DEPENDS = "virtual/libg2d" + +GPU_G2D_SAMPLES_SRC ?= "git://github.com/nxpmicro/g2d-samples.git;protocol=https" +SRCBRANCH ?= "imx_2.0" +SRC_URI = "${GPU_G2D_SAMPLES_SRC};branch=${SRCBRANCH}" +SRCREV = "267af142881d350218c2c2cead8f304a28bbee07" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" + +PACKAGECONFIG[wayland] = "USE_WAYLAND=true,USE_WAYLAND=false,wayland-native wayland-protocols" + +EXTRA_OEMAKE += " \ + SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ + ${PACKAGECONFIG_CONFARGS} \ +" + +do_install() { + oe_runmake install DESTDIR=${D} +} + +FILES:${PN} += "/opt" + +COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.0.bb b/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.0.bb new file mode 100644 index 00000000..1f3c2e60 --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.0.bb @@ -0,0 +1,33 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2022 NXP +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "G2D library using i.MX GPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=be5ff43682ed6c57dfcbeb97651c2829" +DEPENDS = "libgal-imx" +PROVIDES = "virtual/libg2d" + +FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" + +SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" +SRC_URI[aarch64.md5sum] = "b3b3c285796cd5d47841b73c4735e6bd" +SRC_URI[aarch64.sha256sum] = "f2d592d1389be0c16f8dbe6374d480d674c2e31f4195916dbd6baf71473a0e60" +SRC_URI[arm.md5sum] = "82f6a394505bc9d348a35f26cd02bd6a" +SRC_URI[arm.sha256sum] = "96f0213009087de0842740401a67a19d70d5a7ae928843c9c9bee3f8f177b2a0" + +S = "${WORKDIR}/${FSLBIN_NAME}" + +inherit fsl-eula-unpack + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + cp -r ${S}/g2d/usr/lib/*.so* ${D}${libdir} + cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} +} + +INSANE_SKIP:${PN} = "ldflags" + +COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch index 9f3410d7..2ed5587f 100644 --- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch +++ b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch @@ -15,19 +15,16 @@ Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> wrappers/dlsym.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/wrappers/dlsym.cpp b/wrappers/dlsym.cpp -index cdf5cfdb..4061afc4 100644 ---- a/wrappers/dlsym.cpp -+++ b/wrappers/dlsym.cpp +Index: git/wrappers/dlsym.cpp +=================================================================== +--- git.orig/wrappers/dlsym.cpp ++++ git/wrappers/dlsym.cpp @@ -34,7 +34,7 @@ #include "os.hpp" --#ifdef __GLIBC__ -+#if defined(__GLIBC__) && !(__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) +-#if defined(__GLIBC__) && !defined(__UCLIBC__) ++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !(__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) #include <dlfcn.h> --- -2.17.1 - diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb index dfa8dde7..bd041582 100644 --- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb +++ b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb @@ -4,22 +4,22 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50" DEPENDS = "imx-gpu-viv zlib libpng procps" -SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_9.0 \ +SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_10.0 \ file://0001-dlsym-workaround-glibc-2.34-build-failure.patch \ " -SRCREV = "c50e6a954e44998f2e3793a8de863e961f8008c6" +SRCREV = "90a59407f1cddd31b4dac67e5a2500100eb091bc" S = "${WORKDIR}/git" inherit cmake pkgconfig perlnative python3native -PACKAGECONFIG_BACKEND:mx6 = " \ +PACKAGECONFIG_BACKEND:mx6-nxp-bsp = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'waffle', \ bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ '', d), d)} \ " -PACKAGECONFIG_BACKEND:mx7 = "${PACKAGECONFIG_BACKEND:mx6}" -PACKAGECONFIG_BACKEND:mx8 = "waffle" +PACKAGECONFIG_BACKEND:mx7-nxp-bsp = "${PACKAGECONFIG_BACKEND:mx6-nxp-bsp}" +PACKAGECONFIG_BACKEND:mx8-nxp-bsp = "waffle" PACKAGECONFIG_GPU2D = "" PACKAGECONFIG_GPU2D:imxgpu2d = "vivante" diff --git a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p2.2.bb b/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p2.2.bb deleted file mode 100644 index cc12c451..00000000 --- a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p2.2.bb +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2021 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and no DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" - -DEPENDS += "libgal-imx" -PROVIDES += "virtual/libg2d" - -FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" - -SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" -SRC_URI[aarch64.md5sum] = "64559ad7909bdfe70c66e942e922b49a" -SRC_URI[aarch64.sha256sum] = "40a5ccb7b49eecff4a8003fa74104d4cf659a6519039d3fa9d2f7548813db879" -SRC_URI[arm.md5sum] = "3c50524afe5a19044ea8c0ce2bd9575e" -SRC_URI[arm.sha256sum] = "9c81dfba32f2c86c92d811650e509bdf148b0181f9b3ce9a752e1210f2c78a73" - -S = "${WORKDIR}/${FSLBIN_NAME}" - -inherit fsl-eula-unpack - -do_install () { - install -d ${D}${libdir} - install -d ${D}${includedir} - cp ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} - cp -r ${S}/gpu-demos/opt ${D} -} - -FILES:${PN} = "${libdir}/libg2d* /opt" -FILES:${PN}-dev = "${includedir}" -INSANE_SKIP:${PN} = "ldflags" - -RDEPENDS:${PN} = "libgal-imx" - -COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 14912e1b..8d014259 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc @@ -6,7 +6,7 @@ DESCRIPTION = "GPU driver and apps for i.MX" SECTION = "libs" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" +LIC_FILES_CHKSUM = "file://COPYING;md5=be5ff43682ed6c57dfcbeb97651c2829" DEPENDS += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ @@ -18,7 +18,7 @@ DEPENDS += " \ '', d)} \ " DEPENDS:append:imxdrm = " libdrm wayland" -DEPENDS:append:mx8 = " patchelf-native" +DEPENDS:append:mx8-nxp-bsp = " patchelf-native" # imx-gpu-viv does not provide everything it needs to for virtual/libgl # on x11 backend or on Wayland backend with XWayland support. @@ -31,12 +31,12 @@ EXTRA_PROVIDES:append:imxgpu3d = " \ virtual/libgles1 \ virtual/libgles2 \ " -EXTRA_PROVIDES:append:mx8 = " \ +EXTRA_PROVIDES:append:mx8-nxp-bsp = " \ virtual/libgbm \ " PROVIDES_OPENVX = "" -PROVIDES_OPENVX:mx8 = "virtual/libopenvx" -PROVIDES_OPENVX:mx8mm = "" +PROVIDES_OPENVX:mx8-nxp-bsp = "virtual/libopenvx" +PROVIDES_OPENVX:mx8mm-nxp-bsp = "" PROVIDES += " \ imx-gpu-viv \ libgal-imx \ @@ -56,7 +56,7 @@ PE = "1" inherit fsl-eula-unpack features_check -REQUIRED_DISTRO_FEATURES:mx8 = "wayland" +REQUIRED_DISTRO_FEATURES:mx8-nxp-bsp = "wayland" SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" @@ -67,7 +67,7 @@ PACKAGECONFIG[valgrind] = "" # Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below IMX_PACKAGES_GBM = "" -IMX_PACKAGES_GBM:mx8 = "libgbm-imx libgbm-imx-dev" +IMX_PACKAGES_GBM:mx8-nxp-bsp = "libgbm-imx libgbm-imx-dev" PACKAGES =+ "libclc-imx libclc-imx-dev \ libgl-imx libgl-imx-dev \ libgles1-imx libgles1-imx-dev \ @@ -79,7 +79,6 @@ PACKAGES =+ "libclc-imx libclc-imx-dev \ libvdk-imx libvdk-imx-dev \ libegl-imx libegl-imx-dev \ libgal-imx libgal-imx-dev \ - libvivante-dri-imx \ libvsc-imx \ ${IMX_PACKAGES_GBM} \ imx-gpu-viv-tools \ @@ -94,8 +93,7 @@ python __anonymous () { raise bb.parse.SkipPackage('The kernel of machine needs to have Vivante kernel driver support for this recipe to be used.') } -USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" -USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" +BACKEND = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "fb", d)}" # The packaged binaries have been stripped of debug info, so disable # operations accordingly. @@ -137,26 +135,27 @@ python __anonymous() { } IS_MX6SL = "0" -IS_MX6SL:mx6sl = "1" +IS_MX6SL:mx6sl-nxp-bsp = "1" IS_MX8 = "0" -IS_MX8:mx8 = "1" +IS_MX8:mx8-nxp-bsp = "1" PACKAGE_FP_TYPE = "hardfp" HAS_GBM = "false" -HAS_GBM:mx8 = "true" +HAS_GBM:mx8-nxp-bsp = "true" IMX_SOC = "IMX_SOC_NOT_SET" -IMX_SOC:mx8qm = "mx8qm" -IMX_SOC:mx8mp = "mx8mp" -IMX_SOC:mx8mq = "mx8mq" -IMX_SOC:mx8qxp = "mx8qxp" -IMX_SOC:mx8mn = "mx8mn" -IMX_SOC:mx8ulp = "mx8ulp" +IMX_SOC:mx8qm-nxp-bsp = "mx8qm" +IMX_SOC:mx8qxp-nxp-bsp = "mx8qxp" +IMX_SOC:mx8dx-nxp-bsp = "mx8qxp" +IMX_SOC:mx8mp-nxp-bsp = "mx8mp" +IMX_SOC:mx8mq-nxp-bsp = "mx8mq" +IMX_SOC:mx8mn-nxp-bsp = "mx8mn" +IMX_SOC:mx8ulp-nxp-bsp = "mx8ulp" LIBVULKAN_VERSION_MAJOR = "1" -LIBVULKAN_VERSION = "${LIBVULKAN_VERSION_MAJOR}.1.6" +LIBVULKAN_VERSION = "${LIBVULKAN_VERSION_MAJOR}.2.1" do_install () { install -d ${D}${libdir} @@ -180,44 +179,16 @@ do_install () { install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc fi - # The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb - if [ "${USE_WL}" = "yes" ]; then - - backend=wayland - + if [ "${BACKEND}" = "wayland" ]; then install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc - - if [ "${USE_X11}" = "yes" ]; then - - cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} - - fi - - elif [ "${USE_X11}" = "yes" ]; then - - cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} - - backend=x11 - - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gl_x11.pc ${D}${libdir}/pkgconfig/gl.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_x11.pc ${D}${libdir}/pkgconfig/egl.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2_x11.pc ${D}${libdir}/pkgconfig/glesv2.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg_x11.pc ${D}${libdir}/pkgconfig/vg.pc - else install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc - - # Regular framebuffer install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_linuxfb.pc ${D}${libdir}/pkgconfig/egl.pc - - backend=fb - fi # Install Vendor ICDs for OpenCL's installable client driver loader (ICDs Loader) @@ -225,8 +196,8 @@ do_install () { install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd # Handle backend specific drivers - cp -r ${S}/gpu-core/usr/lib/${backend}/* ${D}${libdir} - if [ "${USE_WL}" = "yes" ]; then + cp -r ${S}/gpu-core/usr/lib/${BACKEND}/* ${D}${libdir} + if [ "${BACKEND}" = "wayland" ] && [ "${IS_MX8}" != "1" ]; then # Special case for libVDK on Wayland backend, deliver fb library as well. cp ${S}/gpu-core/usr/lib/fb/libVDK.so.1.2.0 ${D}${libdir}/libVDK-fb.so.1.2.0 fi @@ -287,9 +258,9 @@ INSANE_SKIP:libgal-imx += "build-deps" FILES:libvsc-imx = "${libdir}/libVSC${SOLIBS}" -FILES:libgbm-imx:mx8 = "${libdir}/libgbm*${REALSOLIBS} ${libdir}/libgbm${SOLIBSDEV} ${libdir}/libgbm_viv${SOLIBSDEV}" -FILES:libgbm-imx-dev:mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" -RDEPENDS:libgbm-imx:append:mx8 = " libdrm" +FILES:libgbm-imx:mx8-nxp-bsp = "${libdir}/libgbm*${REALSOLIBS} ${libdir}/libgbm${SOLIBSDEV} ${libdir}/libgbm_viv${SOLIBSDEV}" +FILES:libgbm-imx-dev:mx8-nxp-bsp = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" +RDEPENDS:libgbm-imx:append:mx8-nxp-bsp = " libdrm" INSANE_SKIP:libgbm-imx += "dev-so" FILES:libvulkan-imx = "${libdir}/libvulkan_VSI${REALSOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}" @@ -346,14 +317,9 @@ FILES:libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${l FILES:libvdk-imx = "${libdir}/libVDK*${REALSOLIBS}" FILES:libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}" -FILES:libvivante-dri-imx = "${libdir}/dri/vivante_dri.so" -RDEPENDS:libvivante-dri-imx = "libdrm" - FILES:imx-gpu-viv-tools = "${bindir}/gmem_info" FILES:imx-gpu-viv-demos = "/opt" INSANE_SKIP:imx-gpu-viv-demos += "rpaths dev-deps" FILES:libnn-imx = "${libdir}/libNN*${SOLIBS}" - -# COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx8)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch32.bb deleted file mode 100644 index 77b75593..00000000 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch32.bb +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2020 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require imx-gpu-viv-6.inc - -SRC_URI[md5sum] = "200ee64d8b922bc2f8718e5d0af01539" -SRC_URI[sha256sum] = "b53e6e2f9b47678bb2f8ad107fea5bd70d111b085e03d246fbaafd1f6cc2dc3a" - -COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch64.bb deleted file mode 100644 index 3a86f97c..00000000 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch64.bb +++ /dev/null @@ -1,6 +0,0 @@ -require imx-gpu-viv-6.inc - -SRC_URI[md5sum] = "612a9bfc0663da7aeee0c4d277acffb7" -SRC_URI[sha256sum] = "ea9ecb151d2dcdaeff1184e5de097bb35d53d8747a743a96d4cfd4a8a3814752" - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch32.bb new file mode 100644 index 00000000..d6cae8b6 --- /dev/null +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch32.bb @@ -0,0 +1,10 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2017-2020 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-gpu-viv-6.inc + +SRC_URI[md5sum] = "9abc4e59919b68f81094c194edb525a2" +SRC_URI[sha256sum] = "5f56e4690287fd4e8480d2c43101ef30383c95d155a3f06beadecad309e684a3" + +COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch64.bb new file mode 100644 index 00000000..81ca2526 --- /dev/null +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch64.bb @@ -0,0 +1,6 @@ +require imx-gpu-viv-6.inc + +SRC_URI[md5sum] = "20cecb3e5440f63bb6612c740ccfe43a" +SRC_URI[sha256sum] = "283f2f51cadf5138bd47269a73425a51f69453556fb80f18521da04317e547a8" + +COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" diff --git a/recipes-graphics/libsdl2/libsdl2_%.bbappend b/recipes-graphics/libsdl2/libsdl2_%.bbappend index af9c97bb..3b2655ce 100644 --- a/recipes-graphics/libsdl2/libsdl2_%.bbappend +++ b/recipes-graphics/libsdl2/libsdl2_%.bbappend @@ -1,6 +1,6 @@ # what vivante driver does libsdl2 mean? Anyway it fails with missing functions as # VIVANTE_Create VIVANTE_GLES_GetProcAddress VIVANTE_GLES_UnloadLibrary ... -EXTRA_OECONF:append:imxgpu2d = " --disable-video-vivante" +EXTRA_OECMAKE:append:imxgpu = " -DSDL_VIVANTE=OFF" CFLAGS:append:imxgpu = " -DLINUX \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_API_FB', d)} \ diff --git a/recipes-graphics/waffle/waffle_%.bbappend b/recipes-graphics/waffle/waffle_%.bbappend index 380273a8..e88f558d 100644 --- a/recipes-graphics/waffle/waffle_%.bbappend +++ b/recipes-graphics/waffle/waffle_%.bbappend @@ -8,8 +8,8 @@ SRC_URI += " \ PACKAGECONFIG_IMXGPU_X11 = "" PACKAGECONFIG_IMXGPU_X11:imxgpu3d = "x11-egl glx" PACKAGECONFIG_IMXGPU_GBM = "gbm" -PACKAGECONFIG_IMXGPU_GBM:mx6 = "" -PACKAGECONFIG_IMXGPU_GBM:mx7 = "" +PACKAGECONFIG_IMXGPU_GBM:mx6-nxp-bsp = "" +PACKAGECONFIG_IMXGPU_GBM:mx7-nxp-bsp = "" PACKAGECONFIG:imxgpu = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ bb.utils.contains('DISTRO_FEATURES', 'x11', '${PACKAGECONFIG_IMXGPU_X11}', \ diff --git a/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb b/recipes-graphics/wayland/wayland-protocols_1.25.imx.bb index 0d1f4726..be6cbdb0 100644 --- a/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb +++ b/recipes-graphics/wayland/wayland-protocols_1.25.imx.bb @@ -9,11 +9,17 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" -SRC_URI = "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.20" -SRCREV = "9cacf108d0ee5863c7a656da5d2271bc2396e43d" +SRC_URI = "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.25" +SRCREV = "a104fb66d1b899dc04077422c2204638675ee4a6" S = "${WORKDIR}/git" -inherit autotools pkgconfig +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +# NOTE: For i.MX drop allarch since the recipe is SOCARCH +#inherit meson pkgconfig allarch +inherit meson pkgconfig + +EXTRA_OEMESON += "-Dtests=false" PACKAGES = "${PN}" FILES:${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 5710e9b5..4ba6cba7 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -6,19 +6,19 @@ IMX_REQUIRED_DISTRO_FEATURES_REMOVE:imxgpu2d = "opengl" IMX_REQUIRED_DISTRO_FEATURES_REMOVE:imxgpu3d = "" REQUIRED_DISTRO_FEATURES:remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" -SRC_URI:append:mx6sl = " file://weston.config" +SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" # To customize weston.ini, start by setting the desired assignment in weston.ini, # commented out. For example: # #xwayland=true # Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. -INI_UNCOMMENT_ASSIGNMENTS:append:imx = " \ +INI_UNCOMMENT_ASSIGNMENTS:append:imx-nxp-bsp = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland=true', '', d)} \ " -INI_UNCOMMENT_ASSIGNMENTS:append:mx8 = " \ +INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \ repaint-window=16 \ " -INI_UNCOMMENT_ASSIGNMENTS:append:mx8mq = " \ +INI_UNCOMMENT_ASSIGNMENTS:append:mx8mq-nxp-bsp = " \ gbm-format=argb8888 \ \\[shell\\] \ size=1920x1080 \ @@ -27,9 +27,10 @@ INI_UNCOMMENT_ASSIGNMENTS:append:mx8mq = " \ # FIXME: The 8QM and 8QXP SoCs have better performance without G2D so don't enable it # Ideally, this should be seamless and Vivante ought to handle it internally and take the fastest # rendering code. -INI_UNCOMMENT_USE_G2D:imxgpu2d ?= "use-g2d=1" -INI_UNCOMMENT_USE_G2D:mx8qm = "" -INI_UNCOMMENT_USE_G2D:mx8qxp = "" +INI_UNCOMMENT_USE_G2D:imxgpu2d ?= "use-g2d=1" +INI_UNCOMMENT_USE_G2D:mx8qm-nxp-bsp = "" +INI_UNCOMMENT_USE_G2D:mx8qxp-nxp-bsp = "" +INI_UNCOMMENT_USE_G2D:mx8dx-nxp-bsp = "" INI_UNCOMMENT_ASSIGNMENTS:append:imxgpu2d = " \ ${INI_UNCOMMENT_USE_G2D} \ " @@ -48,4 +49,5 @@ do_install:append() { for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini done + sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini } diff --git a/recipes-graphics/wayland/weston-init/imx/weston.ini b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini index 916e621a..3e8be42f 100644 --- a/recipes-graphics/wayland/weston-init/imx/weston.ini +++ b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini @@ -5,6 +5,7 @@ idle-time=0 #xwayland=true #repaint-window=16 #enable-overlay-view=1 +modules=screen-share.so #[shell] #size=1920x1080 @@ -27,4 +28,4 @@ touchscreen_calibrator=true #transform=rotate-90 [screen-share] -command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize --rdp-tls-cert=/etc/freerdp/keys/server.crt --rdp-tls-key=/etc/freerdp/keys/server.key diff --git a/recipes-graphics/wayland/weston-init/mx6sl/weston.config b/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config index 6456cd24..6456cd24 100755 --- a/recipes-graphics/wayland/weston-init/mx6sl/weston.config +++ b/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch new file mode 100644 index 00000000..fb2d47bf --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch @@ -0,0 +1,102 @@ +From b719011b7c015e2d6f0108c9d0709b98d21d6a89 Mon Sep 17 00:00:00 2001 +From: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> +Date: Mon, 21 Mar 2022 12:37:18 +0100 +Subject: [PATCH] g2d-renderer: Add vsync to cloned displays. + +When using g2d clone mode allocates additional surfaces according to +FB_MULTI_BUFFER for each cloned display. The g2d blit from the main screen +to the cloned displays is done using inactive surface. The FBIOPAN_DISPLAY +ioctl to the surface is done afterwards. + +Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> +--- + libweston/renderer-g2d/g2d-renderer.c | 33 +++++++++++++++++++++------ + 1 file changed, 26 insertions(+), 7 deletions(-) + +diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c +index 34a077b7..3e6395d6 100644 +--- a/libweston/renderer-g2d/g2d-renderer.c ++++ b/libweston/renderer-g2d/g2d-renderer.c +@@ -525,6 +525,7 @@ g2d_blit_surface(void *handle, struct g2d_surfaceEx * srcG2dSurface, struct g2d_ + static void + g2d_flip_surface(struct weston_output *output) + { ++ int i; + struct g2d_output_state *go = get_output_state(output); + go->fb_info.varinfo.yoffset = go->activebuffer * go->fb_info.y_resolution; + +@@ -532,6 +533,16 @@ g2d_flip_surface(struct weston_output *output) + { + weston_log("FBIOPAN_DISPLAY Failed\n"); + } ++ ++ for (i = 0; i < go->clone_display_num; i++) ++ { ++ go->mirror_fb_info[i].varinfo.yoffset = go->activebuffer * go->mirror_fb_info[i].y_resolution; ++ if(ioctl(go->mirror_fb_info[i].fb_fd, FBIOPAN_DISPLAY, &(go->mirror_fb_info[i].varinfo)) < 0) ++ { ++ weston_log("FBIOPAN_DISPLAY clone %d Failed\n", i); ++ } ++ } ++ + go->activebuffer = (go->activebuffer + 1) % go->nNumBuffers; + } + +@@ -571,17 +582,18 @@ copy_to_framebuffer(struct weston_output *output, pixman_region32_t* output_dama + int i = 0; + for(i = 0; i < go->clone_display_num; i++) + { ++ int idx = i * go->nNumBuffers + go->activebuffer; + g2dRECT srcRect = {0, 0, go->renderSurf[go->activebuffer].base.width, go->renderSurf[go->activebuffer].base.height}; +- g2dRECT dstrect = {0, 0, go->mirrorSurf[i].base.width, go->mirrorSurf[i].base.height}; ++ g2dRECT dstrect = {0, 0, go->mirrorSurf[idx].base.width, go->mirrorSurf[idx].base.height}; + if(go->directBlit || go->nNumBuffers > 1) + { + g2d_blit_surface(gr->handle, &go->renderSurf[go->activebuffer], +- &go->mirrorSurf[i], &srcRect, &dstrect); ++ &go->mirrorSurf[idx], &srcRect, &dstrect); + } + else + { + g2d_blit_surface(gr->handle, &go->offscreenSurface, +- &go->mirrorSurf[i], &srcRect, &dstrect); ++ &go->mirrorSurf[idx], &srcRect, &dstrect); + } + } + } +@@ -2113,6 +2125,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, + int clone_display_num = 0; + int count = 0; + int k=0, dispCount = 0; ++ int offset = 0; + char displays[5][32]; + weston_log("g2d_renderer_output_create device=%s\n", device); + count = strlen(device); +@@ -2166,7 +2179,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, + + if(go->clone_display_num) + { +- go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num); ++ go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num * go->nNumBuffers); + go->mirror_fb_info = zalloc(sizeof(struct fb_screeninfo) * clone_display_num); + if(go->mirrorSurf == NULL || go->mirror_fb_info == NULL) + return -1; +@@ -2178,9 +2191,15 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, + weston_log("Open frame buffer failed.\n"); + return -1; + } +- get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[i]); +- go->mirrorSurf[i].base.planes[0] = go->mirror_fb_info[i].physical; +- g2d_clear(gr->handle, &go->mirrorSurf[i].base); ++ ++ offset = go->mirror_fb_info[i].stride_bytes * go->mirror_fb_info[i].y_resolution; ++ for(k = 0; k < go->nNumBuffers; k++) ++ { ++ int idx = i * go->nNumBuffers + k; ++ get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[idx]); ++ go->mirrorSurf[idx].base.planes[0] = go->mirror_fb_info[i].physical + (offset * k); ++ g2d_clear(gr->handle, &go->mirrorSurf[idx].base); ++ } + } + } + g2d_finish(gr->handle); diff --git a/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch new file mode 100644 index 00000000..db640055 --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch @@ -0,0 +1,52 @@ +From 4be82f75a47bd456452ab713d7d57a75d844f42a Mon Sep 17 00:00:00 2001 +From: Marius Vlad <marius.vlad@collabora.com> +Date: Thu, 1 Apr 2021 00:12:00 +0300 +Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at + DRM-backend tear down + +Tearing down the drm-backend when there are no input devices, would call +for the gbm device destruction before compositor shutdown. The latter +would call into the renderer detroy function and assume that the +EGLDisplay, which was created using the before-mentioned gbm device, is +still available. This patch re-orders the gbm destruction after the +compositor shutdown when no one would make use of it. + +Fixes: #314 + +Signed-off-by: Marius Vlad <marius.vlad@collabora.com> +Suggested-by: Daniel Stone <daniel.stone@collabora.com> + +Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] +--- + libweston/backend-drm/drm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c +index 9d3b5dcc..67834d3e 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -3402,10 +3402,6 @@ err_drm_source: + wl_event_source_remove(b->drm_source); + err_udev_input: + udev_input_destroy(&b->input); +-#ifdef BUILD_DRM_GBM +- if (b->gbm) +- gbm_device_destroy(b->gbm); +-#endif + destroy_sprites(b); + err_udev_dev: + udev_device_unref(drm_device); +@@ -3415,6 +3411,10 @@ err_launcher: + weston_launcher_destroy(compositor->launcher); + err_compositor: + weston_compositor_shutdown(compositor); ++#ifdef BUILD_DRM_GBM ++ if (b->gbm) ++ gbm_device_destroy(b->gbm); ++#endif + free(b); + return NULL; + } +-- +2.17.1 + diff --git a/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch new file mode 100644 index 00000000..06e0f7ba --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch @@ -0,0 +1,32 @@ +From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Tue, 20 Apr 2021 20:42:18 -0700 +Subject: [PATCH] meson.build: fix incorrect header + +The wayland.c actually include 'xdg-shell-client-protocol.h' instead of +the server one, so fix it. Otherwise, it's possible to get build failure +due to race condition. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + libweston/backend-wayland/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build +index 7e82513..29270b5 100644 +--- a/libweston/backend-wayland/meson.build ++++ b/libweston/backend-wayland/meson.build +@@ -10,7 +10,7 @@ srcs_wlwl = [ + fullscreen_shell_unstable_v1_protocol_c, + presentation_time_protocol_c, + presentation_time_server_protocol_h, +- xdg_shell_server_protocol_h, ++ xdg_shell_client_protocol_h, + xdg_shell_protocol_c, + ] + +-- +2.30.2 + diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index 3279a728..f6ebfd8f 100644 --- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -11,7 +11,7 @@ Since starting weston as root is a valid use case by itself, if PAM is not available, provide a default version of weston-launch without non-root-user support. -Upstream-Status: Pending +Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> diff --git a/recipes-graphics/wayland/weston/systemd-notify.weston-start b/recipes-graphics/wayland/weston/systemd-notify.weston-start new file mode 100644 index 00000000..a97e7b38 --- /dev/null +++ b/recipes-graphics/wayland/weston/systemd-notify.weston-start @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + + +if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then + add_weston_module "systemd-notify.so" +fi diff --git a/recipes-graphics/wayland/weston/xwayland.weston-start b/recipes-graphics/wayland/weston/xwayland.weston-start index b483c97c..db384b1a 100644 --- a/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/recipes-graphics/wayland/weston/xwayland.weston-start @@ -2,6 +2,4 @@ if type Xwayland >/dev/null 2>/dev/null; then mkdir -p /tmp/.X11-unix - - add_weston_argument "--modules=xwayland.so" fi diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_9.0.0.imx.bb index 76296c8e..228cf4fa 100644 --- a/recipes-graphics/wayland/weston_9.0.0.imx.bb +++ b/recipes-graphics/wayland/weston_9.0.0.imx.bb @@ -3,7 +3,7 @@ # recipe. The second section customizes the recipe for i.MX. ########### OE-core copy ################## -# Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0 +# Upstream hash: c8aa0222ce2be647911114aaebcbb0d55d7caf87 SUMMARY = "Weston, a Wayland compositor" DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" @@ -16,8 +16,12 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://weston.png \ file://weston.desktop \ file://xwayland.weston-start \ + file://systemd-notify.weston-start \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ + file://0001-meson.build-fix-incorrect-header.patch \ + file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ + file://0001-g2d-renderer-Add-vsync-to-cloned-displays.patch \ " SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " @@ -38,7 +42,7 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" -EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" +EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false" PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ @@ -64,6 +68,8 @@ PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libx PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" # Weston on framebuffer PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +# Weston on RDP +PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" # weston-launch PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" # VA-API desktop recorder @@ -83,7 +89,7 @@ PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-color # Clients support PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" # Virtual remote output with GStreamer on DRM backend -PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0" +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" # Weston with PAM support PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" # Weston with screen-share support @@ -114,6 +120,10 @@ do_install:append() { install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland fi + if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify + fi + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then chmod u+s ${D}${bindir}/weston-launch fi @@ -149,13 +159,11 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork" DEFAULT_PREFERENCE = "-1" SRCBRANCH = "weston-imx-9.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.png \ - file://weston.desktop \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ " -SRCREV = "230e9bc3d647e511e0601e3d45034f22495ed3c7" +SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " +SRCREV = "7859a762617682bd804e210ad3bda6bdcd3ea24a" S = "${WORKDIR}/git" # Disable OpenGL for parts with GPU support for 2D but not 3D diff --git a/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6/pointercal.xinput b/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6-nxp-bsp/pointercal.xinput index ba34b89f..ba34b89f 100644 --- a/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6/pointercal.xinput +++ b/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6-nxp-bsp/pointercal.xinput diff --git a/recipes-graphics/xorg-driver/xf86-video-imx-vivante/rc.autohdmi b/recipes-graphics/xorg-driver/xf86-video-imx-vivante/rc.autohdmi deleted file mode 100644 index 8c16a1d7..00000000 --- a/recipes-graphics/xorg-driver/xf86-video-imx-vivante/rc.autohdmi +++ /dev/null @@ -1,42 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: rc.autohdmi -# Required-Start: $all -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: -### END INIT INFO - -PATH=/sbin:/usr/sbin:/bin:/usr/bin - -# Source function library. -. /etc/init.d/functions - -case "$1" in - start) - echo -n "Starting autohdmi: " - export DISPLAY=:0 - autohdmi & - echo - exit 0 - ;; - reload|force-reload) - echo "Error: argument '$1' not supported" >&2 - exit 3 - ;; - stop) - echo -n "Shutting down autohdmi: " - killproc autohdmi - echo - ;; - restart) - echo -n "Restarting autohdmi: " - $0 stop - $0 start - echo - ;; - *) - echo "Usage: $0 start|stop" >&2 - exit 3 - ;; -esac diff --git a/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb b/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb deleted file mode 100644 index 6944184f..00000000 --- a/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright (C) 2012-2018 O.S. Systems Software LTDA. -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-graphics/xorg-driver/xorg-driver-video.inc - -PE = "3" - -inherit autotools-brokensep update-rc.d pkgconfig - -DEPENDS += "virtual/xserver virtual/libx11 libgal-imx imx-gpu-viv virtual/libg2d pixman" - -LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3" - -SRCREV = "c828e8a7c38743e960967e7bb78c134cec31c102" -SRCBRANCH = "imx_exa_viv6_g2d" -SRC_URI = "git://source.codeaurora.org/external/imx/xf86-video-imx-vivante.git;protocol=https;branch=${SRCBRANCH} \ - file://rc.autohdmi" - -S = "${WORKDIR}/git" - -INITSCRIPT_PACKAGES = "xserver-xorg-extension-viv-autohdmi" -INITSCRIPT_NAME = "rc.autohdmi" -INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." - -EXTRA_OEMAKE += "prefix=${exec_prefix} \ - sysroot=${STAGING_DIR_TARGET} \ - SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ - BUSID_HAS_NUMBER=1 \ - BUILD_IN_YOCTO=1 \ - XSERVER_GREATER_THAN_13=1" -TARGET_CC_ARCH += "${LDFLAGS}" - -PACKAGES =+ "xserver-xorg-extension-viv-autohdmi" - -do_install:append () { - install -d ${D}${includedir} - cp -axr ${S}/EXA/src/vivante_gal/vivante_priv.h ${D}${includedir} - cp -axr ${S}/EXA/src/vivante_gal/vivante_gal.h ${D}${includedir} - - install -d ${D}/${sysconfdir}/init.d - install -m 755 ${WORKDIR}/rc.autohdmi ${D}/${sysconfdir}/init.d/rc.autohdmi - - find ${D}${includedir} -type f -exec chmod 660 {} \; -} - -RDEPENDS:${PN} += "libvivante-dri-imx \ - xserver-xorg-module-exa \ - mesa-driver-swrast \ - xserver-xorg-extension-dri \ - xserver-xorg-extension-dri2 \ - xserver-xorg-extension-glx" - -REALSOLIBS := "${SOLIBS}" -SOLIBS = "${SOLIBSDEV}" - -FILES:${PN} = "${libdir}/*/*/*/vivante_drv${SOLIBS}" -FILES:${PN}-dev = "${includedir} /usr/src ${libdir}/libfsl_x11_ext${SOLIBSDEV}" -FILES:${PN}-dbg = "${libdir}/*/*/*/.debug ${libdir}/.debug/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/.debug/autohdmi" - -FILES:xserver-xorg-extension-viv-autohdmi = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi ${sysconfdir}/init.d/rc.autohdmi" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7ulp)" diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5-generic-bsp/xorg.conf index a99e6f24..a99e6f24 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5-generic-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100755..100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6/xorg.conf deleted file mode 100644 index b89bed60..00000000 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6/xorg.conf +++ /dev/null @@ -1,14 +0,0 @@ -Section "Device" - Identifier "i.MX Accelerated Framebuffer Device" - Driver "vivante" - Option "fbdev" "/dev/fb0" - Option "vivante_fbdev" "/dev/fb0" - Option "HWcursor" "false" -EndSection - -Section "ServerFlags" - Option "BlankTime" "0" - Option "StandbyTime" "0" - Option "SuspendTime" "0" - Option "OffTime" "0" -EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl-nxp-bsp/xorg.conf index de3905ab..de3905ab 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644..100755 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx-nxp-bsp/xorg.conf index de3905ab..de3905ab 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp-nxp-bsp/xorg.conf index de6307a3..de6307a3 100755 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs-generic-bsp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs-generic-bsp/xorg.conf new file mode 100644 index 00000000..79b6c0fc --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs-generic-bsp/xorg.conf @@ -0,0 +1,12 @@ +Section "Device" + Identifier "Kernel Framebuffer Device" + Driver "fbdev" + Option "fbdev" "/dev/fb0" +EndSection + +Section "ServerFlags" + Option "BlankTime" "0" + Option "StandbyTime" "0" + Option "SuspendTime" "0" + Option "OffTime" "0" +EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf index 0c52ad3b..6fe64e11 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf @@ -1,7 +1,7 @@ Section "Device" Identifier "etnaviv" Driver "modesetting" - Option "kmsdev" "/dev/dri/card0" + Option "kmsdev" "/dev/dri/card1" Option "AccelMethod" "glamor" Option "Atomic" "On" EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/vf/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/vf-generic-bsp/xorg.conf index b4ee82a9..b4ee82a9 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/vf/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/vf-generic-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index be3c3817..c956245b 100644 --- a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -19,6 +19,6 @@ SRC_URI:append:imxgpu = " \ IMX_OPENGL_PKGCONFIGS_REMOVE = "" IMX_OPENGL_PKGCONFIGS_REMOVE:imxgpu = "glamor" -OPENGL_PKGCONFIGS:remove:mx6 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" -OPENGL_PKGCONFIGS:remove:mx7 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" +OPENGL_PKGCONFIGS:remove:mx6-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" +OPENGL_PKGCONFIGS:remove:mx7-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" OPENGL_PKGCONFIGS:remove:imxdrm = "dri glx" diff --git a/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch b/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch new file mode 100644 index 00000000..c1e8ae11 --- /dev/null +++ b/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch @@ -0,0 +1,31 @@ +From e75a4d7b4474529967490de6e75ae4f1b7128937 Mon Sep 17 00:00:00 2001 +From: Xianzhong <xianzhong.li@nxp.com> +Date: Sat, 22 Jan 2022 17:57:59 +0800 +Subject: [PATCH 1/3] Prefer to create GLES2 context for glamor EGL + +created the initial patch for xwayland-21.1.2 + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Xianzhong <xianzhong.li@nxp.com> +--- + hw/xwayland/xwayland-glamor-gbm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c +index 12d820e44..8a89919be 100644 +--- a/hw/xwayland/xwayland-glamor-gbm.c ++++ b/hw/xwayland/xwayland-glamor-gbm.c +@@ -866,8 +866,8 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) + goto error; + } + +- if (!xwl_glamor_try_big_gl_api(xwl_screen) && +- !xwl_glamor_try_gles_api(xwl_screen)) { ++ if (!xwl_glamor_try_gles_api(xwl_screen) && ++ !xwl_glamor_try_big_gl_api(xwl_screen)) { + ErrorF("Cannot use neither GL nor GLES2\n"); + goto error; + } +-- +2.17.1 + diff --git a/recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch b/recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch new file mode 100644 index 00000000..1c6cf2ec --- /dev/null +++ b/recipes-graphics/xwayland/xwayland/0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch @@ -0,0 +1,39 @@ +From 4508e54dae9d2884b2d6ccca13450b25d509cc9a Mon Sep 17 00:00:00 2001 +From: Xianzhong <xianzhong.li@nxp.com> +Date: Thu, 5 Aug 2021 16:57:43 +0800 +Subject: [PATCH 3/3] glamor: Fix fbo pixmap format with GL_BGRA_EXT + +Red and Blue channels are swizzled in GLES path, +Fix color inverse problem with ximagesink command: +gst-launch-1.0 videotestsrc pattern=6 num-buffers=1 ! video/x-raw,format=BGRx ! videoconvert ! ximagesink display=:0 -v + +This fix requires GL_EXT_texture_format_BGRA8888 extension, not applicable for upstream. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Xianzhong <xianzhong.li@nxp.com> +--- + glamor/glamor.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: xwayland-21.1.4/glamor/glamor.c +=================================================================== +--- xwayland-21.1.4.orig/glamor/glamor.c ++++ xwayland-21.1.4/glamor/glamor.c +@@ -586,10 +586,17 @@ glamor_setup_formats(ScreenPtr screen) + + if (glamor_priv->is_gles) { + assert(X_BYTE_ORDER == X_LITTLE_ENDIAN); ++#if GL_EXT_texture_format_BGRA8888 ++ glamor_add_format(screen, 24, PICT_x8r8g8b8, ++ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE, TRUE); ++ glamor_add_format(screen, 32, PICT_a8r8g8b8, ++ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE, TRUE); ++#else + glamor_add_format(screen, 24, PICT_x8b8g8r8, + GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE); + glamor_add_format(screen, 32, PICT_a8b8g8r8, + GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE); ++#endif + } else { + glamor_add_format(screen, 24, PICT_x8r8g8b8, + GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); diff --git a/recipes-graphics/xwayland/xwayland_%.bbappend b/recipes-graphics/xwayland/xwayland_%.bbappend index b3e79e09..69063121 100644 --- a/recipes-graphics/xwayland/xwayland_%.bbappend +++ b/recipes-graphics/xwayland/xwayland_%.bbappend @@ -1,4 +1,12 @@ -IMX_OPENGL_PKGCONFIGS_REMOVE = "" -IMX_OPENGL_PKGCONFIGS_REMOVE:imxgpu = "glamor" -OPENGL_PKGCONFIGS:remove:mx6 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" -OPENGL_PKGCONFIGS:remove:mx7 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:imxgpu = " \ + file://0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch \ + file://0002-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch \ +" + +OPENGL_PKGCONFIGS:remove:imxgpu = "${OPENGL_PKGCONFIGS_REMOVE_IMXGPU}" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU = "" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx6-nxp-bsp = "glamor glx" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx7-nxp-bsp = "glamor glx" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx8-nxp-bsp = "glx" |