diff options
Diffstat (limited to 'meta-agl-core/recipes-graphics/wayland')
39 files changed, 429 insertions, 439 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb new file mode 100644 index 000000000..d8baf91f9 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb @@ -0,0 +1,61 @@ +SUMMARY = "Startup systemd unit for the AGL Wayland compositor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit systemd + +# Reuse include file from upstream weston since we have the same requirements +require recipes-graphics/wayland/required-distro-features.inc + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "file://agl-compositor.service \ + file://agl-compositor.socket \ + file://agl-compositor-autologin \ + file://agl-compositor.conf.in \ +" + +S = "${WORKDIR}" + +AGL_COMPOSITOR_ARGS ?= " --config ${sysconfdir}/xdg/weston/weston.ini --idle-time=0" +AGL_COMPOSITOR_USE_PIXMAN ??= "0" + +AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}" +AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", " --use-pixman", "",d)}" + +do_install() { + # Install systemd service + install -D -p -m0644 ${WORKDIR}/agl-compositor.service ${D}${systemd_system_unitdir}/agl-compositor.service + install -D -p -m0644 ${WORKDIR}/agl-compositor.socket ${D}${systemd_system_unitdir}/agl-compositor.socket + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then + install -D -p -m0644 ${WORKDIR}/agl-compositor-autologin ${D}${sysconfdir}/pam.d/agl-compositor-autologin + fi + + # Install systemd service drop-in with extra configuration + files=agl-compositor.conf.in + for f in ${files}; do + g=${f%.in} + if [ "${f}" != "${g}" ]; then + sed -e "s,@AGL_COMPOSITOR_ARGS@,${AGL_COMPOSITOR_ARGS},g" \ + ${WORKDIR}/${f} > ${WORKDIR}/${g} + fi + done + install -d ${D}${systemd_system_unitdir}/agl-compositor.service.d + install -m644 ${WORKDIR}/agl-compositor.conf ${D}/${systemd_system_unitdir}/agl-compositor.service.d/agl-compositor.conf +} + +FILES:${PN} += "\ + ${systemd_system_unitdir}/agl-compositor.service \ + ${systemd_system_unitdir}/agl-compositor.socket \ + ${systemd_system_unitdir}/agl-compositor.service.d \ + ${sysconfdir}/default/agl-compositor \ + ${sysconfdir}/pam.d/ \ + " + +CONFFILES:${PN} += "${sysconfdir}/default/agl-compositor" + +RDEPENDS:${PN} = "agl-users agl-compositor weston-ini" + +RCONFLICTS:${PN} = "weston-init" + +SYSTEMD_SERVICE:${PN} = "agl-compositor.service agl-compositor.socket" diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin new file mode 100644 index 000000000..f6e6d106d --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor-autologin @@ -0,0 +1,11 @@ +auth required pam_nologin.so +auth required pam_unix.so try_first_pass nullok + +account required pam_nologin.so +account required pam_unix.so + +session required pam_env.so +session required pam_unix.so +-session optional pam_systemd.so type=wayland class=user desktop=weston +-session optional pam_loginuid.so + diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in new file mode 100644 index 000000000..2918c410c --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.conf.in @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/usr/bin/agl-compositor @AGL_COMPOSITOR_ARGS@ diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service new file mode 100644 index 000000000..4ee14de27 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.service @@ -0,0 +1,72 @@ +# This is a system unit for launching AGL compositor with auto-login as the +# user configured here. +# +# AGL compositor and Weston must be built with systemd support, and your +# weston.ini must load the plugin systemd-notify.so. +# +# Attention: +# If you will add new tty dependency setting, you need to update +# agl-compositor-guest.conf. +[Unit] +Description=AGL compositor +Documentation=man:weston(1) man:weston.ini(5) +Documentation=http://wayland.freedesktop.org/ + +# Make sure we are started after logins are permitted. +Requires=systemd-user-sessions.service +After=systemd-user-sessions.service + +# D-Bus is necessary for contacting logind. Logind is required. +Wants=dbus.socket +After=dbus.socket + +# Ensure the socket is present +Requires=agl-compositor.socket + +# Since we are part of the graphical session, make sure we are started before +# it is complete. +Before=graphical.target + +# Prevent starting on systems without virtual consoles, Weston requires one +# for now. +ConditionPathExists=/dev/tty0 + +[Service] +# Requires systemd-notify.so Weston plugin. +Type=notify +EnvironmentFile=-/etc/default/agl-compositor +ExecStart=/usr/bin/agl-compositor --modules=systemd-notify.so + +# Watchdog setup +TimeoutStartSec=60 +WatchdogSec=20 + +# The user to run as. +User=agl-driver +Group=agl-driver + +# Make sure the working directory is the users home directory +WorkingDirectory=/home/agl-driver + +# Set up a full user session for the user +PAMName=agl-compositor-autologin + +# A virtual terminal is needed. +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes + +# Fail to start if not controlling the tty. +StandardInput=tty-fail +StandardOutput=journal +StandardError=journal + +# Log this user with utmp, letting it show up with commands 'w' and 'who'. +UtmpIdentifier=tty7 +UtmpMode=user + +[Install] +# Note: If you only want weston to start on-demand, remove this line with a +# service drop file +WantedBy=graphical.target diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket new file mode 100644 index 000000000..ef9769ff7 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init/agl-compositor.socket @@ -0,0 +1,10 @@ +# +# Weston must be built with systemd support, and your weston.ini must load +# the plugin systemd-notify.so. + +[Unit] +Description=agl-compositor, a Wayland compositor, as a systemd user service +Documentation=https://docs.automotivelinux.org/en/master/#5_Component_Documentation/1_agl-compositor/ + +[Socket] +ListenStream=%t/wayland-0 diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb index 2156c7839..79b13df71 100644 --- a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb +++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb @@ -8,29 +8,47 @@ SECTION = "x11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=fac6abe0003c4d142ff8fa1f18316df0" -DEPENDS = "wayland wayland-protocols wayland-native weston \ - ${@bb.utils.contains('AGL_FEATURES', 'waltham-remoting', 'waltham waltham-transmitter-plugin', '', d)}" +DEPENDS = "wayland wayland-protocols wayland-native weston" SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-compositor.git;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "ba86e440b28d1ade0b264ee4afd789faff56b30c" +SRCREV = "c8ffca8f9c67114ca424b88df0740943fe7768e3" +AGL_BRANCH:aglnext = "next" +SRCREV:aglnext = "${AUTOREV}" -PV = "0.0.10+git${SRCPV}" +AGL_COMPOSITOR_VERSION = "0.0.24" + +PV = "${AGL_COMPOSITOR_VERSION}+git${SRCPV}" S = "${WORKDIR}/git" PACKAGECONFIG ?= "" PACKAGECONFIG[policy-rba] = "-Dpolicy-default=rba,,librba,librba rba-config" PACKAGECONFIG[policy-deny-all] = "-Dpolicy-default=deny-all,," +PACKAGECONFIG[grpc-proxy] = "-Dgrpc-proxy=true,-Dgrpc-proxy=false,grpc grpc-native,grpc agl-shell-grpc-server" inherit meson pkgconfig python3native +# Reuse include file from upstream weston since we have the same requirements +require recipes-graphics/wayland/required-distro-features.inc + +PACKAGES =+ "agl-shell-grpc-server" + +LDFLAGS:append:riscv64 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" + FILES:${PN} = " \ ${bindir}/agl-compositor \ ${bindir}/agl-screenshooter \ ${libdir}/agl-compositor/libexec_compositor.so.0 \ - ${libdir}/agl-compositor/libexec_compositor.so.0.0.0 \ + ${libdir}/agl-compositor/libexec_compositor.so.${AGL_COMPOSITOR_VERSION} \ " -RDEPENDS:${PN} += " ${@bb.utils.contains('AGL_FEATURES', 'waltham-remoting', 'waltham waltham-transmitter-plugin', '', d)}" +FILES:agl-shell-grpc-server = " \ + ${libdir}/agl-compositor/agl-shell-grpc-server \ +" + +RDEPENDS:${PN} += " \ + agl-compositor-init \ + xkeyboard-config \ +" FILES:${PN}-dev += " \ ${datadir}/agl-compositor/protocols/agl-shell.xml \ diff --git a/meta-agl-core/recipes-graphics/wayland/agl-shell-activator_git.bb b/meta-agl-core/recipes-graphics/wayland/agl-shell-activator_git.bb deleted file mode 100644 index 049068341..000000000 --- a/meta-agl-core/recipes-graphics/wayland/agl-shell-activator_git.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = " Application that switches/activates other application's windows " -DESCRIPTION = " A wayland client and a script that talks with the agl-compositor \ -an tells it to display a specific application. Relies on the appid being \ -started (already) by afm-util or the client shell (homescreen/WAM)" - -HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fagl-shell-activator" -SECTION = "x11" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=e978448a0d41d826d73890d9c22caf75" - -DEPENDS = "wayland wayland-protocols wayland-native agl-compositor" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-shell-activator.git;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "5bdedb16112fa0faaf16f64ef440f451e9f787e4" - -PV = "0.0.10+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit meson pkgconfig python3native - -FILES:${PN} = " ${bindir}/agl-shell-activator \ - ${bindir}/agl-activator " diff --git a/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb b/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb new file mode 100644 index 000000000..c0c31e029 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb @@ -0,0 +1,16 @@ +SUMMARY = "Minimal agl-shell Wayland protocol client" + +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fnative-shell-client" +SECTION = "x11" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b90ee643ce04400848a8f0deb492a4a" + +DEPENDS = "wayland wayland-protocols wayland-native agl-compositor" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/native-shell-client.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "099e06f532eff7c56bf00eb58420f14c95a8e554" + +PV = "0.0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit meson pkgconfig diff --git a/meta-agl-core/recipes-graphics/wayland/waltham-transmitter-plugin.bb b/meta-agl-core/recipes-graphics/wayland/waltham-transmitter-plugin.bb deleted file mode 100644 index 466985f41..000000000 --- a/meta-agl-core/recipes-graphics/wayland/waltham-transmitter-plugin.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "Waltham transmitter is a libweston plug-in that adds support for receiving input events from a surface streamed on a remote output" -HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/src/waltham-transmitter-plugin.git" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=f21c9af4de068fb53b83f0b37d262ec3" - -DEPENDS += "wayland wayland-native waltham weston" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/waltham-transmitter-plugin.git;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "c9d23a045e6cb46c023c15f8189ef3ee8b1ddf20" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig python3native - -FILES:${PN} += "${libdir}/*" -FILES:${PN} += "${bindir}/*" diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch deleted file mode 100644 index 32c2df3c4..000000000 --- a/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 6ecdf10a10929164f3cbdb754ae91d27576e5036 Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Fri, 16 Oct 2020 18:57:38 +0300 -Subject: [PATCH] Use python3 instead of 2 - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - configure.ac | 2 +- - tools/gen.py | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5f65a6b..94b8644 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -32,7 +32,7 @@ AC_SUBST(VERSION_INFO) - # Check for programs - AC_PROG_CC - AC_PROG_CC_STDC --AC_CHECK_PROGS([PYTHON2], [python2 python]) -+AC_CHECK_PROGS([PYTHON3], [python3 python]) - PKG_PROG_PKG_CONFIG() - - AC_ARG_ENABLE(gprof, -diff --git a/tools/gen.py b/tools/gen.py -index 19e8baa..64c5870 100755 ---- a/tools/gen.py -+++ b/tools/gen.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - - # Copyright © 2013-2014 Collabora, Ltd. -@@ -562,11 +562,11 @@ try: - opts, args = getopt.getopt(sys.argv[1:], "hp:i:o:t:m:", - ["preamble=", "input=", "output=", "type=", "mode="]) - except getopt.GetoptError: -- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>' -+ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>') - sys.exit(2) - for opt, arg in opts: - if opt == '-h': -- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>' -+ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>') - sys.exit() - elif opt in ("-p", "--preamble"): - preamble_files.append(arg) --- -2.28.0 - diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch deleted file mode 100644 index 354bcbc15..000000000 --- a/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch +++ /dev/null @@ -1,55 +0,0 @@ -From cc87dddc2cdc0c20b053e3da1197efd671b4f50c Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Wed, 23 Sep 2020 22:33:50 +0300 -Subject: [PATCH 1/2] waltham: Fix compile build error - -Newer compilers will complain about the fact debug_message is declared -multiple times: - -multiple definition of `debug_message'; -.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -first defined here multiple definition of `debug_message'; -.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -first defined here /usr/bin/ld: -.libs/client-serialice.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -multiple definition of `debug_message'; -.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -first defined here - -Bug-AGL: SPEC-3649 - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - src/waltham/marshaller_log.h | 2 +- - src/waltham/waltham-util.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/waltham/marshaller_log.h b/src/waltham/marshaller_log.h -index 8254914..ffa87c1 100644 ---- a/src/waltham/marshaller_log.h -+++ b/src/waltham/marshaller_log.h -@@ -32,7 +32,7 @@ - /* Comment/uncomment to disable/enable debugging log */ - #define DEBUG - //#define PROFILE --int debug_message; -+extern int debug_message; - - #ifdef DEBUG - static inline void DEBUG_STAMP (void) { -diff --git a/src/waltham/waltham-util.c b/src/waltham/waltham-util.c -index 410b114..8f898f8 100644 ---- a/src/waltham/waltham-util.c -+++ b/src/waltham/waltham-util.c -@@ -34,7 +34,7 @@ - #include "waltham-connection.h" - #include "waltham-private.h" - --int debug_message; -+extern int debug_message; - - static void - wth_pfx_print(const char *pfx, const char *fmt, va_list argp) --- -2.28.0 - diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch deleted file mode 100644 index 5aefb922b..000000000 --- a/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch +++ /dev/null @@ -1,70 +0,0 @@ -From d30005429fe92daa14151c2a6175d5cf19506cac Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Wed, 7 Oct 2020 16:36:38 +0300 -Subject: [PATCH 2/2] commandxml: Add support wthp_app_id interface - -With it, we hang off the app_id which we can use to pass it to the -receiver side. - -Bug-AGL: SPEC-3601 - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - data/command.xml | 29 +++++++++++++++++++++++++++++ - src/waltham/header-preamble.txt | 1 + - 2 files changed, 30 insertions(+) - -diff --git a/data/command.xml b/data/command.xml -index a03082b..cb53f75 100644 ---- a/data/command.xml -+++ b/data/command.xml -@@ -1814,6 +1814,35 @@ - - </interface> - -+ <interface name="wthp_ivi_app_id" version="1"> -+ <description summary="create ivi-style surfaces"> -+ This interface is exposed as a global singleton. -+ This interface is implemented by servers that provide IVI-style user interfaces. -+ It allows clients to associate an ivi_surface with wthp_surface. -+ </description> -+ -+ <enum name="error"> -+ <entry name="role" value="0" summary="given wthp_surface has another role"/> -+ </enum> -+ -+ <request name="surface_create"> -+ <description summary="create ivi_surface with app_id in ivi compositor"> -+ This request gives the wthp_surface the role of an IVI Surface. Creating more than -+ one ivi_surface for a wthp_surface is not allowed. Note, that this still allows the -+ following example: -+ -+ 1. create a wthp_surface -+ 2. create ivi_surface for the wthp_surface -+ 3. destroy the ivi_surface -+ -+ </description> -+ <arg name="app_id" type="string"/> -+ <arg name="surface" type="object" interface="wthp_surface"/> -+ <arg name="id" type="new_id" interface="wthp_ivi_surface"/> -+ </request> -+ -+ </interface> -+ - <interface name="dummy" version="1"> - <request name="dummy_request"> - </request> -diff --git a/src/waltham/header-preamble.txt b/src/waltham/header-preamble.txt -index df765cc..2409859 100644 ---- a/src/waltham/header-preamble.txt -+++ b/src/waltham/header-preamble.txt -@@ -50,5 +50,6 @@ struct wthp_touch; - - struct wthp_ivi_surface; - struct wthp_ivi_application; -+struct wthp_ivi_app_id; - - struct dummy; --- -2.28.0 - diff --git a/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend b/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend deleted file mode 100644 index 302eba4d2..000000000 --- a/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -SRC_URI:append = "\ - file://0001-waltham-Fix-compile-build-error.patch \ - file://0002-commandxml-Add-support-wthp_app_id-interface.patch \ - file://0001-Use-python3-instead-of-2.patch \ - " diff --git a/meta-agl-core/recipes-graphics/wayland/waltham_git.bb b/meta-agl-core/recipes-graphics/wayland/waltham_git.bb deleted file mode 100644 index 2a2592d40..000000000 --- a/meta-agl-core/recipes-graphics/wayland/waltham_git.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise" -HOMEPAGE = "https://github.com/waltham/waltham" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=e8ad01a5182f2c1b3a2640e9ea268264 \ -" -SRCREV = "1de58c3ff746ddaba7584d760c5454243723d3ca" -SRC_URI = "git://github.com/wmizuno/waltham.git \ - " -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -DEPENDS += "libdrm virtual/kernel wayland" -RDEPENDS:${PN} += "libdrm"
\ No newline at end of file diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb index 8842a5a46..f6b27a14b 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb @@ -9,11 +9,15 @@ SRC_URI = " \ file://hdmi-a-1-90.cfg \ file://hdmi-a-1-180.cfg \ file://hdmi-a-1-270.cfg \ - file://remote-output.cfg \ - file://transmitter-output.cfg \ + file://hdmi-a-2-0.cfg \ + file://hdmi-a-2-90.cfg \ + file://hdmi-a-2-180.cfg \ + file://hdmi-a-2-270.cfg \ file://virtual-0.cfg \ + file://virtual-90.cfg \ file://virtual-180.cfg \ file://virtual-270.cfg \ + file://grpc-proxy.cfg \ " S = "${WORKDIR}" @@ -21,12 +25,13 @@ S = "${WORKDIR}" inherit update-alternatives # Default primary display/orientation fragment -WESTON_DISPLAYS ?= "hdmi-a-1-270" +WESTON_DISPLAYS ?= "hdmi-a-1-90" # Configuration fragments to use in weston.ini.* # Note that some may be replaced/removed when building the landscape # configuration. -WESTON_FRAGMENTS = "core shell ${WESTON_DISPLAYS}" +WESTON_FRAGMENTS_BASE = "core shell" +WESTON_FRAGMENTS = "${WESTON_FRAGMENTS_BASE} ${WESTON_DISPLAYS}" # On-target weston.ini directory weston_ini_dir = "${sysconfdir}/xdg/weston" @@ -41,16 +46,22 @@ do_compile() { done sed -i -e '$ d' ${WORKDIR}/weston.ini.default + cat ${WORKDIR}/weston.ini.default > ${WORKDIR}/weston.ini.default-no-activate + # Do it again, but filter fragments to configure for landscape # and a corresponding landscape-inverted that is 180 degrees # rotated. rm -f ${WORKDIR}/weston.ini.landscape + rm -f ${WORKDIR}/weston.ini.landscape-inverted for F in ${WESTON_FRAGMENTS}; do INVF=$F if echo $F | grep '^hdmi-a-1-\(90\|270\)$'; then F="hdmi-a-1-0" INVF="hdmi-a-1-180" - elif echo $F | grep '^virtual-270$'; then + elif echo $F | grep '^hdmi-a-2-\(90\|270\)$'; then + F="hdmi-a-2-0" + INVF="hdmi-a-2-180" + elif echo $F | grep '^virtual-90$'; then F="virtual-0" INVF="virtual-180" fi @@ -61,11 +72,15 @@ do_compile() { done sed -i -e '$ d' ${WORKDIR}/weston.ini.landscape sed -i -e '$ d' ${WORKDIR}/weston.ini.landscape-inverted + + cat ${WORKDIR}/weston.ini.landscape > ${WORKDIR}/weston.ini.landscape-no-activate } do_install:append() { install -d ${D}${weston_ini_dir} install -m 0644 ${WORKDIR}/weston.ini.default ${D}${weston_ini_dir}/ + install -m 0644 ${WORKDIR}/weston.ini.default-no-activate ${D}${weston_ini_dir}/ + install -m 0644 ${WORKDIR}/weston.ini.landscape-no-activate ${D}${weston_ini_dir}/ install -m 0644 ${WORKDIR}/weston.ini.landscape ${D}${weston_ini_dir}/ install -m 0644 ${WORKDIR}/weston.ini.landscape-inverted ${D}${weston_ini_dir}/ } @@ -81,28 +96,44 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" ALTERNATIVE_LINK_NAME[weston.ini] = "${weston_ini_dir}/weston.ini" -RDEPENDS:${PN} = "weston-init" RPROVIDES:${PN} = "weston-ini" -RCONFLICTS:${PN} = "${PN}-landscape" ALTERNATIVE:${PN} = "weston.ini" ALTERNATIVE_TARGET_${PN} = "${weston_ini_dir}/weston.ini.default" -PACKAGE_BEFORE_PN += "${PN}-landscape" +# landscape +PACKAGE_BEFORE_PN += "${PN}-landscape" FILES:${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape" - -RDEPENDS:${PN}-landscape = "weston-init" RPROVIDES:${PN}-landscape = "weston-ini" -RCONFLICTS:${PN}-landscape = "${PN}" ALTERNATIVE:${PN}-landscape = "weston.ini" ALTERNATIVE_TARGET_${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape" +ALTERNATIVE_PRIORITY_${PN}-landscape = "20" -PACKAGE_BEFORE_PN += "${PN}-landscape-inverted" +# landscape-inverted +PACKAGE_BEFORE_PN += "${PN}-landscape-inverted" FILES:${PN}-landscape-inverted = "${weston_ini_dir}/weston.ini.landscape-inverted" - -RDEPENDS:${PN}-landscape-inverted = "weston-init" RPROVIDES:${PN}-landscape-inverted = "weston-ini" -RCONFLICTS:${PN}-landscape-inverted = "${PN}" ALTERNATIVE:${PN}-landscape-inverted = "weston.ini" ALTERNATIVE_TARGET_${PN}-landscape-inverted = "${weston_ini_dir}/weston.ini.landscape-inverted" +ALTERNATIVE_PRIORITY_${PN}-landscape-inverted = "25" + +# no-activate, no activation by default +PACKAGE_BEFORE_PN += "${PN}-no-activate" +FILES:${PN}-no-activate = "${weston_ini_dir}/weston.ini.default-no-activate" +RPROVIDES:${PN}-no-activate = "weston-ini" +ALTERNATIVE:${PN}-no-activate = "weston.ini" +ALTERNATIVE_TARGET_${PN}-no-activate = "${weston_ini_dir}/weston.ini.default-no-activate" +ALTERNATIVE_PRIORITY_${PN}-no-activate = "21" + +# landscape-no-activate, no activation by default +PACKAGE_BEFORE_PN += "${PN}-landscape-no-activate" +FILES:${PN}-landscape-no-activate = "${weston_ini_dir}/weston.ini.landscape-no-activate" +RPROVIDES:${PN}-landscape-no-activate = "weston-ini" +ALTERNATIVE:${PN}-landscape-no-activate = "weston.ini" +ALTERNATIVE_TARGET_${PN}-landscape-no-activate = "${weston_ini_dir}/weston.ini.landscape-no-activate" +ALTERNATIVE_PRIORITY_${PN}-landscape-no-activate = "26" + +# This is a settings-only package, we do not need a development package +# (and its fixed dependency to ${PN} being installed) +PACKAGES:remove = "${PN}-dev ${PN}-staticdev" diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend index c4cf6c152..b6095f2fa 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -2,11 +2,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PACKAGE_ARCH = "${MACHINE_ARCH}" -WESTON_DISPLAYS:append = "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", " remote-output", "", d)}" -WESTON_DISPLAYS:append = "${@bb.utils.contains("AGL_FEATURES", "waltham-remoting", " transmitter-output", "", d)}" - # For virtual machines and intel-corei7-64 we want to support both the HDMI-A-1 # and Virtual-1 outputs. This allows us to run virtual images on real hardware # and vice versa. -WESTON_DISPLAYS:append:qemuall = " virtual-270" -WESTON_DISPLAYS:append:intel-corei7-64 = " virtual-270" +WESTON_DISPLAYS:append:qemuall = " virtual-90" +WESTON_DISPLAYS:append:intel-corei7-64 = " virtual-90" +WESTON_DISPLAYS:append:virtio-aarch64 = " virtual-90" diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg index 90774ed79..28f90752d 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg @@ -1,4 +1,6 @@ [core] backend=drm-backend.so require-input=false +idle-time=0 modules=systemd-notify.so +activate-by-default=false diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg new file mode 100644 index 000000000..14805b969 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/grpc-proxy.cfg @@ -0,0 +1,4 @@ + +[shell-client-ext] +command=/usr/lib/agl-compositor/agl-shell-grpc-server + diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg index 7648c779b..b6f4329ef 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg @@ -1,4 +1,4 @@ # A display is connected to HDMI-A-1 [output] name=HDMI-A-1 -transform=180 +transform=rotate-180 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg index dffc2b6dd..187f2c7bd 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg @@ -3,4 +3,4 @@ # of the GeChic display or the Dell display. [output] name=HDMI-A-1 -transform=270 +transform=rotate-270 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg index 88a692a1b..5ee9c1904 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg @@ -3,4 +3,4 @@ # display used in some instances. [output] name=HDMI-A-1 -transform=90 +transform=rotate-90 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg new file mode 100644 index 000000000..4d5d51c03 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-0.cfg @@ -0,0 +1,5 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees +# to have a proper orientation of the homescreen. For example, the 'eGalax' +# display used in some instances. +[output] +name=HDMI-A-2 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg new file mode 100644 index 000000000..ffdc5fe60 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-180.cfg @@ -0,0 +1,6 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees +# to have a proper orientation of the homescreen. For example, the 'eGalax' +# display used in some instances. +[output] +name=HDMI-A-2 +transform=rotate-180 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg new file mode 100644 index 000000000..76fc77acd --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-270.cfg @@ -0,0 +1,6 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees +# to have a proper orientation of the homescreen. For example, the 'eGalax' +# display used in some instances. +[output] +name=HDMI-A-2 +transform=rotate-270 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg new file mode 100644 index 000000000..9172a1c6a --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-2-90.cfg @@ -0,0 +1,6 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees +# to have a proper orientation of the homescreen. For example, the 'eGalax' +# display used in some instances. +[output] +name=HDMI-A-2 +transform=rotate-90 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg deleted file mode 100644 index f69a2e096..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[remote-output] -name=remote-1 -mode=640x720@30 -host=192.168.20.99 -port=5005 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg index 975e539e6..8d16ba5d7 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg @@ -1,3 +1,3 @@ [shell] -locking=true +locking=false panel-position=none diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/transmitter-output.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/transmitter-output.cfg deleted file mode 100644 index e77f74ec0..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/transmitter-output.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[transmitter-output] -name=transmitter-1 -mode=640x720@30 -host=192.168.20.99 -port=5005 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg index 34a741d40..0363b6339 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-180.cfg @@ -1,4 +1,4 @@ [output] name=Virtual-1 mode=1920x1080 -transform=180 +transform=rotate-180 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg index 0e5b536a6..c3f72f495 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-270.cfg @@ -1,4 +1,4 @@ [output] name=Virtual-1 mode=1920x1080 -transform=270 +transform=rotate-270 diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg new file mode 100644 index 000000000..96d9c3a04 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual-90.cfg @@ -0,0 +1,4 @@ +[output] +name=Virtual-1 +mode=1920x1080 +transform=rotate-90 diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-don-t-leak-gem_handle_refcnt-in-drm_dest.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-don-t-leak-gem_handle_refcnt-in-drm_dest.patch new file mode 100644 index 000000000..0e3ab7613 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-don-t-leak-gem_handle_refcnt-in-drm_dest.patch @@ -0,0 +1,27 @@ +From fb60f9c16ce8865fbdcd181419f44b72af1aa3c2 Mon Sep 17 00:00:00 2001 +From: Ray Smith <rsmith@brightsign.biz> +Date: Tue, 19 Dec 2023 11:43:55 +0000 +Subject: [PATCH 1/2] backend-drm: don't leak gem_handle_refcnt in drm_destroy + +Signed-off-by: Ray Smith <rsmith@brightsign.biz> +--- + libweston/backend-drm/drm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c +index 8092789..fcececb 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -3364,6 +3364,9 @@ drm_destroy(struct weston_backend *backend) + weston_launcher_close(ec->launcher, device->drm.fd); + weston_launcher_destroy(ec->launcher); + ++ if (device->gem_handle_refcnt) ++ hash_table_destroy(device->gem_handle_refcnt); ++ + free(device->drm.filename); + free(device); + free(b); +-- +2.43.0 + diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch new file mode 100644 index 000000000..202333a5e --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch @@ -0,0 +1,30 @@ +From 6a847464de9e773f6d1490916d0df48a0f90eeba Mon Sep 17 00:00:00 2001 +From: Marius Vlad <marius.vlad@collabora.com> +Date: Thu, 5 Oct 2023 16:27:34 +0300 +Subject: [PATCH] clients: Handle missing pointer_surface is there's no pointer + event + +Upstream-Status: Pending + +Bug-AGL: SPEC-4916 +Signed-off-by: Marius Vlad <marius.vlad@collabora.com> +--- + clients/window.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clients/window.c b/clients/window.c +index 30f6410..882e9d5 100644 +--- a/clients/window.c ++++ b/clients/window.c +@@ -3818,7 +3818,7 @@ pointer_surface_frame_callback(void *data, struct wl_callback *callback, + force_frame = false; + } + +- if (!input->pointer) ++ if (!input->pointer || !input->pointer_surface) + return; + + if (input_set_pointer_special(input)) +-- +2.35.1 + diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch deleted file mode 100644 index 02af7cbaf..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 4534fcab54409b08faf4445ed6780136b58afb63 Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Mon, 28 Sep 2020 22:51:00 +0300 -Subject: [PATCH 1/2] libweston: Migrate weston_seat_init/release to public - headers - -weston_seat_init/release needed for creating weston plug-ins that want -manage seat/input on their own. - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - include/libweston/libweston.h | 25 +++++++++++++++++++++++++ - libweston/libweston-internal.h | 31 +++---------------------------- - 2 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h -index 54ea008..59541f2 100644 ---- a/include/libweston/libweston.h -+++ b/include/libweston/libweston.h -@@ -2053,6 +2053,31 @@ void - weston_timeline_refresh_subscription_objects(struct weston_compositor *wc, - void *object); - -+/* input, seat */ -+void -+weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec, -+ const char *seat_name); -+void -+weston_seat_release(struct weston_seat *seat); -+ -+void -+weston_seat_init_pointer(struct weston_seat *seat); -+ -+int -+weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap); -+ -+void -+weston_seat_init_touch(struct weston_seat *seat); -+ -+void -+weston_seat_release_keyboard(struct weston_seat *seat); -+ -+void -+weston_seat_release_pointer(struct weston_seat *seat); -+ -+void -+weston_seat_release_touch(struct weston_seat *seat); -+ - #ifdef __cplusplus - } - #endif -diff --git a/libweston/libweston-internal.h b/libweston/libweston-internal.h -index 66c38e8..f5c4c2c 100644 ---- a/libweston/libweston-internal.h -+++ b/libweston/libweston-internal.h -@@ -168,44 +168,19 @@ weston_plane_init(struct weston_plane *plane, - void - weston_plane_release(struct weston_plane *plane); - --/* weston_seat */ -- - struct clipboard * - clipboard_create(struct weston_seat *seat); - --void --weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec, -- const char *seat_name); -- --void --weston_seat_repick(struct weston_seat *seat); -+/* weston_seat */ - - void --weston_seat_release(struct weston_seat *seat); -+weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap); - - void - weston_seat_send_selection(struct weston_seat *seat, struct wl_client *client); - - void --weston_seat_init_pointer(struct weston_seat *seat); -- --int --weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap); -- --void --weston_seat_init_touch(struct weston_seat *seat); -- --void --weston_seat_release_keyboard(struct weston_seat *seat); -- --void --weston_seat_release_pointer(struct weston_seat *seat); -- --void --weston_seat_release_touch(struct weston_seat *seat); -- --void --weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap); -+weston_seat_repick(struct weston_seat *seat); - - void - wl_data_device_set_keyboard_focus(struct weston_seat *seat); --- -2.28.0 - diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch b/meta-agl-core/recipes-graphics/wayland/weston/0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch new file mode 100644 index 000000000..0ae82088a --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston/0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch @@ -0,0 +1,56 @@ +From 10fcfd66069c774e28f67b18afd329e4bcf9f5b3 Mon Sep 17 00:00:00 2001 +From: Ray Smith <rsmith@brightsign.biz> +Date: Tue, 19 Dec 2023 11:45:45 +0000 +Subject: [PATCH 2/2] backend-drm: always create gem_handle_refcnt hash table + +Devices created via drm_device_create have this hash table, but those +created via drm_backend_create don't. + +Signed-off-by: Ray Smith <rsmith@brightsign.biz> +--- + libweston/backend-drm/drm.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c +index fcececb..9d6a9cf 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -3364,8 +3364,7 @@ drm_destroy(struct weston_backend *backend) + weston_launcher_close(ec->launcher, device->drm.fd); + weston_launcher_destroy(ec->launcher); + +- if (device->gem_handle_refcnt) +- hash_table_destroy(device->gem_handle_refcnt); ++ hash_table_destroy(device->gem_handle_refcnt); + + free(device->drm.filename); + free(device); +@@ -3867,10 +3866,13 @@ drm_backend_create(struct weston_compositor *compositor, + + device = zalloc(sizeof *device); + if (device == NULL) +- return NULL; ++ goto err_backend; + device->state_invalid = true; + device->drm.fd = -1; + device->backend = b; ++ device->gem_handle_refcnt = hash_table_create(); ++ if (!device->gem_handle_refcnt) ++ goto err_device; + + b->drm = device; + wl_list_init(&b->kms_list); +@@ -4108,6 +4110,10 @@ err_compositor: + if (b->gbm) + gbm_device_destroy(b->gbm); + #endif ++ hash_table_destroy(device->gem_handle_refcnt); ++err_device: ++ free(device); ++err_backend: + free(b); + return NULL; + } +-- +2.43.0 + diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch b/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch deleted file mode 100644 index cb122590b..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch +++ /dev/null @@ -1,37 +0,0 @@ -commit 5130a8c21a9deea54e8f7c96a3a5049e2d60a210 -Author: Marius Vlad <marius.vlad@collabora.com> -Date: Thu Jul 30 14:47:32 2020 +0300 - -backend-drm: Correctly tear down the DRM backend - -It seem that we skipped to put back in TEXT mode the tty, in case a DRM -device node wasn't present at that time, or it isn't present at all. This -orders the destroy part correctly as to handle that case as well. - -As a side effect, as the tty will still be set to GRAPHICS mode we will -require a manual change of the tty number, which might be not possible -on all systems. Properly putting back the tty to TEXT mode should avoid -that, and allows to re-use the same tty no in case the DRM device has -been created at a later point in time. - -Upstream-Status: Backport -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c -index 980a12da..1cf61a33 100644 ---- a/libweston/backend-drm/drm.c -+++ b/libweston/backend-drm/drm.c -@@ -3031,10 +3031,10 @@ err_sprite: - destroy_sprites(b); - err_udev_dev: - udev_device_unref(drm_device); --err_launcher: -- weston_launcher_destroy(compositor->launcher); - err_udev: - udev_unref(b->udev); -+err_launcher: -+ weston_launcher_destroy(compositor->launcher); - err_compositor: - weston_compositor_shutdown(compositor); - free(b); diff --git a/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend index f627f5cb2..87cad12a0 100644 --- a/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend +++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend @@ -1 +1 @@ -require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_8.0_aglcore.inc', '', d)} +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_13.0_aglcore.inc', '', d)} diff --git a/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc new file mode 100644 index 000000000..0b5dae715 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc @@ -0,0 +1,30 @@ +FILESEXTRAPATHS:append := ":${THISDIR}/weston" + +PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}" + +SRC_URI:append = " \ + file://0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch \ + file://0001-backend-drm-don-t-leak-gem_handle_refcnt-in-drm_dest.patch \ + file://0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch \ +" + + +# Split weston-terminal out of the main package to allow installing it +# separately for use with other compositors. The icons, etc. that end +# up in /usr/share/weston are also split out into a separate package +# since they are required for weston-terminal and some of the programs +# packaged in weston-examples in addition to ivi-shell in the main +# package. + +PACKAGE_BEFORE_PN += "${PN}-data ${PN}-terminal" + +FILES:${PN}-data = "${datadir}/weston" + +FILES:${PN}-terminal = "${bindir}/weston-terminal" +RDEPENDS:${PN}-terminal += "weston-data liberation-fonts" + +RDEPENDS:${PN}-examples += "weston-data" + +FILES:${PN}:remove = "weston-terminal" +RDEPENDS:${PN}:remove = "liberation-fonts" +RDEPENDS:${PN} += "weston-data weston-terminal" diff --git a/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc deleted file mode 100644 index 598215e7e..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc +++ /dev/null @@ -1,15 +0,0 @@ -FILESEXTRAPATHS:append := ":${THISDIR}/weston" - -SRC_URI:append = "\ - file://0005-correctly-tear-down-drm-backend.patch \ - " - -# Workaround for incorrect upstream definition -PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[headless] = "-Dbackend-headless=true" -PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}" -PACKAGECONFIG:append = "${@bb.utils.contains('AGL_FEATURES', 'waltham-remoting', ' remoting', '', d)}" - -# seat management is only for waltham-transmitter-plugin -SRC_URI:append = "${@bb.utils.contains('AGL_FEATURES', 'waltham-remoting', 'file://0001-libweston-Migrate-weston_seat_init-release-to-public.patch', '', d)}" |