diff options
2 files changed, 0 insertions, 205 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch deleted file mode 100644 index 187bea502..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch +++ /dev/null @@ -1,202 +0,0 @@ -From e31e63976aab7616319c10ad21c998c3b4c634e6 Mon Sep 17 00:00:00 2001 -From: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> -Date: Tue, 30 Jul 2019 20:22:15 +0900 -Subject: [PATCH 1/2] compositor: add output type to weston_output - -This enables weston to use multiple types of backend -Each backends have own output structure for each functions -To avoid invalid member access, type identifier is needed - -Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> ---- - libweston/compositor-drm.c | 12 +++++++++++- - libweston/compositor-fbdev.c | 2 +- - libweston/compositor-headless.c | 2 +- - libweston/compositor-rdp.c | 2 +- - libweston/compositor-wayland.c | 2 +- - libweston/compositor-x11.c | 2 +- - libweston/compositor.h | 12 ++++++++++++ - 7 files changed, 28 insertions(+), 6 deletions(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index c110110..b83459a 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -923,6 +923,7 @@ drm_output_find_by_crtc(struct drm_backend *b, uint32_t crtc_id) - struct drm_output *output; - - wl_list_for_each(output, &b->compositor->output_list, base.link) { -+ if(output->base.output_type == OUTPUT_DRM) - if (output->crtc_id == crtc_id) - return output; - } -@@ -939,6 +940,7 @@ drm_head_find_by_connector(struct drm_backend *backend, uint32_t connector_id) - wl_list_for_each(base, - &backend->compositor->head_list, compositor_link) { - head = to_drm_head(base); -+ if(base->output->output_type == OUTPUT_DRM) - if (head->connector_id == connector_id) - return head; - } -@@ -6159,6 +6161,7 @@ drm_output_enable(struct weston_output *base) - - assert(!output->virtual); - -+ output->base.output_type = OUTPUT_DRM; - resources = drmModeGetResources(b->drm.fd); - if (!resources) { - weston_log("drmModeGetResources failed\n"); -@@ -6628,6 +6631,7 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device) - /* Remove connectors that have disappeared. */ - wl_list_for_each_safe(base, next, - &b->compositor->head_list, compositor_link) { -+ if (base->output->output_type == OUTPUT_DRM) { - bool removed = true; - - head = to_drm_head(base); -@@ -6646,6 +6650,7 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device) - head->base.name, head->connector_id); - drm_head_destroy(head); - } -+ } - - drm_backend_update_unused_outputs(b, resources); - -@@ -6751,12 +6756,14 @@ session_notify(struct wl_listener *listener, void *data) - * pending frame callbacks. */ - - wl_list_for_each(output, &compositor->output_list, base.link) { -+ if(output->base.output_type == OUTPUT_DRM) { - output->base.repaint_needed = false; - if (output->cursor_plane) - drmModeSetCursor(b->drm.fd, output->crtc_id, - 0, 0, 0); - } -- -+ } -+ if(output->base.output_type == OUTPUT_DRM) { - output = container_of(compositor->output_list.next, - struct drm_output, base.link); - -@@ -6768,6 +6775,7 @@ session_notify(struct wl_listener *listener, void *data) - plane->plane_id, - output->crtc_id, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0); -+ } - } - } - } -@@ -7094,6 +7102,7 @@ switch_to_gl_renderer(struct drm_backend *b) - } - - wl_list_for_each(output, &b->compositor->output_list, base.link) -+ if(output->base.output_type == OUTPUT_DRM) - pixman_renderer_output_destroy(&output->base); - - b->compositor->renderer->destroy(b->compositor); -@@ -7106,6 +7115,7 @@ switch_to_gl_renderer(struct drm_backend *b) - } - - wl_list_for_each(output, &b->compositor->output_list, base.link) -+ if(output->base.output_type == OUTPUT_DRM) - drm_output_init_egl(output, b); - - b->use_pixman = 0; -diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c -index 6031be5..97002e6 100644 ---- a/libweston/compositor-fbdev.c -+++ b/libweston/compositor-fbdev.c -@@ -526,7 +526,7 @@ fbdev_output_enable(struct weston_output *base) - struct fbdev_head *head; - int fb_fd; - struct wl_event_loop *loop; -- -+ output->base.output_type = OUTPUT_FBDEV; - head = fbdev_output_get_head(output); - - /* Create the frame buffer. */ -diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c -index 5a0e46c..20b78b2 100644 ---- a/libweston/compositor-headless.c -+++ b/libweston/compositor-headless.c -@@ -160,7 +160,7 @@ headless_output_enable(struct weston_output *base) - loop = wl_display_get_event_loop(b->compositor->wl_display); - output->finish_frame_timer = - wl_event_loop_add_timer(loop, finish_frame_handler, output); -- -+ output->base.output_type = OUTPUT_HEADLESS; - if (b->use_pixman) { - output->image_buf = malloc(output->base.current_mode->width * - output->base.current_mode->height * 4); -diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c -index 871a0a3..b3064dd 100644 ---- a/libweston/compositor-rdp.c -+++ b/libweston/compositor-rdp.c -@@ -554,7 +554,7 @@ rdp_output_enable(struct weston_output *base) - struct rdp_output *output = to_rdp_output(base); - struct rdp_backend *b = to_rdp_backend(base->compositor); - struct wl_event_loop *loop; -- -+ output->base.output_type = OUTPUT_RDP; - output->shadow_surface = pixman_image_create_bits(PIXMAN_x8r8g8b8, - output->base.current_mode->width, - output->base.current_mode->height, -diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c -index e1485ca..75140b2 100644 ---- a/libweston/compositor-wayland.c -+++ b/libweston/compositor-wayland.c -@@ -1221,7 +1221,7 @@ wayland_output_enable(struct weston_output *base) - struct wayland_backend *b = to_wayland_backend(base->compositor); - enum mode_status mode_status; - int ret = 0; -- -+ output->base.output_type = OUTPUT_WAYLAND; - weston_log("Creating %dx%d wayland output at (%d, %d)\n", - output->base.current_mode->width, - output->base.current_mode->height, -diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c -index 922e3c8..8c20626 100644 ---- a/libweston/compositor-x11.c -+++ b/libweston/compositor-x11.c -@@ -934,7 +934,7 @@ x11_output_enable(struct weston_output *base) - XCB_EVENT_MASK_STRUCTURE_NOTIFY, - 0 - }; -- -+ output->base.output_type = OUTPUT_X11; - if (!b->no_input) - values[0] |= - XCB_EVENT_MASK_KEY_PRESS | -diff --git a/libweston/compositor.h b/libweston/compositor.h -index a5223c2..040917b 100644 ---- a/libweston/compositor.h -+++ b/libweston/compositor.h -@@ -169,6 +169,17 @@ enum dpms_enum { - WESTON_DPMS_OFF - }; - -+/* bit compatible with drm definitions. */ -+enum output_type { -+ OUTPUT_DRM, -+ OUTPUT_FBDEV, -+ OUTPUT_HEADLESS, -+ OUTPUT_RDP, -+ OUTPUT_WAYLAND, -+ OUTPUT_X11, -+ OUTPUT_WALTHAM -+}; -+ - /** Represents a monitor - * - * This object represents a monitor (hardware backends like DRM) or a window -@@ -202,6 +213,7 @@ struct weston_head { - struct weston_output { - uint32_t id; - char *name; -+ enum output_type output_type; - - /** Matches the lifetime from the user perspective */ - struct wl_signal user_destroy_signal; --- -2.7.4 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend index 031ac328f..67442bd6b 100644 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend @@ -7,7 +7,4 @@ SRC_URI_append = "\ file://0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch \ file://0001-config-parser-Export-get_full_path-and-destroy.patch \ " -# Disabled until SPEC-2827 H3ULCB v3.0 + Kingfisher issue is debugged: -# file://0002-compositor-add-output-type-to-weston_output.patch - EXTRA_OECONF_append = " --enable-sys-uid" |