[meta-arago][master/wrynose][PATCH] weston: fix assert firing when subsurfaces have no views

Thorsten Lannynd <[email protected]> Mon, 1 Jun 2026 12:08:44 -0500
Newsgroups org.yoctoproject.lists.meta-arago
Message-ID <[email protected]>
Apply upstream candidate fix for an assert in
weston_surface_apply_subsurface_order that fires when subsurfaces have
no views. Without this patch, the assert fires when running Chromium
and causes the display to crash.

Signed-off-by: Thorsten Lannynd <[email protected]>
---
 .../wayland/weston-ti-version.inc             |  1 +
 ...x-assert-firing-when-subsurfaces-hav.patch | 47 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston/0002-surfac=
e-state-Fix-assert-firing-when-subsurfaces-hav.patch

diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc b/m=
eta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
index 42e6b6ac..c8624f0e 100644
--- a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
@@ -4,4 +4,5 @@ PR:append =3D ".tisoc1"
=20
 SRC_URI +=3D " \
         file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
+        file://0002-surface-state-Fix-assert-firing-when-subsurfaces-hav.p=
atch \
 "
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston/0002-surface-state=
-Fix-assert-firing-when-subsurfaces-hav.patch b/meta-ti-bsp/recipes-graphic=
s/wayland/weston/0002-surface-state-Fix-assert-firing-when-subsurfaces-hav.=
patch
new file mode 100644
index 00000000..d370577c
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston/0002-surface-state-Fix-as=
sert-firing-when-subsurfaces-hav.patch
@@ -0,0 +1,47 @@
+From 12ecd8d4b5095c120efef76493546ead3f41ab5b Mon Sep 17 00:00:00 2001
+From: Derek Foreman <[email protected]>
+Date: Wed, 27 May 2026 14:12:36 -0500
+Subject: [PATCH] surface-state: Fix assert firing when subsurfaces have no
+ views
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/=
-/merge_requests/2085]
+
+I've not been able to reproduce this, but have a report that this fires
+when running Chromium on aarch64.
+
+It seems plausible that we can get here when none of the subsurfaces have
+views, and thus the flag won't be set.
+
+Let's just remove the assert.
+
+Fixes 6a280a8f
+Fixes #1117
+
+Signed-off-by: Derek Foreman <[email protected]>
+Signed-off-by: Thorsten Lannynd <[email protected]>
+---
+ libweston/surface-state.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/libweston/surface-state.c b/libweston/surface-state.c
+index 3c31a0aa..65dc70bb 100644
+--- a/libweston/surface-state.c
++++ b/libweston/surface-state.c
+@@ -268,7 +268,6 @@ weston_surface_attach(struct weston_surface *surface,
+ static void
+ weston_surface_apply_subsurface_order(struct weston_surface *surface)
+ {
+-	struct weston_compositor *comp =3D surface->compositor;
+	struct weston_subsurface *sub;
+	struct weston_view *view;
+
+@@ -279,7 +278,6 @@ weston_surface_apply_subsurface_order(struct weston_su=
rface *surface)
+		wl_list_for_each(view, &sub->surface->views, surface_link)
+			weston_view_geometry_dirty(view);
+	}
+-	weston_assert_true(comp, comp->view_list_needs_rebuild);
+ }
+
+ /* Translate pending damage in buffer co-ordinates to surface
+--
+2.34.1
--=20
2.34.1