summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-core/recipes-graphics')
-rw-r--r--meta-agl-core/recipes-graphics/rba/rba-config.bb5
-rw-r--r--meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf8
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb11
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb2
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb50
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend2
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in5
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-don-t-leak-gem_handle_refcnt-in-drm_dest.patch29
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch60
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch58
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc3
11 files changed, 120 insertions, 113 deletions
diff --git a/meta-agl-core/recipes-graphics/rba/rba-config.bb b/meta-agl-core/recipes-graphics/rba/rba-config.bb
index cbed9df0c..53bb01bb1 100644
--- a/meta-agl-core/recipes-graphics/rba/rba-config.bb
+++ b/meta-agl-core/recipes-graphics/rba/rba-config.bb
@@ -4,12 +4,13 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7ca
SRC_URI = "file://RBAModel.json"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install:append() {
install -d ${D}/${sysconfdir}/rba
- install -m 0644 ${WORKDIR}/RBAModel.json ${D}/${sysconfdir}/rba
+ install -m 0644 ${UNPACKDIR}/RBAModel.json ${D}/${sysconfdir}/rba
}
diff --git a/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
index ee75c7335..e68dc7f0c 100644
--- a/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
+++ b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
@@ -6,16 +6,16 @@ overrides (i.e. use the MACHINE name where "machine" is used below):
'''
do_configure:machine() {
- echo repaint-window=34 >> ${WORKDIR}/core.cfg
+ echo repaint-window=34 >> ${UNPACKDIR}/core.cfg
- echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg
- echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg
+ echo transition-duration=300 >> ${UNPACKDIR}/ivishell.cfg
+ echo cursor-theme=default >> ${UNPACKDIR}/ivishell.cfg
}
'''
or:
'''
do_configure:machine() {
- sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg
+ sed -i -e 's/drm-backend/fbdev-backend/' ${UNPACKDIR}/core.cfg
}
'''
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb
index d8baf91f9..8400bc918 100644
--- a/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor-init.bb
@@ -15,7 +15,8 @@ SRC_URI = "file://agl-compositor.service \
file://agl-compositor.conf.in \
"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
AGL_COMPOSITOR_ARGS ?= " --config ${sysconfdir}/xdg/weston/weston.ini --idle-time=0"
AGL_COMPOSITOR_USE_PIXMAN ??= "0"
@@ -25,10 +26,10 @@ AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", "
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
+ install -D -p -m0644 ${UNPACKDIR}/agl-compositor.service ${D}${systemd_system_unitdir}/agl-compositor.service
+ install -D -p -m0644 ${UNPACKDIR}/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
+ install -D -p -m0644 ${UNPACKDIR}/agl-compositor-autologin ${D}${sysconfdir}/pam.d/agl-compositor-autologin
fi
# Install systemd service drop-in with extra configuration
@@ -37,7 +38,7 @@ do_install() {
g=${f%.in}
if [ "${f}" != "${g}" ]; then
sed -e "s,@AGL_COMPOSITOR_ARGS@,${AGL_COMPOSITOR_ARGS},g" \
- ${WORKDIR}/${f} > ${WORKDIR}/${g}
+ ${UNPACKDIR}/${f} > ${WORKDIR}/${g}
fi
done
install -d ${D}${systemd_system_unitdir}/agl-compositor.service.d
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 41240309b..79b13df71 100644
--- a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fac6abe0003c4d142ff8fa1f18316df0"
DEPENDS = "wayland wayland-protocols wayland-native weston"
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-compositor.git;protocol=https;branch=${AGL_BRANCH}"
-SRCREV = "18e93caca8ad397d504215d673765871b2c88f25"
+SRCREV = "c8ffca8f9c67114ca424b88df0740943fe7768e3"
AGL_BRANCH:aglnext = "next"
SRCREV:aglnext = "${AUTOREV}"
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 0611ec5b4..3ada39f94 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
@@ -13,7 +13,6 @@ SRC_URI = " \
file://hdmi-a-2-90.cfg \
file://hdmi-a-2-180.cfg \
file://hdmi-a-2-270.cfg \
- file://remote-output.cfg.in \
file://virtual-0.cfg \
file://virtual-90.cfg \
file://virtual-180.cfg \
@@ -21,7 +20,8 @@ SRC_URI = " \
file://grpc-proxy.cfg \
"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
inherit update-alternatives
@@ -31,29 +31,18 @@ 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 grpc-proxy ${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"
-# Options for the user to change in local.conf
-# e.g. REMOTING_OUTPUT_MODE = "1080x1488"
-REMOTING_OUTPUT_MODE ??= "640x720@30"
-REMOTING_OUTPUT_HOST ??= "192.168.10.3"
-REMOTING_OUTPUT_PORT ??= "5005"
-
-do_configure() {
- sed -e "s#host=.*#host=${REMOTING_OUTPUT_HOST}#" \
- -e "s#port=.*#port=${REMOTING_OUTPUT_PORT}#" \
- ${WORKDIR}/remote-output.cfg.in > ${WORKDIR}/remote-output.cfg
-}
-
do_compile() {
# Put all of our cfg files together for a default portrait
# orientation configuration
rm -f ${WORKDIR}/weston.ini.default
for F in ${WESTON_FRAGMENTS}; do
- cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.default
+ cat ${UNPACKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.default
echo >> ${WORKDIR}/weston.ini.default
done
sed -i -e '$ d' ${WORKDIR}/weston.ini.default
@@ -77,8 +66,8 @@ do_compile() {
F="virtual-0"
INVF="virtual-180"
fi
- cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.landscape
- cat ${WORKDIR}/${INVF}.cfg >> ${WORKDIR}/weston.ini.landscape-inverted
+ cat ${UNPACKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.landscape
+ cat ${UNPACKDIR}/${INVF}.cfg >> ${WORKDIR}/weston.ini.landscape-inverted
echo >> ${WORKDIR}/weston.ini.landscape
echo >> ${WORKDIR}/weston.ini.landscape-inverted
done
@@ -109,47 +98,42 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
ALTERNATIVE_LINK_NAME[weston.ini] = "${weston_ini_dir}/weston.ini"
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"
-
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"
-
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 activation by default
+# 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"
-RCONFLICTS:${PN}-no-activate = "${PN}"
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 activation by default
+# 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"
-RCONFLICTS:${PN}-landscape-no-activate = "${PN}"
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)
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 746bde339..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,8 +2,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-WESTON_DISPLAYS:append = "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", " remote-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.
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
deleted file mode 100644
index 940cbdd0c..000000000
--- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
+++ /dev/null
@@ -1,5 +0,0 @@
-[remote-output]
-name=remote-1
-mode=640x720@30
-host=192.168.10.3
-port=5005
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..9abf2e6a2
--- /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,29 @@
+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>
+Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/80f096d9]
+
+---
+ 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-libweston-Add-paint-node-destruction-into-weston_lay.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch
deleted file mode 100644
index 19eadcf7f..000000000
--- a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From cfde02d47a503cbfd0629bbfe0cb776686af8a91 Mon Sep 17 00:00:00 2001
-From: Marius Vlad <marius.vlad@collabora.com>
-Date: Tue, 9 Apr 2024 18:34:22 +0300
-Subject: [PATCH] libweston: Add paint node destruction into
- weston_layer_entry_remove()
-
-This prevents a potential crash where users of
-weston_layer_entry_insert/layer_entry_remove() would see when moving
-views into a NULL layer (effectively unmapping the surface/view).
-
-Users that have migrated to the weston_view_move_to_layer() are immune
-to this issue because that takes care paint node destruction.
-
-Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
----
- libweston/compositor.c | 17 ++++++++++-------
- 1 file changed, 10 insertions(+), 7 deletions(-)
-
-diff --git a/libweston/compositor.c b/libweston/compositor.c
-index bb29b83b5..ea257bb90 100644
---- a/libweston/compositor.c
-+++ b/libweston/compositor.c
-@@ -3980,17 +3980,10 @@ weston_view_move_to_layer(struct weston_view *view,
- struct weston_layer_entry *layer)
- {
- bool was_mapped = view->is_mapped;
-- struct weston_paint_node *pnode, *pntmp;
-
- if (layer == &view->layer_link)
- return;
-
-- /* Remove all paint nodes because we have no idea what a layer change
-- * does to view visibility on any output.
-- */
-- wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
-- weston_paint_node_destroy(pnode);
--
- view->surface->compositor->view_list_needs_rebuild = true;
-
- /* Damage the view's old region, and remove it from the layer. */
-@@ -4020,6 +4013,16 @@ weston_view_move_to_layer(struct weston_view *view,
- WL_EXPORT void
- weston_layer_entry_remove(struct weston_layer_entry *entry)
- {
-+ struct weston_paint_node *pnode, *pntmp;
-+ struct weston_view *view;
-+
-+ /* Remove all paint nodes because we have no idea what a layer change
-+ * does to view visibility on any output.
-+ */
-+ view = container_of(entry, struct weston_view, layer_link);
-+ wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
-+ weston_paint_node_destroy(pnode);
-+
- wl_list_remove(&entry->link);
- wl_list_init(&entry->link);
- entry->layer = NULL;
---
-2.43.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..77271f3a3
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch
@@ -0,0 +1,58 @@
+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>
+Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/e7960048]
+
+---
+ 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_13.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
index 843a068b4..0b5dae715 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
+++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
@@ -4,7 +4,8 @@ PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting
SRC_URI:append = " \
file://0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch \
- file://0001-libweston-Add-paint-node-destruction-into-weston_lay.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 \
"