diff --git a/recipes-graphics/wayland/weston/0001-desktop-shell-always-paint-background-color-first.patch b/recipes-graphics/wayland/weston/0001-desktop-shell-always-paint-background-color-first.patch deleted file mode 100644 index e4ee784..0000000 --- a/recipes-graphics/wayland/weston/0001-desktop-shell-always-paint-background-color-first.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 157a824d0a30927d6c617357adce968affda38d2 Mon Sep 17 00:00:00 2001 -From: Stefan Agner -Date: Wed, 22 Aug 2018 23:33:10 +0200 -Subject: [PATCH 1/3] desktop-shell: always paint background color first - -Only draw the background once, using the the current default -background color or the user specified background color. - -This allows for non-filling background image implemenation -while still using the specified background color. - -Signed-off-by: Stefan Agner ---- - clients/desktop-shell.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c -index fcc0b65..4d0b1d0 100644 ---- a/clients/desktop-shell.c -+++ b/clients/desktop-shell.c -@@ -756,7 +756,10 @@ background_draw(struct widget *widget, void *data) - - cr = widget_cairo_create(background->widget); - cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); -- cairo_set_source_rgba(cr, 0.0, 0.0, 0.2, 1.0); -+ if (background->color == 0) -+ cairo_set_source_rgba(cr, 0.0, 0.0, 0.2, 1.0); -+ else -+ set_hex_color(cr, background->color); - cairo_paint(cr); - - widget_get_allocation(widget, &allocation); -@@ -802,8 +805,6 @@ background_draw(struct widget *widget, void *data) - cairo_set_source(cr, pattern); - cairo_pattern_destroy (pattern); - cairo_surface_destroy(image); -- } else { -- set_hex_color(cr, background->color); - } - - cairo_paint(cr); --- -2.7.4 - diff --git a/recipes-graphics/wayland/weston/0001-do-not-use-GBM-modifiers.patch b/recipes-graphics/wayland/weston/0001-do-not-use-GBM-modifiers.patch deleted file mode 100644 index 02516d7..0000000 --- a/recipes-graphics/wayland/weston/0001-do-not-use-GBM-modifiers.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 81920a5a90d7a9efd9223f55be5f468d5313fa0d Mon Sep 17 00:00:00 2001 -From: Benjamin Gaignard -Date: Tue, 17 Jul 2018 13:54:50 +0200 -Subject: [PATCH] do not use GBM modifiers - -GBM modifiers are broken do not use until we can fix GBM provider - -Signed-off-by: Benjamin Gaignard ---- - configure.ac | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 093d6b54..9e705f95 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -215,9 +215,6 @@ if test x$enable_drm_compositor = xyes; then - PKG_CHECK_MODULES(DRM_COMPOSITOR_FORMATS_BLOB, [libdrm >= 2.4.83], - [AC_DEFINE([HAVE_DRM_FORMATS_BLOB], 1, [libdrm supports modifier advertisement])], - [AC_MSG_WARN([libdrm does not support modifier advertisement])]) -- PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM_MODIFIERS, [gbm >= 17.1], -- [AC_DEFINE([HAVE_GBM_MODIFIERS], 1, [GBM supports modifiers])], -- [AC_MSG_WARN([GBM does not support modifiers])]) - PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 17.2], - [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports import with modifiers])], - [AC_MSG_WARN([GBM does not support dmabuf import, will omit that capability])]) --- -2.15.0 - diff --git a/recipes-graphics/wayland/weston/0002-desktop-shell-allow-to-center-background-image.patch b/recipes-graphics/wayland/weston/0002-desktop-shell-allow-to-center-background-image.patch deleted file mode 100644 index f67a587..0000000 --- a/recipes-graphics/wayland/weston/0002-desktop-shell-allow-to-center-background-image.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 852d302b703754fe90de1185e816069a32078ae1 Mon Sep 17 00:00:00 2001 -From: Stefan Agner -Date: Wed, 22 Aug 2018 23:56:07 +0200 -Subject: [PATCH 2/3] desktop-shell: allow to center background image - -Add the centered option as background-type. This draws the image -once in the center of the screen. If the image is larger, it will -be cropped like scale-crop. - -Signed-off-by: Stefan Agner ---- - clients/desktop-shell.c | 20 ++++++++++++++++++-- - man/weston.ini.man | 5 ++++- - 2 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c -index 4d0b1d0..0dc0f0b 100644 ---- a/clients/desktop-shell.c -+++ b/clients/desktop-shell.c -@@ -736,7 +736,8 @@ panel_add_launcher(struct panel *panel, const char *icon, const char *path) - enum { - BACKGROUND_SCALE, - BACKGROUND_SCALE_CROP, -- BACKGROUND_TILE -+ BACKGROUND_TILE, -+ BACKGROUND_CENTERED - }; - - static void -@@ -800,14 +801,27 @@ background_draw(struct widget *widget, void *data) - case BACKGROUND_TILE: - cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT); - break; -+ case BACKGROUND_CENTERED: -+ s = (sx < sy) ? sx : sy; -+ if (s < 1.0) -+ s = 1.0; -+ -+ /* align center */ -+ tx = (im_w - s * allocation.width) * 0.5; -+ ty = (im_h - s * allocation.height) * 0.5; -+ -+ cairo_matrix_init_translate(&matrix, tx, ty); -+ cairo_matrix_scale(&matrix, s, s); -+ cairo_pattern_set_matrix(pattern, &matrix); -+ break; - } - - cairo_set_source(cr, pattern); - cairo_pattern_destroy (pattern); - cairo_surface_destroy(image); -+ cairo_mask(cr, pattern); - } - -- cairo_paint(cr); - cairo_destroy(cr); - cairo_surface_destroy(surface); - -@@ -1143,6 +1157,8 @@ background_create(struct desktop *desktop, struct output *output) - background->type = BACKGROUND_SCALE_CROP; - } else if (strcmp(type, "tile") == 0) { - background->type = BACKGROUND_TILE; -+ } else if (strcmp(type, "centered") == 0) { -+ background->type = BACKGROUND_CENTERED; - } else { - background->type = -1; - fprintf(stderr, "invalid background-type: %s\n", -diff --git a/man/weston.ini.man b/man/weston.ini.man -index 199b465..3ee47fa 100644 ---- a/man/weston.ini.man -+++ b/man/weston.ini.man -@@ -260,7 +260,10 @@ sets the path for the background image file (string). - .TP 7 - .BI "background-type=" tile - determines how the background image is drawn (string). Can be --.BR scale ", " scale-crop " or " tile " (default)." -+.BR centered ", " scale ", " scale-crop " or " tile " (default)." -+Centered shows the image once centered. If the image is smaller than the -+output, the rest of the surface will be in background color. If the image -+size does fit the output it will be cropped left and right, or top and bottom. - Scale means scaled to fit the output precisely, not preserving aspect ratio. - Scale-crop preserves aspect ratio, scales the background image just big - enough to cover the output, and centers it. The image ends up cropped from --- -2.7.4 - diff --git a/recipes-graphics/wayland/weston/0003-Allow-to-get-hdmi-output-with-several-outputs.patch b/recipes-graphics/wayland/weston/0003-Allow-to-get-hdmi-output-with-several-outputs.patch deleted file mode 100644 index 3773f62..0000000 --- a/recipes-graphics/wayland/weston/0003-Allow-to-get-hdmi-output-with-several-outputs.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b18247205600b3648197bb5d2cf5bde703bf6af7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Yannick=20Fertr=C3=A9?= -Date: Thu, 20 Dec 2018 11:38:10 +0100 -Subject: [PATCH 3/3] Allow to get hdmi output with several outputs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If an ouput fail to be attach or enable then this output must be only -destroyed and an error doesn't be re which detach & destroy -all other output. - -Signed-off-by: Yannick Fertré ---- - compositor/main.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/compositor/main.c b/compositor/main.c -index b5b4fc5..cf94d17 100644 ---- a/compositor/main.c -+++ b/compositor/main.c -@@ -1743,8 +1743,14 @@ drm_process_layoutput(struct wet_compositor *wet, struct wet_layoutput *lo) - return -1; - - if (drm_try_attach_enable(output->output, lo) < 0) { -+ /* -+ * if a wet_ouput fail to be attach or enable -+ * then this output must be destroyed -+ * but don't return an error which dettatch & destroy -+ * all other output. -+ */ - wet_output_destroy(output); -- return -1; -+ - } - } - --- -2.7.4 - diff --git a/recipes-graphics/wayland/weston/0004-Force-to-close-all-output.patch b/recipes-graphics/wayland/weston/0004-Force-to-close-all-output.patch deleted file mode 100644 index 26f770c..0000000 --- a/recipes-graphics/wayland/weston/0004-Force-to-close-all-output.patch +++ /dev/null @@ -1,36 +0,0 @@ -From b9cc563f142f2d3b8edd976bbdb2bf302220e1fd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Yannick=20Fertr=C3=A9?= -Date: Fri, 11 Jan 2019 10:55:05 +0100 -Subject: [PATCH] Force to close all output -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In case of plug/unplug HMDI, it's necessary to close all output enabled. -Without this patch, weston is stuck on DSI output. - -Signed-off-by: Yannick Fertré ---- - compositor/main.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/compositor/main.c b/compositor/main.c -index cf94d17..71c547b 100644 ---- a/compositor/main.c -+++ b/compositor/main.c -@@ -1819,7 +1819,11 @@ drm_heads_changed(struct wl_listener *listener, void *arg) - - if ((connected || forced) && !enabled) { - drm_head_prepare_enable(wet, head); -- } else if (!(connected || forced) && enabled) { -+ } else if (enabled) { -+ /* -+ * closed all output (connected or not connected) -+ * this is neccessary to switch between HDMI <> DSI -+ */ - drm_head_disable(head); - } else if (enabled && changed) { - weston_log("Detected a monitor change on head '%s', " --- -2.7.4 - diff --git a/recipes-graphics/wayland/weston/0005-clients-close-unused-keymap-fd.patch b/recipes-graphics/wayland/weston/0005-clients-close-unused-keymap-fd.patch deleted file mode 100644 index 1bacda8..0000000 --- a/recipes-graphics/wayland/weston/0005-clients-close-unused-keymap-fd.patch +++ /dev/null @@ -1,74 +0,0 @@ -From dc6538a73577ee23841ea3c5150b3907a7cef04a Mon Sep 17 00:00:00 2001 -From: Antonio Borneo -Date: Mon, 29 Apr 2019 17:54:10 +0200 -Subject: [PATCH] clients: close unused keymap fd - -commit 4071225cdc12a36a08ddd3102a3dd17d4006c320 upstream. - -In the simple examples in which keymap is not handled, the open -descriptor has to be properly closed. - -After each suspend/resume sequence the keymap is send again to -every client. On client weston-simple-egl the leak causes a -segfault when no more file descriptors can be opened. - -Close the file descriptor and lazily copy/paste the comment -already available in simple-dmabuf-v4l. - -Signed-off-by: Antonio Borneo ---- - clients/multi-resource.c | 2 ++ - clients/simple-egl.c | 2 ++ - clients/weston-info.c | 3 +++ - 3 files changed, 7 insertions(+) - -diff --git a/clients/multi-resource.c b/clients/multi-resource.c -index 2be0a7e3..0a035118 100644 ---- a/clients/multi-resource.c -+++ b/clients/multi-resource.c -@@ -296,6 +296,8 @@ static void - keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, - uint32_t format, int fd, uint32_t size) - { -+ /* Just so we don’t leak the keymap fd */ -+ close(fd); - } - - static void -diff --git a/clients/simple-egl.c b/clients/simple-egl.c -index a1e57aef..ac99b449 100644 ---- a/clients/simple-egl.c -+++ b/clients/simple-egl.c -@@ -695,6 +695,8 @@ static void - keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, - uint32_t format, int fd, uint32_t size) - { -+ /* Just so we don’t leak the keymap fd */ -+ close(fd); - } - - static void -diff --git a/clients/weston-info.c b/clients/weston-info.c -index 609e270a..20c96d0f 100644 ---- a/clients/weston-info.c -+++ b/clients/weston-info.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - - #include - -@@ -435,6 +436,8 @@ static void - keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, - uint32_t format, int fd, uint32_t size) - { -+ /* Just so we don’t leak the keymap fd */ -+ close(fd); - } - - static void --- -2.21.0 - diff --git a/recipes-graphics/wayland/weston/0006-backend-drm-fix-race-during-system-suspend.patch b/recipes-graphics/wayland/weston/0006-backend-drm-fix-race-during-system-suspend.patch deleted file mode 100644 index 28c5f96..0000000 --- a/recipes-graphics/wayland/weston/0006-backend-drm-fix-race-during-system-suspend.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 084d5600c6b8ff7189b40f5a0a844ea602e0d428 Mon Sep 17 00:00:00 2001 -From: Antonio Borneo -Date: Mon, 27 May 2019 17:06:33 +0200 -Subject: [PATCH] backend-drm: fix race during system suspend - -Depending on system loading, weston-launcher could drop the drm -master access before compositor and all the clients receive the -notification. In this case, some commit could be sent to the drm -driver too late and get refused with error EACCES. -This error condition is not properly managed and causes weston to -hang. - -Only for atomic modesetting, cancel current repaint in case of -EACCES. -No need to wait for suspend or for any notification; in case the -client reschedules and try a repaint, it will get EACCES again. -At resume, damage-all guarantees a complete repaint. - -Non-atomic modesetting suffers from similar problems, but it is -not fixed by this change. Since drm_pending_state_apply() never -returns error for non-atomic modesetting, this change has no -impact on non-atomic modesetting. - -Signed-off-by: Antonio Borneo -Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/117 ---- - libweston/compositor-drm.c | 15 +++++++++++++-- - libweston/compositor.c | 2 +- - libweston/compositor.h | 2 ++ - 3 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index 3891176..d88bc1e 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -2885,7 +2885,9 @@ drm_output_start_repaint_loop(struct weston_output *output_base) - ret = drm_pending_state_apply(pending_state); - if (ret != 0) { - weston_log("applying repaint-start state failed: %m\n"); -- goto finish_frame; -+ if (ret != -EACCES) -+ goto finish_frame; -+ weston_output_schedule_repaint_reset(output_base); - } - - return; -@@ -2987,8 +2989,17 @@ drm_repaint_flush(struct weston_compositor *compositor, void *repaint_data) - { - struct drm_backend *b = to_drm_backend(compositor); - struct drm_pending_state *pending_state = repaint_data; -+ struct weston_output *output; -+ int ret; - -- drm_pending_state_apply(pending_state); -+ ret = drm_pending_state_apply(pending_state); -+ if (ret == -EACCES) { -+ weston_log("failed repaint flush: Permission denied\n"); -+ wl_list_for_each(output, &compositor->output_list, link) { -+ if (output->repainted) -+ weston_output_schedule_repaint_reset(output); -+ } -+ } - b->repaint_data = NULL; - } - -diff --git a/libweston/compositor.c b/libweston/compositor.c -index 9deb781..51705f7 100644 ---- a/libweston/compositor.c -+++ b/libweston/compositor.c -@@ -2435,7 +2435,7 @@ weston_output_repaint(struct weston_output *output, void *repaint_data) - return r; - } - --static void -+WL_EXPORT void - weston_output_schedule_repaint_reset(struct weston_output *output) - { - output->repaint_status = REPAINT_NOT_SCHEDULED; -diff --git a/libweston/compositor.h b/libweston/compositor.h -index 8b7a102..4f9b989 100644 ---- a/libweston/compositor.h -+++ b/libweston/compositor.h -@@ -1704,6 +1704,8 @@ weston_output_finish_frame(struct weston_output *output, - void - weston_output_schedule_repaint(struct weston_output *output); - void -+weston_output_schedule_repaint_reset(struct weston_output *output); -+void - weston_output_damage(struct weston_output *output); - void - weston_compositor_schedule_repaint(struct weston_compositor *compositor); --- -2.7.4 - diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 0000000..f8366d8 --- /dev/null +++ b/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/${PN}:" diff --git a/recipes-graphics/wayland/weston_5.0.0.bbappend b/recipes-graphics/wayland/weston_5.0.0.bbappend deleted file mode 100644 index c3db1f2..0000000 --- a/recipes-graphics/wayland/weston_5.0.0.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/${PN}:" - -SRC_URI_append_stm32mpcommon = " file://0001-do-not-use-GBM-modifiers.patch " -SRC_URI_append_stm32mpcommon = " file://0001-desktop-shell-always-paint-background-color-first.patch " -SRC_URI_append_stm32mpcommon = " file://0002-desktop-shell-allow-to-center-background-image.patch " -SRC_URI_append_stm32mpcommon = " file://0003-Allow-to-get-hdmi-output-with-several-outputs.patch " -SRC_URI_append_stm32mpcommon = " file://0004-Force-to-close-all-output.patch " -SRC_URI_append_stm32mpcommon = " file://0005-clients-close-unused-keymap-fd.patch " -SRC_URI_append_stm32mpcommon = " file://0006-backend-drm-fix-race-during-system-suspend.patch "