From 41f719f070eff3ae5774a175763fa91fd8169e28 Mon Sep 17 00:00:00 2001 From: Parth Gajjar Date: Wed, 22 Mar 2023 07:07:50 -0700 Subject: kernel-module-mali: Updated clock name to match LIMA driver Added 0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch Updated clock name and structure to match LIMA driver Signed-off-by: Parth Gajjar Fixup patch path to match recipe S value. Signed-off-by: Mark Hatle --- .../recipes-graphics/mali/kernel-module-mali.bb | 1 + ...ck-name-and-structure-to-match-LIMA-drive.patch | 95 ++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb index 047c0d7a..268759c2 100644 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb @@ -33,6 +33,7 @@ SRC_URI = " \ file://0024-Use-community-device-tree-names.patch \ file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ file://0026-Fix-gpu-driver-probe-failure.patch \ + file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ " SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch new file mode 100644 index 00000000..18081dc3 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch @@ -0,0 +1,95 @@ +From a64707b7fea40d326c5b18636a41a5994f60048d Mon Sep 17 00:00:00 2001 +From: Parth Gajjar +Date: Fri, 24 Feb 2023 05:11:38 -0800 +Subject: [PATCH] Updated clock name and structure to match LIMA driver + +Clock-names: + gpu -> bus + gpu_pp0,gpu_pp1 -> core + +This will allow us to have a single device tree that works with both the +mali driver, as well as the lima driver. + +Signed-off-by: Parth Gajjar +--- + linux/mali_kernel_linux.c | 37 +++++++------------ + 1 file changed, 13 insertions(+), 24 deletions(-) + +diff --git a/linux/mali_kernel_linux.c b/linux/mali_kernel_linux.c +index ad450b4..050af67 100644 +--- a/linux/mali_kernel_linux.c ++++ b/linux/mali_kernel_linux.c +@@ -48,9 +48,8 @@ + + #if defined(CONFIG_ARCH_ZYNQMP) + /* Initialize variables for clocks */ +-struct clk *clk_gpu; +-struct clk *clk_gpu_pp0; +-struct clk *clk_gpu_pp1; ++struct clk *clk_bus; ++struct clk *clk_core; + mali_bool clk_enabled; + #endif + +@@ -291,19 +290,14 @@ static int mali_enable_clk(void) + return 0; + + clk_enabled = MALI_TRUE; +- err = clk_prepare_enable(clk_gpu); ++ err = clk_prepare_enable(clk_bus); + if (err) { + MALI_PRINT_ERROR(("Could not enable clock for GP\n\r")); + return err; + } +- err = clk_prepare_enable(clk_gpu_pp0); ++ err = clk_prepare_enable(clk_core); + if (err) { +- MALI_PRINT_ERROR(("Could not enable clock for PP0\n\r")); +- return err; +- } +- err = clk_prepare_enable(clk_gpu_pp1); +- if (err) { +- MALI_PRINT_ERROR(("Could not enable clock for PP1\n\r")); ++ MALI_PRINT_ERROR(("Could not enable clock for PP\n\r")); + return err; + } + #endif +@@ -315,9 +309,8 @@ static void mali_disable_clk(void) + #if defined(CONFIG_ARCH_ZYNQMP) + if (clk_enabled) { + clk_enabled = MALI_FALSE; +- clk_disable_unprepare(clk_gpu); +- clk_disable_unprepare(clk_gpu_pp0); +- clk_disable_unprepare(clk_gpu_pp1); ++ clk_disable_unprepare(clk_bus); ++ clk_disable_unprepare(clk_core); + } + #endif + } +@@ -631,17 +624,13 @@ static int mali_probe(struct platform_device *pdev) + + #if defined(CONFIG_ARCH_ZYNQMP) + /* Initialize clocks for GPU and PP */ +- clk_gpu = devm_clk_get(&pdev->dev, "gpu"); +- if (IS_ERR(clk_gpu)) +- return PTR_ERR(clk_gpu); +- +- clk_gpu_pp0 = devm_clk_get(&pdev->dev, "core"); +- if (IS_ERR(clk_gpu_pp0)) +- return PTR_ERR(clk_gpu_pp0); ++ clk_bus = devm_clk_get(&pdev->dev, "bus"); ++ if (IS_ERR(clk_bus)) ++ return PTR_ERR(clk_bus); + +- clk_gpu_pp1 = devm_clk_get(&pdev->dev, "bus"); +- if (IS_ERR(clk_gpu_pp1)) +- return PTR_ERR(clk_gpu_pp1); ++ clk_core = devm_clk_get(&pdev->dev, "core"); ++ if (IS_ERR(clk_core)) ++ return PTR_ERR(clk_core); + #endif + + err = mali_enable_clk(); +-- +2.25.1 + -- cgit v1.2.3-54-g00ecf From fa27f3d92416ea301b007b908fce5fb9bcfecc32 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 10 Apr 2023 09:13:17 -0700 Subject: meta_%.bbappend: Avoid contaminating mesa-native PACKAGECONFIG Adding meta-xilinx-core was contaminating the PACKAGECONFIG hash when building mesa-native. Workaround this by only adjusting the value when class-target is defined. Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend index 1b2230f7..8c0e7898 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend @@ -6,7 +6,7 @@ CONFLICT_DISTRO_FEATURES:class-target = "${@bb.utils.contains('MACHINE_FEATURES' # Enable lima if not using libmali PACKAGECONFIG_MALI = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '', 'lima', d)}" -PACKAGECONFIG:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${PACKAGECONFIG_MALI}', '', d)}" +PACKAGECONFIG:append:class-target = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${PACKAGECONFIG_MALI}', '', d)}" PACKAGE_ARCH_DEFAULT := "${PACKAGE_ARCH}" PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MACHINE_ARCH}', '${PACKAGE_ARCH_DEFAULT}', d)}" -- cgit v1.2.3-54-g00ecf From 4c17247f4e5e186776903e5ff3effa523e7e5ee2 Mon Sep 17 00:00:00 2001 From: Sandeep Gundlupet Raju Date: Tue, 27 Jun 2023 15:44:36 -0600 Subject: xserver-xorg: Move monitor hotplug rules from meta-petalinux Signed-off-by: Sandeep Gundlupet Raju Signed-off-by: Mark Hatle --- .../xserver-xorg/99-monitor-hotplug.rules | 1 + .../xorg-xserver/xserver-xorg/monitor-hotplug.sh | 50 ++++++++++++++++++++++ .../xorg-xserver/xserver-xorg_%.bbappend | 17 ++++++++ 3 files changed, 68 insertions(+) create mode 100644 meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/99-monitor-hotplug.rules create mode 100755 meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/99-monitor-hotplug.rules b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/99-monitor-hotplug.rules new file mode 100644 index 00000000..eeb7d671 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/99-monitor-hotplug.rules @@ -0,0 +1 @@ +ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", RUN+="/usr/bin/monitor-hotplug.sh" diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh new file mode 100755 index 00000000..d603082d --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh @@ -0,0 +1,50 @@ +#! /bin/sh + +# Copyright (C) 2018 Xilinx, Inc. All rights reserved. +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. +# +# 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. + +# Adapt this script to your needs. + +DEVICES=$(find /sys/class/drm/*/status) + +# inspired by /etc/acpd/lid.sh and the function it sources. + +displaynum=`ls /tmp/.X11-unix/* | sed s#/tmp/.X11-unix/X##` +display=":$displaynum.0" +export DISPLAY=":$displaynum.0" + +# from https://wiki.archlinux.org/index.php/Acpid#Laptop_Monitor_Power_Off +export XAUTHORITY=$(ps -C Xorg -f --no-header | sed -n 's/.*-auth //; s/ -[^ ].*//; p') + +for i in /sys/class/drm/*/*/status ; +do + status=$(cat $i); + connector=${i%/status*}; + connector=${connector#*-}; + if [ "$status" == "disconnected" ]; then + xset dpms force off + elif [ "$status" == "connected" ]; then + xset dpms force on + if [ "$(xrandr | grep '\*')" = "" ]; then + xrandr --output $connector --auto + fi + fi +done diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index 83fd7fa6..a9973eff 100644 --- a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -2,3 +2,20 @@ DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://monitor-hotplug.sh \ + file://99-monitor-hotplug.rules \ + " + +do_install:append() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/monitor-hotplug.sh ${D}${bindir} + + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/99-monitor-hotplug.rules ${D}${sysconfdir}/udev/rules.d/local.rules +} + +FILES:${PN} += "${sysconfdir}/udev/rules.d/*" -- cgit v1.2.3-54-g00ecf From 076b278f8e15b5d3f23f3cb625399b950c273c99 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 6 Jul 2023 14:27:29 -0600 Subject: weston: Add Weston 9.0.0 for libmali, disable Weston 10.0.2 with libmali libmali only provides GL ES 2 interfaces, but Weston 10.0.2 requires GL ES 3 interfaces. Disble 10.0.2 version in this case, and fall back to 9.0.0. The 9.0.0 version is based on the last 9.0.0 supported Yocto Project version. One minor change was required, in order to support on-target upgrade from the unmodified 10.0.2 to the libmali 9.0.0 requires a way to enabel PE set to 1. However if the 9.0.0 version doesn't use libmali, we don't want the PE set so that 10.0.2 remains the superior version. Signed-off-by: Mark Hatle --- ...L_EXT_unpack_subimage-not-supported-for-G.patch | 33 ---- .../0002-libmali-does-not-support-gles3.patch | 77 -------- ...ackend-drm-Re-order-gbm-destruction-at-DR.patch | 50 ++++++ .../0001-meson.build-fix-incorrect-header.patch | 32 ++++ ...de-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch | 47 +++++ ...ch-Provide-a-default-version-that-doesn-t.patch | 199 +++++++++++++++++++++ .../wayland/weston/dont-use-plane-add-prop.patch | 23 +++ .../wayland/weston/systemd-notify.weston-start | 9 + .../recipes-graphics/wayland/weston/weston.desktop | 9 + .../recipes-graphics/wayland/weston/weston.png | Bin 0 -> 2383 bytes .../wayland/weston/xwayland.weston-start | 5 + .../recipes-graphics/wayland/weston_%.bbappend | 13 -- .../wayland/weston_10.0.2.bbappend | 8 + .../recipes-graphics/wayland/weston_9.0.0.bb | 148 +++++++++++++++ 14 files changed, 530 insertions(+), 123 deletions(-) delete mode 100644 meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-GL_EXT_unpack_subimage-not-supported-for-G.patch delete mode 100644 meta-xilinx-core/recipes-graphics/wayland/files/0002-libmali-does-not-support-gles3.patch create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/systemd-notify.weston-start create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/weston.png create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston_10.0.2.bbappend create mode 100644 meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-GL_EXT_unpack_subimage-not-supported-for-G.patch b/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-GL_EXT_unpack_subimage-not-supported-for-G.patch deleted file mode 100644 index e2e7dd95..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-GL_EXT_unpack_subimage-not-supported-for-G.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 354bbf9657385519dceeff6a890a71f9d53e6a8f Mon Sep 17 00:00:00 2001 -From: Parth Gajjar -Date: Tue, 17 Jan 2023 02:04:32 -0800 -Subject: [PATCH] libweston: GL_EXT_unpack_subimage not supported for GLES2.0 - -Removing GL_EXT_unpack_subimage as not supported by GLES2.0 - -Signed-off-by: Parth Gajjar ---- - libweston/renderer-gl/gl-renderer.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c -index 613ddf4..046a26f 100644 ---- a/libweston/renderer-gl/gl-renderer.c -+++ b/libweston/renderer-gl/gl-renderer.c -@@ -3941,11 +3941,13 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface) - else - ec->read_format = PIXMAN_a8b8g8r8; - -+#if 0 - if (gr->gl_version < gr_gl_version(3, 0) && - !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) { - weston_log("GL_EXT_unpack_subimage not available.\n"); - return -1; - } -+#endif - - if (gr->gl_version >= gr_gl_version(3, 0) || - weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV")) --- -2.34.1 - diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/0002-libmali-does-not-support-gles3.patch b/meta-xilinx-core/recipes-graphics/wayland/files/0002-libmali-does-not-support-gles3.patch deleted file mode 100644 index d4dadc7c..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/files/0002-libmali-does-not-support-gles3.patch +++ /dev/null @@ -1,77 +0,0 @@ -libmali does not support libgles3 - -Build in compatible ifdefs where necessary to workaround slight differences -between GLES2 (mali) and GLES3 (mesa) that Weston is expecting. - -Signed-off-by: Mark Hatle - -diff -urN a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c ---- a/libweston/renderer-gl/gl-renderer.c 2022-07-26 03:22:25.000000000 -0700 -+++ b/libweston/renderer-gl/gl-renderer.c 2022-10-26 16:25:13.497247422 -0700 -@@ -29,7 +29,7 @@ - - #include - #include --#include -+/*#include */ - - #include - #include -@@ -1822,7 +1822,13 @@ - return GL_RED_EXT; - case GL_RG8_EXT: - return GL_RG_EXT; -+#ifndef GL_RGBA16F -+#define GL_RGBA16F GL_RGBA16F_EXT -+#endif - case GL_RGBA16F: -+#ifndef GL_RGB10_A2 -+#define GL_RGB10_A2 GL_RGB10_A2_EXT -+#endif - case GL_RGB10_A2: - return GL_RGBA; - default: -@@ -2023,6 +2029,9 @@ - gs->shader_variant = SHADER_VARIANT_RGBA; - pitch = wl_shm_buffer_get_stride(shm_buffer) / 8; - gl_format[0] = GL_RGBA16F; -+#ifndef GL_HALF_FLOAT -+#define GL_HALF_FLOAT GL_HALF_FLOAT_OES -+#endif - gl_pixel_type = GL_HALF_FLOAT; - es->is_opaque = false; - break; -diff -urN a/libweston/renderer-gl/gl-shader-config-color-transformation.c b/libweston/renderer-gl/gl-shader-config-color-transformation.c ---- a/libweston/renderer-gl/gl-shader-config-color-transformation.c 2022-07-26 03:22:25.000000000 -0700 -+++ b/libweston/renderer-gl/gl-shader-config-color-transformation.c 2022-07-26 03:22:25.000000000 -0700 -@@ -25,7 +25,8 @@ - - #include "config.h" - --#include -+#include -+/*#include */ - #include - - #include -@@ -138,6 +139,9 @@ - glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0); -+#ifndef GL_R32F -+#define GL_R32F GL_R32F_EXT -+#endif - glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, lut_len, nr_rows, 0, - GL_RED_EXT, GL_FLOAT, lut); - -diff -ur a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h ---- a/shared/weston-egl-ext.h 2022-07-26 03:22:25.000000000 -0700 -+++ b/shared/weston-egl-ext.h 2022-10-26 17:11:28.501107772 -0700 -@@ -150,6 +150,7 @@ - #define EGL_NO_DEVICE_EXT EGL_CAST(EGLDeviceEXT,0) - #define EGL_BAD_DEVICE_EXT 0x322B - #define EGL_DEVICE_EXT 0x322C -+#define EGLAttrib EGLAttribKHR - typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); - typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); - typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch new file mode 100644 index 00000000..f8f75894 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch @@ -0,0 +1,50 @@ +From c8bfa1f8d576cdc6d515dbbac36c48c6166be0d5 Mon Sep 17 00:00:00 2001 +From: Marius Vlad +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 +Suggested-by: Daniel Stone + +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 2780f3b..fbcfeca 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -3025,10 +3025,6 @@ err_drm_source: + err_udev_input: + udev_input_destroy(&b->input); + err_sprite: +-#ifdef BUILD_DRM_GBM +- if (b->gbm) +- gbm_device_destroy(b->gbm); +-#endif + destroy_sprites(b); + err_udev_dev: + udev_device_unref(drm_device); +@@ -3038,6 +3034,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.33.0 diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch new file mode 100644 index 00000000..06e0f7ba --- /dev/null +++ b/meta-xilinx-core/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 +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 +--- + 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/meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch new file mode 100644 index 00000000..6fe86ff3 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch @@ -0,0 +1,47 @@ +From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Tue, 8 Sep 2020 19:37:42 -0400 +Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and + O_CREAT + +musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), +O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: + +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~ +| | popen +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~ + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] + +Signed-off-by: Denys Dmytriyenko +--- + tests/weston-test-fixture-compositor.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c +index 0c9855f..e0e32c9 100644 +--- a/tests/weston-test-fixture-compositor.c ++++ b/tests/weston-test-fixture-compositor.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "shared/helpers.h" + #include "weston-test-fixture-compositor.h" +-- +2.7.4 + diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch new file mode 100644 index 00000000..f6ebfd8f --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -0,0 +1,199 @@ +From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 22 Feb 2017 15:53:30 +0200 +Subject: [PATCH] weston-launch: Provide a default version that doesn't require + + PAM + +weston-launch requires PAM for starting weston as a non-root user. + +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: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] + +Signed-off-by: Tom Hochstein +Signed-off-by: Jussi Kukkonen +Signed-off-by: Denys Dmytriyenko +Signed-off-by: Ming Liu + +--- + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/libweston/meson.build b/libweston/meson.build +index 08d23ec..cb9fd3f 100644 +--- a/libweston/meson.build ++++ b/libweston/meson.build +@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( + ) + + if get_option('weston-launch') +- dep_pam = cc.find_library('pam') ++ deps_weston_launch = [systemd_dep, dep_libdrm] + +- if not cc.has_function('pam_open_session', dependencies: dep_pam) +- error('pam_open_session not found for weston-launch') ++ if get_option('pam') ++ dep_pam = cc.find_library('pam') ++ if not cc.has_function('pam_open_session', dependencies: dep_pam) ++ error('pam_open_session not found for weston-launch') ++ endif ++ ++ if dep_pam.found() ++ deps_weston_launch += dep_pam ++ config_h.set('HAVE_PAM', '1') ++ endif + endif + + executable( + 'weston-launch', + 'weston-launch.c', +- dependencies: [dep_pam, systemd_dep, dep_libdrm], ++ dependencies: deps_weston_launch, + include_directories: common_inc, + install: true + ) +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 521cb2c..2d42d33 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -51,7 +51,9 @@ + + #include + #include ++#ifdef HAVE_PAM + #include ++#endif + + #ifdef HAVE_SYSTEMD_LOGIN + #include +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) + #endif + + struct weston_launch { ++#ifdef HAVE_PAM + struct pam_conv pc; + pam_handle_t *ph; ++#endif + int tty; + int ttynr; + int sock[2]; +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) + return false; + } + ++#ifdef HAVE_PAM + static int + pam_conversation_fn(int msg_count, + const struct pam_message **messages, +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) + + return 0; + } ++#endif + + static int + setup_launcher_socket(struct weston_launch *wl) +@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) + close(wl->signalfd); + close(wl->sock[0]); + ++#ifdef HAVE_PAM + if (wl->new_user) { + err = pam_close_session(wl->ph, 0); + if (err) +@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) + err, pam_strerror(wl->ph, err)); + pam_end(wl->ph, err); + } ++#endif + + /* + * Get a fresh handle to the tty as the previous one is in +@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + setenv("HOME", wl->pw->pw_dir, 1); + setenv("SHELL", wl->pw->pw_shell, 1); + ++#ifdef HAVE_PAM + env = pam_getenvlist(wl->ph); + if (env) { + for (i = 0; env[i]; ++i) { +@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + } + free(env); + } ++#endif + + /* + * We open a new session, so it makes sense +@@ -789,8 +799,10 @@ static void + help(const char *name) + { + fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); ++#ifdef HAVE_PAM + fprintf(stderr, " -u, --user Start session as specified username,\n" + " e.g. -u joe, requires root.\n"); ++#endif + fprintf(stderr, " -t, --tty Start session on alternative tty,\n" + " e.g. -t /dev/tty4, requires -u option.\n"); + fprintf(stderr, " -v, --verbose Be verbose\n"); +@@ -804,7 +816,9 @@ main(int argc, char *argv[]) + int i, c; + char *tty = NULL; + struct option opts[] = { ++#ifdef HAVE_PAM + { "user", required_argument, NULL, 'u' }, ++#endif + { "tty", required_argument, NULL, 't' }, + { "verbose", no_argument, NULL, 'v' }, + { "help", no_argument, NULL, 'h' }, +@@ -816,11 +830,16 @@ main(int argc, char *argv[]) + while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { + switch (c) { + case 'u': ++#ifdef HAVE_PAM + wl.new_user = optarg; + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } ++#else ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); ++#endif + break; + case 't': + tty = optarg; +@@ -872,8 +891,10 @@ main(int argc, char *argv[]) + if (setup_tty(&wl, tty) < 0) + exit(EXIT_FAILURE); + ++#ifdef HAVE_PAM + if (wl.new_user && setup_pam(&wl) < 0) + exit(EXIT_FAILURE); ++#endif + + if (setup_launcher_socket(&wl) < 0) + exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index 239bd2d..99e4ec3 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -73,6 +73,13 @@ option( + ) + + option( ++ 'pam', ++ type: 'boolean', ++ value: true, ++ description: 'Define if PAM is available' ++) ++ ++option( + 'xwayland', + type: 'boolean', + value: true, diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file mode 100644 index 00000000..a4444e5d --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch @@ -0,0 +1,23 @@ +Fix atomic modesetting with musl + +atomic modesetting seems to fail with drm weston backend and this patch fixes +it, below errors are seen before weston exits + +atomic: couldn't commit new state: Invalid argument + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] +Signed-off-by: Khem Raj + +--- a/libweston/backend-drm/kms.c ++++ b/libweston/backend-drm/kms.c +@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr + wl_list_for_each(plane, &b->plane_list, link) { + drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", + (unsigned long) plane->plane_id); +- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); +- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); + } + + flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/systemd-notify.weston-start b/meta-xilinx-core/recipes-graphics/wayland/weston/systemd-notify.weston-start new file mode 100644 index 00000000..a97e7b38 --- /dev/null +++ b/meta-xilinx-core/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/meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop b/meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop new file mode 100644 index 00000000..1086ae8b --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Weston +Comment=Wayland Compostitor +Exec=weston +Icon=weston +Terminal=false +Categories=Utility; diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/weston.png b/meta-xilinx-core/recipes-graphics/wayland/weston/weston.png new file mode 100644 index 00000000..ea8b7e0e Binary files /dev/null and b/meta-xilinx-core/recipes-graphics/wayland/weston/weston.png differ diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start b/meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start new file mode 100644 index 00000000..db384b1a --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start @@ -0,0 +1,5 @@ +#!/bin/sh + +if type Xwayland >/dev/null 2>/dev/null; then + mkdir -p /tmp/.X11-unix +fi diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend index bb6413a8..edb77fc5 100644 --- a/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend @@ -9,19 +9,6 @@ DEFAULT_PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" PACKAGE_ARCH = "${DEFAULT_PACKAGE_ARCH}" -# mali400 specific items -LIBMALI_SRC_URI = " \ - file://0001-libweston-GL_EXT_unpack_subimage-not-supported-for-G.patch \ - file://0002-libmali-does-not-support-gles3.patch \ -" -MALI_SRC_URI = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '${LIBMALI_SRC_URI}', '', d)}" -SRC_URI:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', ' ${MALI_SRC_URI}', '', d)}" - -# Skip dmabuf-feedback, as it requires gbm >= 21.1.1, mali-xlnx only provides 17.3 -DEFAULT_SIMPLECLIENTS := "${SIMPLECLIENTS}" -MALI_SIMPLECLIENTS = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', 'damage,im,egl,shm,touch,dmabuf-v4l,dmabuf-egl', '${DEFAULT_SIMPLECLIENTS}', d)}" -SIMPLECLIENTS = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MALI_SIMPLECLIENTS}', '${DEFAULT_SIMPLECLIENTS}', d)}" - # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_10.0.2.bbappend new file mode 100644 index 00000000..18396c5e --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston_10.0.2.bbappend @@ -0,0 +1,8 @@ +ZYNQMP_WARN_DEFAULT = "0" +ZYNQMP_WARN_DEFAULT:zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '0', d)}" +ZYNQMP_WARN = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${ZYNQMP_WARN_DEFAULT}', '0', d)}" + +python() { + if d.getVar('ZYNQMP_WARN') == "1": + raise bb.parse.SkipRecipe("Weston 10.0.0.2 requires GLES 3 interfaces which are not available when libmali enabled. Use Weston 9.0.0.0 instead.") +} diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb b/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb new file mode 100644 index 00000000..a534b1b7 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb @@ -0,0 +1,148 @@ +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +# We want this version to be "newer" then 10, only if libmali and mali400 are both enabled +ORIG_PE := "${PE}" +MALI_PE = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '${ORIG_PE}', d)}" +PE = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MALI_PE}', '${ORIG_PE}', d)}" + +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 \ +" + +SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " + +SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig useradd features_check +# depends on virtual/egl +# weston-init requires pam enabled if started via systemd +REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +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)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launch \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi" + +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +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 +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# 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 gstreamer1.0-plugins-base" +# Weston with PAM support +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" + +do_install:append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + 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 +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES:${PN}-examples = "${bindir}/*" + +FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS:${PN}-xwayland += "xwayland" + +RDEPENDS:${PN} += "xkeyboard-config" +RRECOMMENDS:${PN} = "weston-init liberation-fonts" +RRECOMMENDS:${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system weston-launch" -- cgit v1.2.3-54-g00ecf From 9220f00412b1cce5c3904ffda19c4ad87d8e83e4 Mon Sep 17 00:00:00 2001 From: Daniel Levin Date: Tue, 8 Aug 2023 20:31:56 -0600 Subject: monitor-hotplug.sh: Fix detecting XAUTHORITY Previously XAUTHORITY location was detected by filtering Xorg process command line, which is not available in busybox ps implementation. Instead detect correct Xorg commnad line by grepping for the "Xorg :displaynum" and extract -auth argument. If no -auth argument present then Xorg is running without display manager, thus XAUTHORITY env var should remain undefined. Signed-off-by: Daniel Levin Signed-off-by: Sandeep Gundlupet Raju Signed-off-by: Mark Hatle --- .../xorg-xserver/xserver-xorg/monitor-hotplug.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh index d603082d..bceb5607 100755 --- a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/monitor-hotplug.sh @@ -27,12 +27,27 @@ DEVICES=$(find /sys/class/drm/*/status) # inspired by /etc/acpd/lid.sh and the function it sources. -displaynum=`ls /tmp/.X11-unix/* | sed s#/tmp/.X11-unix/X##` +# Read first X display number from the list. +displaynum=`ls /tmp/.X11-unix/* | sed s#/tmp/.X11-unix/X## | head -n 1` +displaynum=${displaynum%% *} + display=":$displaynum.0" export DISPLAY=":$displaynum.0" # from https://wiki.archlinux.org/index.php/Acpid#Laptop_Monitor_Power_Off -export XAUTHORITY=$(ps -C Xorg -f --no-header | sed -n 's/.*-auth //; s/ -[^ ].*//; p') + +# Clear XAUTHORITY by default in case X session is not using display manager. +unset XAUTHORITY + +# Detect X session command line started for the display $displaynum and extract +# -auth argument if any. +ps -eo args | grep -e "Xorg\W*:$displaynum" | grep -e -auth | while read -r line +do + if [[ "${line%% *}" == *Xorg ]]; then + export XAUTHORITY=`echo $line | sed -n 's/.*-auth //; s/ -[^ ].*//; p'` + break + fi +done for i in /sys/class/drm/*/*/status ; do -- cgit v1.2.3-54-g00ecf From eaa784f7a4a002a2b9c34f158f405775a3f7da87 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Wed, 16 Aug 2023 13:56:51 -0600 Subject: Various: Update mali support to ignore recipe hash changes MALI_PACKAGE_ARCH depends MACHINE_ARCH depends on MACHINE We can ignore MACHINE_ARCH, as only the resulting value matters, otherwise the package now depends on MACHINE PACKAGE_ARCH can ignore MALI_PACKAGE_ARCH, again only the resulting value of PACKAGE_ARCH matters. Otherwise the value of MALI_PACKAGE_ARCH will be used in the hash, even if the condition is not true. Signed-off-by: Mark Hatle --- .../openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend | 2 ++ meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb | 2 ++ meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb | 2 ++ meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend | 2 ++ meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/cairo/cairo_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend | 5 ++++- meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend | 5 ++++- .../recipes-graphics/virglrenderer/virglrenderer_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend | 2 ++ .../recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend | 2 ++ meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend | 2 ++ .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 2 ++ 17 files changed, 38 insertions(+), 2 deletions(-) (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend index fb36c842..81aa8e9e 100644 --- a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend @@ -12,6 +12,8 @@ EXTRA_OECONF:append = "${@bb.utils.contains('DISTRO_FEATURES', 'fbdev', ' --with # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb index 6c1851ba..3b12d161 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb @@ -5,7 +5,9 @@ require qemu-alt.inc # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" BBCLASSEXTEND = "nativesdk" diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb index 1947de0f..e79df9d7 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb @@ -5,7 +5,9 @@ require qemu-alt.inc # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" BBCLASSEXTEND = "nativesdk" diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend index 83768622..04c89b83 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend @@ -2,5 +2,7 @@ require qemu-alt.inc # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend b/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend index 83fd7fa6..03823f6e 100644 --- a/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend +++ b/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend @@ -1,4 +1,6 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/cairo/cairo_%.bbappend b/meta-xilinx-core/recipes-graphics/cairo/cairo_%.bbappend index 4b8d9935..61b4d1da 100644 --- a/meta-xilinx-core/recipes-graphics/cairo/cairo_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/cairo/cairo_%.bbappend @@ -12,6 +12,8 @@ PACKAGECONFIG = "${@'${PACKAGECONFIG_LIBMALI}' if d.getVar('PREFERRED_PROVIDER_v # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend b/meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend index 83fd7fa6..03823f6e 100644 --- a/meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend @@ -1,4 +1,6 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend b/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend index 815ec69f..e824a179 100644 --- a/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend @@ -4,6 +4,8 @@ DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', ' ${MALI_ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend b/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend index 83fd7fa6..03823f6e 100644 --- a/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend @@ -1,4 +1,6 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend index b7714a39..5c84f56e 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend @@ -10,5 +10,7 @@ DEPENDS += "wayland-protocols" # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend index d322b480..a8e18a57 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -12,4 +12,7 @@ do_install:append () { # If we require libmali-xlnx, this becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" -PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" +MALI_PACKAGE_ARCH = "${MACHINE_ARCH}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" +PACKAGE_ARCH = "${@'${MALI_PACKAGE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend index 8c0e7898..d148e679 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend @@ -9,4 +9,7 @@ PACKAGECONFIG_MALI = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '', 'li PACKAGECONFIG:append:class-target = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${PACKAGECONFIG_MALI}', '', d)}" PACKAGE_ARCH_DEFAULT := "${PACKAGE_ARCH}" -PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MACHINE_ARCH}', '${PACKAGE_ARCH_DEFAULT}', d)}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" +MALI_PACKAGE_ARCH = "${MACHINE_ARCH}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" +PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MALI_PACKAGE_ARCH}', '${PACKAGE_ARCH_DEFAULT}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend b/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend index 83fd7fa6..03823f6e 100644 --- a/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend @@ -1,4 +1,6 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend index edb77fc5..ca77f0d3 100644 --- a/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/wayland/weston_%.bbappend @@ -11,5 +11,7 @@ PACKAGE_ARCH = "${DEFAULT_PACKAGE_ARCH}" # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index a9973eff..7486200d 100644 --- a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -1,6 +1,8 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend b/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend index 4d9963b8..c1005f11 100644 --- a/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend @@ -1,5 +1,7 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" diff --git a/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend index 83fd7fa6..03823f6e 100644 --- a/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ b/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -1,4 +1,6 @@ # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" +MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" +PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" -- cgit v1.2.3-54-g00ecf From 738a753daed0d4541fcfc6c9e418a095de47084c Mon Sep 17 00:00:00 2001 From: John Toomey Date: Tue, 29 Aug 2023 18:11:32 +0100 Subject: libmali-xlnx: Update branch to xlnx_rel_v2023.2 Changelog: (none) Signed-off-by: John Toomey Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-xilinx-core/recipes-graphics') diff --git a/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb index 07de26dc..db99c4d7 100644 --- a/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb +++ b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb @@ -13,7 +13,7 @@ PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm" FILESEXTRAPATHS:prepend := "${THISDIR}/files:" REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https" -BRANCH ?= "xlnx_rel_v2023.1" +BRANCH ?= "xlnx_rel_v2023.2" SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e" BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" -- cgit v1.2.3-54-g00ecf