diff options
author | 2019-04-26 15:29:58 +0000 | |
---|---|---|
committer | 2019-04-26 15:29:58 +0000 | |
commit | acf9f5aaffdbbb4a4b15d4fcbda14668975e695c (patch) | |
tree | c363cb370bce574e2f65ad0c2bb3861650e42d16 /meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0 | |
parent | 752c944f73e693333e902530b747d6d7259caf37 (diff) | |
parent | 54e9bf9eda7d668df5d71dcc5974c22db5e3eecb (diff) |
Merge "Fix imx6qdlsabreauto machine configuration"
Diffstat (limited to 'meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0')
4 files changed, 0 insertions, 402 deletions
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0001-libweston-Restore-EGL-support-for-the-fbdev-backend.patch b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0001-libweston-Restore-EGL-support-for-the-fbdev-backend.patch deleted file mode 100644 index 77bf2c5cb..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0001-libweston-Restore-EGL-support-for-the-fbdev-backend.patch +++ /dev/null @@ -1,250 +0,0 @@ -From c43b64cad0fdc55594434a68faa25447b50ca7c5 Mon Sep 17 00:00:00 2001 -From: Georgi Vlaev <georgi.vlaev@konsulko.com> -Date: Wed, 27 Sep 2017 14:00:50 +0300 -Subject: [PATCH 1/5] libweston: Restore EGL support for the fbdev backend - -In Weston 2.0, the EGL support was dropped from the fbdev-backend, -as that was not the correct way to initialize the EGL in first -place. However, the vendor support patches in Weston 1.11 still -require that functionality. Teporary restore the EGL support in -the fbdev-backend, until a separate vendor backend is available, -or switch to using etnaviv. - -Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com> ---- - compositor/main.c | 2 + - libweston/compositor-fbdev.c | 99 +++++++++++++++++++++++++++++++++++++------- - libweston/compositor-fbdev.h | 1 + - 3 files changed, 87 insertions(+), 15 deletions(-) - -diff --git a/compositor/main.c b/compositor/main.c -index 72c3cd10..6c45a018 100644 ---- a/compositor/main.c -+++ b/compositor/main.c -@@ -574,6 +574,7 @@ usage(int error_code) - "Options for fbdev-backend.so:\n\n" - " --tty=TTY\t\tThe tty to use\n" - " --device=DEVICE\tThe framebuffer device to use\n" -+ " --use-gl\t\tUse the GL renderer\n" - "\n"); - #endif - -@@ -1444,6 +1445,7 @@ load_fbdev_backend(struct weston_compositor *c, - const struct weston_option fbdev_options[] = { - { WESTON_OPTION_INTEGER, "tty", 0, &config.tty }, - { WESTON_OPTION_STRING, "device", 0, &config.device }, -+ { WESTON_OPTION_BOOLEAN, "use-gl", 0, &config.use_gl }, - }; - - parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv); -diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c -index 44f0cf51..4ca53b67 100644 ---- a/libweston/compositor-fbdev.c -+++ b/libweston/compositor-fbdev.c -@@ -49,6 +49,7 @@ - #include "launcher-util.h" - #include "pixman-renderer.h" - #include "libinput-seat.h" -+#include "gl-renderer.h" - #include "presentation-time-server-protocol.h" - - struct fbdev_backend { -@@ -58,6 +59,7 @@ struct fbdev_backend { - - struct udev *udev; - struct udev_input input; -+ int use_pixman; - uint32_t output_transform; - struct wl_listener session_listener; - }; -@@ -94,6 +96,8 @@ struct fbdev_output { - uint8_t depth; - }; - -+struct gl_renderer_interface *gl_renderer; -+ - static const char default_seat[] = "seat0"; - - static inline struct fbdev_output * -@@ -117,8 +121,8 @@ fbdev_output_start_repaint_loop(struct weston_output *output) - weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID); - } - --static int --fbdev_output_repaint(struct weston_output *base, pixman_region32_t *damage) -+static void -+fbdev_output_repaint_pixman(struct weston_output *base, pixman_region32_t *damage) - { - struct fbdev_output *output = to_fbdev_output(base); - struct weston_compositor *ec = output->base.compositor; -@@ -140,6 +144,26 @@ fbdev_output_repaint(struct weston_output *base, pixman_region32_t *damage) - * refresh rate is given in mHz and the interval in ms. */ - wl_event_source_timer_update(output->finish_frame_timer, - 1000000 / output->mode.refresh); -+} -+ -+static int -+fbdev_output_repaint(struct weston_output *base, pixman_region32_t *damage) -+{ -+ struct fbdev_output *output = to_fbdev_output(base); -+ struct fbdev_backend *backend = output->backend; -+ struct weston_compositor *ec = backend->compositor; -+ -+ if (backend->use_pixman) { -+ fbdev_output_repaint_pixman(base,damage); -+ } else { -+ ec->renderer->repaint_output(base, damage); -+ /* Update the damage region. */ -+ pixman_region32_subtract(&ec->primary_plane.damage, -+ &ec->primary_plane.damage, damage); -+ -+ wl_event_source_timer_update(output->finish_frame_timer, -+ 1000000 / output->mode.refresh); -+ } - - return 0; - } -@@ -440,16 +464,30 @@ fbdev_output_enable(struct weston_output *base) - return -1; - } - -- if (fbdev_frame_buffer_map(output, fb_fd) < 0) { -- weston_log("Mapping frame buffer failed.\n"); -- return -1; -- } -+ if (backend->use_pixman) { -+ if (fbdev_frame_buffer_map(output, fb_fd) < 0) { -+ weston_log("Mapping frame buffer failed.\n"); -+ return -1; -+ } -+ } else -+ close(fb_fd); - - output->base.start_repaint_loop = fbdev_output_start_repaint_loop; - output->base.repaint = fbdev_output_repaint; - -- if (pixman_renderer_output_create(&output->base) < 0) -- goto out_hw_surface; -+ if (backend->use_pixman) { -+ if (pixman_renderer_output_create(&output->base) < 0) -+ goto out_hw_surface; -+ } else { -+ setenv("HYBRIS_EGLPLATFORM", "wayland", 1); -+ if (gl_renderer->output_window_create(&output->base, -+ (EGLNativeWindowType)NULL, NULL, -+ gl_renderer->opaque_attribs, -+ NULL, 0) < 0) { -+ weston_log("gl_renderer_output_create failed.\n"); -+ goto out_hw_surface; -+ } -+ } - - loop = wl_display_get_event_loop(backend->compositor->wl_display); - output->finish_frame_timer = -@@ -534,14 +572,19 @@ static void - fbdev_output_destroy(struct weston_output *base) - { - struct fbdev_output *output = to_fbdev_output(base); -+ struct fbdev_backend *backend = output->backend; - - weston_log("Destroying fbdev output.\n"); - - /* Close the frame buffer. */ - fbdev_output_disable(base); - -- if (base->renderer_state != NULL) -- pixman_renderer_output_destroy(base); -+ if (backend->use_pixman) { -+ if (base->renderer_state != NULL) -+ pixman_renderer_output_destroy(base); -+ } else { -+ gl_renderer->output_destroy(base); -+ } - - /* Remove the output. */ - weston_output_destroy(&output->base); -@@ -610,9 +653,11 @@ fbdev_output_reenable(struct fbdev_backend *backend, - } - - /* Map the device if it has the same details as before. */ -- if (fbdev_frame_buffer_map(output, fb_fd) < 0) { -- weston_log("Mapping frame buffer failed.\n"); -- goto err; -+ if (backend->use_pixman) { -+ if (fbdev_frame_buffer_map(output, fb_fd) < 0) { -+ weston_log("Mapping frame buffer failed.\n"); -+ goto err; -+ } - } - - return 0; -@@ -628,9 +673,13 @@ static void - fbdev_output_disable(struct weston_output *base) - { - struct fbdev_output *output = to_fbdev_output(base); -+ struct fbdev_backend *backend = output->backend; - - weston_log("Disabling fbdev output.\n"); - -+ if (!backend->use_pixman) -+ return; -+ - if (output->hw_surface != NULL) { - pixman_image_unref(output->hw_surface); - output->hw_surface = NULL; -@@ -744,11 +793,30 @@ fbdev_backend_create(struct weston_compositor *compositor, - backend->base.restore = fbdev_restore; - - backend->prev_state = WESTON_COMPOSITOR_ACTIVE; -+ backend->use_pixman = !param->use_gl; - - weston_setup_vt_switch_bindings(compositor); - -- if (pixman_renderer_init(compositor) < 0) -- goto out_launcher; -+ if (backend->use_pixman) { -+ if (pixman_renderer_init(compositor) < 0) -+ goto out_launcher; -+ } else { -+ gl_renderer = weston_load_module("gl-renderer.so", -+ "gl_renderer_interface"); -+ if (!gl_renderer) { -+ weston_log("could not load gl renderer\n"); -+ goto out_launcher; -+ } -+ -+ if (gl_renderer->display_create(compositor, NO_EGL_PLATFORM, -+ EGL_DEFAULT_DISPLAY, -+ NULL, -+ gl_renderer->opaque_attribs, -+ NULL, 0) < 0) { -+ weston_log("gl_renderer_create failed.\n"); -+ goto out_launcher; -+ } -+ } - - if (fbdev_output_create(backend, param->device) < 0) - goto out_launcher; -@@ -779,6 +847,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config) - * udev, rather than passing a device node in as a parameter. */ - config->tty = 0; /* default to current tty */ - config->device = "/dev/fb0"; /* default frame buffer */ -+ config->use_gl = 0; - } - - WL_EXPORT int -diff --git a/libweston/compositor-fbdev.h b/libweston/compositor-fbdev.h -index 8b7d900e..806712f9 100644 ---- a/libweston/compositor-fbdev.h -+++ b/libweston/compositor-fbdev.h -@@ -43,6 +43,7 @@ struct weston_fbdev_backend_config { - - int tty; - char *device; -+ int use_gl; - - /** Callback used to configure input devices. - * --- -2.11.0 - diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0002-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-2.0.patch b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0002-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-2.0.patch deleted file mode 100644 index 2eca746a9..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0002-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-2.0.patch +++ /dev/null @@ -1,87 +0,0 @@ -From ca6720b1c19f1581112e6ee371dff6d06aeae569 Mon Sep 17 00:00:00 2001 -From: Meng Mingming <mingming.meng@nxp.com> -Date: Mon, 9 Jan 2017 15:04:27 +0800 -Subject: [PATCH 2/5] MGS-2352 [#ccc] Add GPU-VIV support for weston 2.0 - -Add GPU-VIV support for weston 2.0 - -Upstream Status: Inappropriate [i.MX specific] - -Date: Jan 09, 2017 - -* Weston 2.0 -This requires re-enabling the EGL initialization support -in the fbdev-backend. - -Signed-off-by: Meng Mingming <mingming.meng@nxp.com> -Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com> ---- - libweston/compositor-fbdev.c | 22 ++++++++++++++++++++-- - 1 file changed, 20 insertions(+), 2 deletions(-) - -diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c -index 4ca53b67..f87fccac 100644 ---- a/libweston/compositor-fbdev.c -+++ b/libweston/compositor-fbdev.c -@@ -62,6 +62,7 @@ struct fbdev_backend { - int use_pixman; - uint32_t output_transform; - struct wl_listener session_listener; -+ NativeDisplayType display; - }; - - struct fbdev_screeninfo { -@@ -94,6 +95,9 @@ struct fbdev_output { - /* pixman details. */ - pixman_image_t *hw_surface; - uint8_t depth; -+ -+ NativeDisplayType display; -+ NativeWindowType window; - }; - - struct gl_renderer_interface *gl_renderer; -@@ -444,6 +448,10 @@ fbdev_frame_buffer_destroy(struct fbdev_output *output) - strerror(errno)); - - output->fb = NULL; -+ if(output->window) -+ fbDestroyWindow(output->window); -+ if(output->display) -+ fbDestroyDisplay(output->display); - } - - static void fbdev_output_destroy(struct weston_output *base); -@@ -480,8 +488,13 @@ fbdev_output_enable(struct weston_output *base) - goto out_hw_surface; - } else { - setenv("HYBRIS_EGLPLATFORM", "wayland", 1); -+ output->window = fbCreateWindow(backend->display, -1, -1, 0, 0); -+ if (output->window == NULL) { -+ fprintf(stderr, "failed to create window\n"); -+ return 0; -+ } - if (gl_renderer->output_window_create(&output->base, -- (EGLNativeWindowType)NULL, NULL, -+ (EGLNativeWindowType)output->window, NULL, - gl_renderer->opaque_attribs, - NULL, 0) < 0) { - weston_log("gl_renderer_output_create failed.\n"); -@@ -808,8 +821,13 @@ fbdev_backend_create(struct weston_compositor *compositor, - goto out_launcher; - } - -+ backend->display = fbGetDisplay(backend->compositor->wl_display); -+ if (backend->display == NULL) { -+ weston_log("fbGetDisplay failed.\n"); -+ goto out_launcher; -+ } - if (gl_renderer->display_create(compositor, NO_EGL_PLATFORM, -- EGL_DEFAULT_DISPLAY, -+ backend->display, - NULL, - gl_renderer->opaque_attribs, - NULL, 0) < 0) { --- -2.11.0 - diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0006-Link-compositor-to-egl.patch b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0006-Link-compositor-to-egl.patch deleted file mode 100644 index 3cad74fd4..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/0006-Link-compositor-to-egl.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: weston-1.11.1/configure.ac -=================================================================== ---- weston-1.11.1.orig/configure.ac 2016-11-08 17:26:14.266564760 -0600 -+++ weston-1.11.1/configure.ac 2016-11-09 19:38:58.000000000 -0600 -@@ -93,6 +93,7 @@ - PKG_CHECK_MODULES(EGL, [egl glesv2]) - PKG_CHECK_MODULES([EGL_TESTS], [egl glesv2 wayland-client wayland-egl]) - PKG_CHECK_MODULES([GL_RENDERER], [libdrm]) -+ COMPOSITOR_MODULES="$COMPOSITOR_MODULES egl" - fi - - AC_ARG_ENABLE(xkbcommon, diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/fix-ivi-layout-for-IMX6-fbdev.patch b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/fix-ivi-layout-for-IMX6-fbdev.patch deleted file mode 100644 index a0ef210e9..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-2.0.0/fix-ivi-layout-for-IMX6-fbdev.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 1b6dc7e5815d3aa02fd1d01b1334c03473e5cf72 Mon Sep 17 00:00:00 2001 -From: Mihail Grigorov <michael.grigorov@konsulko.com> -Date: Wed, 14 Feb 2018 17:12:42 +0200 -Subject: [PATCH] ivi-shell: event_mask must not be cleared after emit - -Signed-off-by: Mihail Grigorov <michael.grigorov@konsulko.com> ---- - ivi-shell/ivi-layout.c | 18 ++---------------- - 1 file changed, 2 insertions(+), 16 deletions(-) - -diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c -index 64e4ead8..7d13fc88 100644 ---- a/ivi-shell/ivi-layout.c -+++ b/ivi-shell/ivi-layout.c -@@ -917,20 +917,6 @@ commit_transition(struct ivi_layout* layout) - } - - static void --send_surface_prop(struct ivi_layout_surface *ivisurf) --{ -- wl_signal_emit(&ivisurf->property_changed, ivisurf); -- ivisurf->pending.prop.event_mask = 0; --} -- --static void --send_layer_prop(struct ivi_layout_layer *ivilayer) --{ -- wl_signal_emit(&ivilayer->property_changed, ivilayer); -- ivilayer->pending.prop.event_mask = 0; --} -- --static void - send_prop(struct ivi_layout *layout) - { - struct ivi_layout_layer *ivilayer = NULL; -@@ -938,12 +924,12 @@ send_prop(struct ivi_layout *layout) - - wl_list_for_each_reverse(ivilayer, &layout->layer_list, link) { - if (ivilayer->prop.event_mask) -- send_layer_prop(ivilayer); -+ wl_signal_emit(&ivilayer->property_changed, ivilayer); - } - - wl_list_for_each_reverse(ivisurf, &layout->surface_list, link) { - if (ivisurf->prop.event_mask) -- send_surface_prop(ivisurf); -+ wl_signal_emit(&ivisurf->property_changed, ivisurf); - } - } - --- -2.11.0 - |