diff options
Diffstat (limited to 'meta-agl-core/recipes-graphics/wayland/weston')
5 files changed, 113 insertions, 143 deletions
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); |