diff options
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/weston')
6 files changed, 0 insertions, 504 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_7.0.0.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_7.0.0.patch deleted file mode 100644 index 362f6b064..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_7.0.0.patch +++ /dev/null @@ -1,51 +0,0 @@ -Allow regular users to launch Weston - -Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> -[Reworked for Weston 7.0.0 switch to meson] -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c -index 9fa329b6..8e218804 100644 ---- a/libweston/launcher-direct.c -+++ b/libweston/launcher-direct.c -@@ -291,8 +291,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor * - { - struct launcher_direct *launcher; - -+#ifndef ENABLE_USER_START - if (geteuid() != 0) - return -EINVAL; -+#endif - - launcher = zalloc(sizeof(*launcher)); - if (launcher == NULL) -diff --git a/libweston/meson.build b/libweston/meson.build -index d8d3fc07..0d39ebf1 100644 ---- a/libweston/meson.build -+++ b/libweston/meson.build -@@ -216,6 +216,10 @@ if get_option('weston-launch') - meson.add_install_script('echo', 'REMINDER: You are installing weston-launch, please make it setuid-root.') - endif - -+if get_option('enable-user-start') -+ config_h.set('ENABLE_USER_START', '1') -+endif -+ - subdir('renderer-gl') - subdir('backend-drm') - subdir('backend-fbdev') -diff --git a/meson_options.txt b/meson_options.txt -index d5bf1d54..c93f31d1 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -217,3 +217,10 @@ option( - value: false, - description: 'Generate documentation' - ) -+ -+option( -+ 'enable-user-start', -+ type: 'boolean', -+ value: true, -+ description: 'Tests: enable start as non-root user' -+) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch deleted file mode 100644 index 32755c4b3..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7e5fb58591a29d60657158262a0772796bfd3461 Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Wed, 12 Feb 2020 13:18:19 +0200 -Subject: [PATCH] libweston: Expose weston_output_damage() in libweston - -We have weston_compositor_damage_all() exported and declared but users -might need weston_output_damage() to refer to an individual output. The -symbol already exported so just declare it. - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - include/libweston/libweston.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h -index 1439775e..9fac5be0 100644 ---- a/include/libweston/libweston.h -+++ b/include/libweston/libweston.h -@@ -1604,6 +1604,8 @@ weston_compositor_schedule_repaint(struct weston_compositor *compositor); - void - weston_compositor_damage_all(struct weston_compositor *compositor); - void -+weston_output_damage(struct weston_output *woutput); -+void - weston_compositor_wake(struct weston_compositor *compositor); - void - weston_compositor_sleep(struct weston_compositor *compositor); --- -2.20.1 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch deleted file mode 100644 index 05ce7de30..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch +++ /dev/null @@ -1,264 +0,0 @@ -From e1fd1c9fc08b9e1b8a2f2d958ce591bb8d256b84 Mon Sep 17 00:00:00 2001 -From: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> -Date: Mon, 16 Dec 2019 19:24:15 +0900 -Subject: [PATCH 1/1] ivi-shell: Fix crash due no transmitter screen - -Registered the events for the output_created, destroyed, -resized events.So that the ivi_scrn can be destroyed, -created dynamically during destroyed and created events. -And the view properties are dynamically changed during -resized/moved events. - -Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> ---- - ivi-shell/ivi-layout-private.h | 5 ++ - ivi-shell/ivi-layout.c | 154 ++++++++++++++++++++++++++++++++++++----- - 2 files changed, 140 insertions(+), 19 deletions(-) - -diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h -index c054130..8997edd 100644 ---- a/ivi-shell/ivi-layout-private.h -+++ b/ivi-shell/ivi-layout-private.h -@@ -113,6 +113,11 @@ struct ivi_layout { - - struct ivi_layout_transition_set *transitions; - struct wl_list pending_transition_list; /* transition_node::link */ -+ -+ struct wl_listener output_created; -+ struct wl_listener output_destroyed; -+ struct wl_listener output_resized; -+ struct wl_listener output_moved; - }; - - struct ivi_layout *get_instance(void); -diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c -index 2c450f3..1fbfeeb 100644 ---- a/ivi-shell/ivi-layout.c -+++ b/ivi-shell/ivi-layout.c -@@ -67,7 +67,7 @@ - #include "ivi-layout-export.h" - #include "ivi-layout-private.h" - #include "ivi-layout-shell.h" -- -+#include <libweston/plugin-registry.h> - #include "shared/helpers.h" - #include "shared/os-compatibility.h" - -@@ -259,6 +259,87 @@ ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf) - free(ivisurf); - } - -+ -+static void -+destroy_screen(struct ivi_layout_screen *iviscrn) -+{ -+ struct ivi_layout_layer *ivilayer; -+ struct ivi_layout_layer *next; -+ -+ /*we need to remove the layers from pending and order lists -+ *otherwise the memory will be corrupted during the -+ *wl_list_remove of pending.link or order.link from -+ *ivi_layout_screen_add_layer() or commit_screen_list() -+ *and on_screen has to be set as NULL otherwise the commit_changes() -+ *API will try to refer the freed iviscrn*/ -+ wl_list_for_each_safe(ivilayer, next, &iviscrn->pending.layer_list, pending.link) { -+ wl_list_remove(&ivilayer->pending.link); -+ wl_list_init(&ivilayer->pending.link); -+ ivilayer->on_screen = NULL; -+ } -+ -+ wl_list_for_each_safe(ivilayer, next, &iviscrn->order.layer_list, order.link) { -+ wl_list_remove(&ivilayer->order.link); -+ wl_list_init(&ivilayer->order.link); -+ ivilayer->on_screen = NULL; -+ } -+ -+ wl_list_init(&iviscrn->pending.layer_list); -+ wl_list_init(&iviscrn->order.layer_list); -+ -+ wl_list_remove(&iviscrn->link); -+ free(iviscrn); -+} -+ -+static void -+output_destroyed_event(struct wl_listener *listener, void *data) -+{ -+ struct ivi_layout *layout = -+ wl_container_of(listener, layout, output_destroyed); -+ struct ivi_layout_screen *iviscrn = NULL; -+ struct ivi_layout_screen *next = NULL; -+ struct weston_output *destroyed_output = (struct weston_output*)data; -+ -+ wl_list_for_each_safe(iviscrn, next, &layout->screen_list, link) { -+ if (iviscrn->output == destroyed_output) { -+ destroy_screen(iviscrn); -+ } -+ } -+ ivi_layout_commit_changes(); -+} -+ -+static void -+add_screen(struct weston_output *output) -+{ -+ struct ivi_layout *layout = get_instance(); -+ struct ivi_layout_screen *iviscrn = NULL; -+ -+ if(!output) -+ return; -+ -+ iviscrn = calloc(1, sizeof *iviscrn); -+ if (iviscrn == NULL) { -+ weston_log("fails to allocate memory\n"); -+ return; -+ } -+ -+ iviscrn->layout = layout; -+ iviscrn->output = output; -+ -+ wl_list_init(&iviscrn->pending.layer_list); -+ wl_list_init(&iviscrn->order.layer_list); -+ wl_list_insert(&layout->screen_list, &iviscrn->link); -+} -+ -+static void -+output_created_event(struct wl_listener *listener, void *data) -+{ -+ struct weston_output *created_output = (struct weston_output*)data; -+ -+ add_screen(created_output); -+ ivi_layout_commit_changes(); -+} -+ - /** - * Internal API to initialize ivi_screens found from output_list of weston_compositor. - * Called by ivi_layout_init_with_compositor. -@@ -266,27 +347,14 @@ ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf) - static void - create_screen(struct weston_compositor *ec) - { -+ - struct ivi_layout *layout = get_instance(); - struct ivi_layout_screen *iviscrn = NULL; -- struct weston_output *output = NULL; -- -- wl_list_for_each(output, &ec->output_list, link) { -- iviscrn = calloc(1, sizeof *iviscrn); -- if (iviscrn == NULL) { -- weston_log("fails to allocate memory\n"); -- continue; -- } - -- iviscrn->layout = layout; -- -- iviscrn->output = output; -- -- wl_list_init(&iviscrn->pending.layer_list); -- -- wl_list_init(&iviscrn->order.layer_list); -+ struct weston_output *output = NULL; - -- wl_list_insert(&layout->screen_list, &iviscrn->link); -- } -+ wl_list_for_each(output, &ec->output_list, link) -+ add_screen(output); - } - - /** -@@ -822,7 +890,18 @@ build_view_list(struct ivi_layout *layout) - if (!ivi_view_is_mapped(ivi_view)) - weston_view_unmap(ivi_view->view); - } -+ struct weston_view *view = NULL; -+ struct weston_view *view_next = NULL; - -+ /* Earlier only the head node was reset, but the remaining links -+ * won't be changed. Due to this, faced crash issue (or sometimes -+ * list was looping) in weston_view_destroy API. So clearing the -+ * entire list*/ -+ wl_list_for_each_safe(view, view_next, -+ &layout->layout_layer.view_list.link, layer_link.link) { -+ wl_list_remove(&view->layer_link.link); -+ wl_list_init(&view->layer_link.link); -+ } - /* Clear view list of layout ivi_layer */ - wl_list_init(&layout->layout_layer.view_list.link); - -@@ -1791,7 +1870,22 @@ ivi_layout_commit_changes(void) - - return IVI_SUCCEEDED; - } -+static void -+output_resized_moved_events(struct wl_listener *listener, void *data) -+{ -+ struct ivi_layout_screen *iviscrn = NULL; -+ struct ivi_layout_layer *ivilayer; -+ struct ivi_layout_view *ivi_view; -+ struct weston_output *output = (struct weston_output*)data; - -+ iviscrn = get_screen_from_output(output); -+ -+ wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) { -+ wl_list_for_each(ivi_view, &ivilayer->order.view_list, -+ order_link) -+ update_prop(ivi_view); -+ } -+} - static int32_t - ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer, - enum ivi_layout_transition_type type, -@@ -1931,6 +2025,14 @@ surface_create(struct weston_surface *wl_surface, uint32_t id_surface) - return NULL; - } - -+ ivisurf = get_surface(&layout->surface_list, id_surface); -+ if (ivisurf != NULL) { -+ if (ivisurf->surface != NULL) { -+ weston_log("id_surface(%d) is already created\n", id_surface); -+ return NULL; -+ } -+ } -+ - ivisurf = calloc(1, sizeof *ivisurf); - if (ivisurf == NULL) { - weston_log("fails to allocate memory\n"); -@@ -1954,6 +2056,8 @@ surface_create(struct weston_surface *wl_surface, uint32_t id_surface) - - wl_list_insert(&layout->surface_list, &ivisurf->link); - -+ wl_signal_emit(&layout->surface_notification.created, ivisurf); -+ - return ivisurf; - } - -@@ -2006,8 +2110,8 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, - return ivisurf; - } - --static struct ivi_layout_interface ivi_layout_interface; - -+static struct ivi_layout_interface ivi_layout_interface; - void - ivi_layout_init_with_compositor(struct weston_compositor *ec) - { -@@ -2035,6 +2139,18 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec) - - create_screen(ec); - -+ layout->output_created.notify = output_created_event; -+ wl_signal_add(&ec->output_created_signal, &layout->output_created); -+ -+ layout->output_destroyed.notify = output_destroyed_event; -+ wl_signal_add(&ec->output_destroyed_signal, &layout->output_destroyed); -+ -+ layout->output_resized.notify = output_resized_moved_events; -+ wl_signal_add(&ec->output_resized_signal, &layout->output_resized); -+ -+ layout->output_moved.notify = output_resized_moved_events; -+ wl_signal_add(&ec->output_moved_signal, &layout->output_moved); -+ - layout->transitions = ivi_layout_transition_set_create(ec); - wl_list_init(&layout->pending_transition_list); - --- -2.7.4 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch deleted file mode 100644 index 388e430d8..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 2cb25adac6b968104bbfb276c684506607dfbff4 Mon Sep 17 00:00:00 2001 -From: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> -Date: Wed, 7 Aug 2019 21:05:11 +0900 -Subject: [PATCH 1/1] compositor-drm: introduce drm_get_dmafd_from_view - -This API enables to get dmafd from weston_view - -Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> ---- - libweston/compositor-drm.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++ - libweston/compositor-drm.h | 7 ++++++ - 2 files changed, 66 insertions(+) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index b83459a..98ad85c 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -5848,6 +5848,64 @@ drm_output_set_seat(struct weston_output *base, - seat ? seat : ""); - } - -+ static int -+drm_get_dma_fd_from_view(struct weston_output *base, -+ struct weston_view *ev, int *buf_stride) -+{ -+ struct drm_backend *b = to_drm_backend(base->compositor); -+ struct weston_buffer *buffer = ev->surface->buffer_ref.buffer; -+ struct gbm_bo *bo; -+ struct drm_fb *current; -+ struct linux_dmabuf_buffer *dmabuf; -+ bool is_opaque = weston_view_is_opaque(ev,&ev->transform.boundingbox); -+ uint32_t format; -+ int fd, ret; -+ -+ if(!buffer) { -+ weston_log("buffer is NULL\n"); -+ return -1; -+ } -+ -+ if(dmabuf = linux_dmabuf_buffer_get(buffer->resource)) { -+ current = drm_fb_get_from_dmabuf(dmabuf, b, is_opaque); -+ if (!current) -+ { -+ fprintf(stderr, "failed to get drm_fb from dmabuf\n"); -+ return -1; -+ } -+ *buf_stride=current->strides[0]; -+ } -+ else if(ev->surface->buffer_ref.buffer->legacy_buffer) { -+ bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_WL_BUFFER, -+ buffer->resource, GBM_BO_USE_SCANOUT); -+ if (!bo) { -+ weston_log("failed to get gbm_bo\n"); -+ return -1; -+ } -+ current = drm_fb_get_from_bo(bo, b, is_opaque, BUFFER_CLIENT); -+ -+ if (!current) { -+ weston_log("failed to get drm_fb from bo\n"); -+ return -1; -+ } -+ *buf_stride=current->strides[0]; -+ } -+ else { -+ weston_log("Buffer is not supported\n"); -+ return -1; -+ } -+ -+ ret = drmPrimeHandleToFD(b->drm.fd, current->handles[0], -+ DRM_CLOEXEC, &fd); -+ free(current); -+ if (ret) { -+ weston_log("failed to create prime fd for front buffer\n"); -+ return -1; -+ } -+ -+ return fd; -+} -+ - static int - drm_output_init_gamma_size(struct drm_output *output) - { -@@ -7396,6 +7454,7 @@ static const struct weston_drm_output_api api = { - drm_output_set_mode, - drm_output_set_gbm_format, - drm_output_set_seat, -+ drm_get_dma_fd_from_view - }; - - static const struct weston_drm_virtual_output_api virt_api = { -diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h -index 71a306f..a9379e4 100644 ---- a/libweston/compositor-drm.h -+++ b/libweston/compositor-drm.h -@@ -78,6 +78,13 @@ struct weston_drm_output_api { - */ - void (*set_seat)(struct weston_output *output, - const char *seat); -+ -+ /** Get the dma fd from drm view. -+ * -+ * The dma fd is got from weston_view. -+ * Returns fd on success, -1 on failure. -+ */ -+ int (*get_dma_fd_from_view)(struct weston_output *output, struct weston_view *view, int *buf_stride); - }; - - static inline const struct weston_drm_output_api * --- -2.7.4 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch deleted file mode 100644 index 61772182c..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0a0103f20437d9ed63b6cec500027a6d7bf6185f Mon Sep 17 00:00:00 2001 -From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> -Date: Mon, 20 May 2019 18:31:32 +0900 -Subject: [PATCH] main: change remoting initialization timing - -Upstream-Status: Pending[1] - -[1]: https://gitlab.freedesktop.org/wayland/weston/issues/246 - -Signed-off-by: Tomohito Esaki <etom@igel.co.jp> -Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> -[Updated for Weston 8.0.0] -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - ---- -diff --git a/compositor/main.c b/compositor/main.c -index 8eb8a47..22686b0 100644 ---- a/compositor/main.c -+++ b/compositor/main.c -@@ -2518,9 +2518,6 @@ load_drm_backend(struct weston_compositor *c, - ret = weston_compositor_load_backend(c, WESTON_BACKEND_DRM, - &config.base); - -- /* remoting */ -- load_remoting(c, wc); -- - /* pipewire */ - load_pipewire(c, wc); - -@@ -3278,6 +3275,10 @@ wet_main(int argc, char *argv[]) - if (wet.init_failed) - goto out; - -+ /* remoting: only support on drm-backend */ -+ if (strstr(backend, "drm-backend.so")) -+ load_remoting(wet.compositor, config); -+ - if (idle_time < 0) - weston_config_section_get_int(section, "idle-time", &idle_time, -1); - if (idle_time < 0) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/smack-weston b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/smack-weston deleted file mode 100644 index 63a32405a..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/smack-weston +++ /dev/null @@ -1,8 +0,0 @@ -System System::Weston rwxa-- -System::Weston System rwx--- -System::Weston System::Shared rwx--- -System::Weston System::Run rwxat- -System::Weston System::Log rwxa-- -System::Weston _ r-x--l -System::Weston User::Home r-x--l -System::Weston User::App-Shared rwxat- |