summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>2021-03-29 17:43:49 +0900
committerDamian Hobson-Garcia <dhobsong@igel.co.jp>2021-04-06 11:22:58 +0900
commit878df84bdfa612d2b095521ad1a75ba9f873cc7f (patch)
treed687ef80c82a1800cb7bd88a2f91f8af4b946736
parent69deecda865d829248bc44ad99e8589e42aa6703 (diff)
libweston: Don't request repaint in output enable
Allow for the compositor to start without first displaying a blank screen when no startup transition is used. This patch is under review in the mainline weston repository. It should be useable for other use cases besides drm-lease, but right now this patch causes the weston test suite to fail by unconvering an unrelated problem with wayland event handling[1]. For now, keep this with the drm-lease support under agl-devel until the weston test suite issue is resolved and the patch is merged upstream. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/201 Bug-AGL: SPEC-3816 Change-Id: Ib5a2f0dde833d88a17bd4e659ff1acee81acd21f Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
-rw-r--r--meta-agl-drm-lease/recipes-graphics/weston/weston/0001-compositor-do-not-request-repaint-in-output_enable.patch36
-rw-r--r--meta-agl-drm-lease/recipes-graphics/weston/weston_8.0.0.bbappend1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-agl-drm-lease/recipes-graphics/weston/weston/0001-compositor-do-not-request-repaint-in-output_enable.patch b/meta-agl-drm-lease/recipes-graphics/weston/weston/0001-compositor-do-not-request-repaint-in-output_enable.patch
new file mode 100644
index 00000000..f2f99036
--- /dev/null
+++ b/meta-agl-drm-lease/recipes-graphics/weston/weston/0001-compositor-do-not-request-repaint-in-output_enable.patch
@@ -0,0 +1,36 @@
+From 3b7c9b7458976ea7f1e57796149d4ed4c56d9225 Mon Sep 17 00:00:00 2001
+From: Michael Tretter <m.tretter@pengutronix.de>
+Date: Thu, 23 Aug 2018 16:58:47 +0200
+Subject: [PATCH] compositor: do not request repaint in output_enable
+
+When enabling a weston_output, the compositor damages the entire output,
+to ensure that the entire output is redrawn. However, this triggers a
+repaint, which might happen before anything is actually drawn. The
+result is a black frame before the shell is displayed.
+
+Damage the entire output region, but do not trigger the repaint when
+enabling a weston_output.
+
+Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
+---
+ libweston/compositor.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/libweston/compositor.c b/libweston/compositor.c
+index 6e965372..34d8483c 100644
+--- a/libweston/compositor.c
++++ b/libweston/compositor.c
+@@ -6471,7 +6471,9 @@ weston_output_enable(struct weston_output *output)
+ weston_output_init_zoom(output);
+
+ weston_output_init_geometry(output, x, y);
+- weston_output_damage(output);
++ pixman_region32_union(&c->primary_plane.damage,
++ &c->primary_plane.damage,
++ &output->region);
+
+ wl_list_init(&output->animation_list);
+ wl_list_init(&output->feedback_list);
+--
+2.25.1
+
diff --git a/meta-agl-drm-lease/recipes-graphics/weston/weston_8.0.0.bbappend b/meta-agl-drm-lease/recipes-graphics/weston/weston_8.0.0.bbappend
index 74ee94c1..b3d63db0 100644
--- a/meta-agl-drm-lease/recipes-graphics/weston/weston_8.0.0.bbappend
+++ b/meta-agl-drm-lease/recipes-graphics/weston/weston_8.0.0.bbappend
@@ -5,6 +5,7 @@ SRC_URI_append = " \
file://0002-Add-DRM-lease-support.patch \
file://0003-launcher-do-not-touch-VT-tty-while-using-non-default.patch \
file://0004-launcher-direct-handle-seat0-without-VTs.patch \
+ file://0001-compositor-do-not-request-repaint-in-output_enable.patch \
"
PACKAGECONFIG[drm-lease] = "-Ddrm-lease=true,-Ddrm-lease=false,drm-lease-manager"