summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2016-09-20 17:47:38 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2016-09-21 08:10:51 -0300
commit86812657e125c94d6cda549538e5fc98f69aee8c (patch)
treebcef66c9c9f1a8e1e5233f45a6a0c1a5347ec0f8 /recipes-graphics/wayland
parentc663fed590b3dd5c0f43e0bbd1a457a61a488a0e (diff)
downloadmeta-freescale-86812657e125c94d6cda549538e5fc98f69aee8c.tar.gz
weston: Rebase patches for Weston 1.11
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics/wayland')
-rw-r--r--recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch166
-rw-r--r--recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch17
2 files changed, 116 insertions, 67 deletions
diff --git a/recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch b/recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch
index cb93728b..9a80d9ed 100644
--- a/recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch
+++ b/recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch
@@ -15,11 +15,11 @@ Signed-off-by: Prabhu <prabhu.sundararaj@freescale.com>
15 create mode 100644 src/gal2d-renderer.c 15 create mode 100644 src/gal2d-renderer.c
16 create mode 100644 src/gal2d-renderer.h 16 create mode 100644 src/gal2d-renderer.h
17 17
18Index: weston-1.10.0/Makefile.am 18Index: weston-1.11.0/Makefile.am
19=================================================================== 19===================================================================
20--- weston-1.10.0.orig/Makefile.am 2016-05-12 10:52:23.308495113 -0500 20--- weston-1.11.0.orig/Makefile.am 2016-05-19 16:36:04.000000000 -0500
21+++ weston-1.10.0/Makefile.am 2016-05-12 10:52:23.524496184 -0500 21+++ weston-1.11.0/Makefile.am 2016-09-20 15:28:46.634190725 -0500
22@@ -231,6 +231,18 @@ 22@@ -247,6 +247,18 @@
23 src/vertex-clipping.h \ 23 src/vertex-clipping.h \
24 shared/helpers.h 24 shared/helpers.h
25 endif 25 endif
@@ -38,29 +38,30 @@ Index: weston-1.10.0/Makefile.am
38 38
39 if ENABLE_X11_COMPOSITOR 39 if ENABLE_X11_COMPOSITOR
40 module_LTLIBRARIES += x11-backend.la 40 module_LTLIBRARIES += x11-backend.la
41Index: weston-1.10.0/src/compositor-fbdev.c 41Index: weston-1.11.0/src/compositor-fbdev.c
42=================================================================== 42===================================================================
43--- weston-1.10.0.orig/src/compositor-fbdev.c 2016-05-12 10:52:21.356485434 -0500 43--- weston-1.11.0.orig/src/compositor-fbdev.c 2016-05-19 16:36:04.000000000 -0500
44+++ weston-1.10.0/src/compositor-fbdev.c 2016-05-12 11:41:07.000000000 -0500 44+++ weston-1.11.0/src/compositor-fbdev.c 2016-09-20 17:05:27.000000000 -0500
45@@ -49,6 +49,7 @@ 45@@ -50,6 +50,7 @@
46 #include "libinput-seat.h" 46 #include "libinput-seat.h"
47 #include "gl-renderer.h" 47 #include "gl-renderer.h"
48 #include "presentation_timing-server-protocol.h" 48 #include "presentation-time-server-protocol.h"
49+#include "gal2d-renderer.h" 49+#include "gal2d-renderer.h"
50 50
51 struct fbdev_backend { 51 struct fbdev_backend {
52 struct weston_backend base; 52 struct weston_backend base;
53@@ -58,7 +59,9 @@ 53@@ -59,8 +60,10 @@
54 struct udev *udev; 54 struct udev *udev;
55 struct udev_input input; 55 struct udev_input input;
56 int use_pixman; 56 int use_pixman;
57+ int use_gal2d; 57+ int use_gal2d;
58 uint32_t output_transform;
58 struct wl_listener session_listener; 59 struct wl_listener session_listener;
59+ NativeDisplayType display; 60+ NativeDisplayType display;
60 }; 61 };
61 62
62 struct fbdev_screeninfo { 63 struct fbdev_screeninfo {
63@@ -91,15 +94,20 @@ 64@@ -93,9 +96,13 @@
64 /* pixman details. */ 65 /* pixman details. */
65 pixman_image_t *hw_surface; 66 pixman_image_t *hw_surface;
66 uint8_t depth; 67 uint8_t depth;
@@ -69,19 +70,12 @@ Index: weston-1.10.0/src/compositor-fbdev.c
69+ NativeWindowType window; 70+ NativeWindowType window;
70 }; 71 };
71 72
72 struct fbdev_parameters {
73 int tty;
74 char *device;
75 int use_gl;
76+ int use_gal2d;
77 };
78
79 struct gl_renderer_interface *gl_renderer; 73 struct gl_renderer_interface *gl_renderer;
80+struct gal2d_renderer_interface *gal2d_renderer; 74+struct gal2d_renderer_interface *gal2d_renderer;
81 75
82 static const char default_seat[] = "seat0"; 76 static const char default_seat[] = "seat0";
83 77
84@@ -447,6 +455,10 @@ 78@@ -443,6 +450,10 @@
85 strerror(errno)); 79 strerror(errno));
86 80
87 output->fb = NULL; 81 output->fb = NULL;
@@ -92,7 +86,7 @@ Index: weston-1.10.0/src/compositor-fbdev.c
92 } 86 }
93 87
94 static void fbdev_output_destroy(struct weston_output *base); 88 static void fbdev_output_destroy(struct weston_output *base);
95@@ -454,7 +466,7 @@ 89@@ -450,13 +461,13 @@
96 90
97 static int 91 static int
98 fbdev_output_create(struct fbdev_backend *backend, 92 fbdev_output_create(struct fbdev_backend *backend,
@@ -100,26 +94,24 @@ Index: weston-1.10.0/src/compositor-fbdev.c
100+ int x, int y, const char *device) 94+ int x, int y, const char *device)
101 { 95 {
102 struct fbdev_output *output; 96 struct fbdev_output *output;
103 struct weston_config_section *section; 97 int fb_fd;
104@@ -463,7 +475,7 @@ 98 struct wl_event_loop *loop;
105 uint32_t config_transform;
106 char *s;
107 99
108- weston_log("Creating fbdev output.\n"); 100- weston_log("Creating fbdev output.\n");
109+ weston_log("Creating fbdev output. %s x=%d y=%d\n", device, x, y); 101+ weston_log("Creating fbdev output. %s x=%d y=%d\n", device, x, y);
110 102
111 output = zalloc(sizeof *output); 103 output = zalloc(sizeof *output);
112 if (output == NULL) 104 if (output == NULL)
113@@ -516,7 +528,7 @@ 105@@ -500,7 +511,7 @@
114 free(s); 106 output->base.name = strdup("fbdev");
115 107
116 weston_output_init(&output->base, backend->compositor, 108 weston_output_init(&output->base, backend->compositor,
117- 0, 0, output->fb_info.width_mm, 109- 0, 0, output->fb_info.width_mm,
118+ x, y, output->fb_info.width_mm, 110+ x, y, output->fb_info.width_mm,
119 output->fb_info.height_mm, 111 output->fb_info.height_mm,
120 config_transform, 112 backend->output_transform,
121 1); 113 1);
122@@ -524,10 +536,39 @@ 114@@ -508,10 +519,39 @@
123 if (backend->use_pixman) { 115 if (backend->use_pixman) {
124 if (pixman_renderer_output_create(&output->base) < 0) 116 if (pixman_renderer_output_create(&output->base) < 0)
125 goto out_hw_surface; 117 goto out_hw_surface;
@@ -160,7 +152,7 @@ Index: weston-1.10.0/src/compositor-fbdev.c
160 gl_renderer->opaque_attribs, 152 gl_renderer->opaque_attribs,
161 NULL, 0) < 0) { 153 NULL, 0) < 0) {
162 weston_log("gl_renderer_output_create failed.\n"); 154 weston_log("gl_renderer_output_create failed.\n");
163@@ -573,6 +614,8 @@ 155@@ -558,6 +598,8 @@
164 if (backend->use_pixman) { 156 if (backend->use_pixman) {
165 if (base->renderer_state != NULL) 157 if (base->renderer_state != NULL)
166 pixman_renderer_output_destroy(base); 158 pixman_renderer_output_destroy(base);
@@ -169,16 +161,16 @@ Index: weston-1.10.0/src/compositor-fbdev.c
169 } else { 161 } else {
170 gl_renderer->output_destroy(base); 162 gl_renderer->output_destroy(base);
171 } 163 }
172@@ -636,7 +679,7 @@ 164@@ -622,7 +664,7 @@
173 * are re-initialised. */ 165 * are re-initialised. */
174 device = output->device; 166 device = strdup(output->device);
175 fbdev_output_destroy(base); 167 fbdev_output_destroy(&output->base);
176- fbdev_output_create(backend, device); 168- fbdev_output_create(backend, device);
177+ fbdev_output_create(backend, 0, 0, device); 169+ fbdev_output_create(backend, 0, 0, device);
170 free(device);
178 171
179 return 0; 172 return 0;
180 } 173@@ -777,7 +819,50 @@
181@@ -789,7 +832,50 @@
182 if (backend->use_pixman) { 174 if (backend->use_pixman) {
183 if (pixman_renderer_init(compositor) < 0) 175 if (pixman_renderer_init(compositor) < 0)
184 goto out_launcher; 176 goto out_launcher;
@@ -230,7 +222,7 @@ Index: weston-1.10.0/src/compositor-fbdev.c
230 gl_renderer = weston_load_module("gl-renderer.so", 222 gl_renderer = weston_load_module("gl-renderer.so",
231 "gl_renderer_interface"); 223 "gl_renderer_interface");
232 if (!gl_renderer) { 224 if (!gl_renderer) {
233@@ -797,17 +883,22 @@ 225@@ -785,17 +870,22 @@
234 goto out_launcher; 226 goto out_launcher;
235 } 227 }
236 228
@@ -257,32 +249,24 @@ Index: weston-1.10.0/src/compositor-fbdev.c
257 249
258 udev_input_init(&backend->input, compositor, backend->udev, seat_id); 250 udev_input_init(&backend->input, compositor, backend->udev, seat_id);
259 251
260@@ -838,13 +929,20 @@ 252@@ -822,7 +912,13 @@
261 struct fbdev_parameters param = { 253 * udev, rather than passing a device node in as a parameter. */
262 .tty = 0, /* default to current tty */ 254 config->tty = 0; /* default to current tty */
263 .device = "/dev/fb0", /* default frame buffer */ 255 config->device = "/dev/fb0"; /* default frame buffer */
264+#ifdef ENABLE_EGL 256+#ifdef ENABLE_EGL
265+ .use_gl = 1, 257+ config->use_gl = 1;
266+ .use_gal2d = 0, 258+ config->use_gal2d = 0;
267+#else 259+#else
268 .use_gl = 0, 260 config->use_gl = 0;
269+ .use_gal2d = 1, 261+ config->use_gal2d = 1;
270+#endif 262+#endif
271 }; 263 config->output_transform = WL_OUTPUT_TRANSFORM_NORMAL;
272 264 }
273 const struct weston_option fbdev_options[] = {
274 { WESTON_OPTION_INTEGER, "tty", 0, &param.tty },
275 { WESTON_OPTION_STRING, "device", 0, &param.device },
276- { WESTON_OPTION_BOOLEAN, "use-gl", 0, &param.use_gl },
277+ { WESTON_OPTION_INTEGER, "use-gl", 0, &param.use_gl },
278+ { WESTON_OPTION_INTEGER, "use-gal2d", 0, &param.use_gal2d },
279 };
280 265
281 parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv); 266Index: weston-1.11.0/src/gal2d-renderer.c
282Index: weston-1.10.0/src/gal2d-renderer.c
283=================================================================== 267===================================================================
284--- /dev/null 1970-01-01 00:00:00.000000000 +0000 268--- /dev/null 1970-01-01 00:00:00.000000000 +0000
285+++ weston-1.10.0/src/gal2d-renderer.c 2016-05-12 11:37:05.000000000 -0500 269+++ weston-1.11.0/src/gal2d-renderer.c 2016-09-20 16:58:24.000000000 -0500
286@@ -0,0 +1,1342 @@ 270@@ -0,0 +1,1342 @@
287+/* 271+/*
288+ * Copyright (c) 2015 Freescale Semiconductor, Inc. 272+ * Copyright (c) 2015 Freescale Semiconductor, Inc.
@@ -1626,10 +1610,10 @@ Index: weston-1.10.0/src/gal2d-renderer.c
1626+ .output_create = gal2d_renderer_output_create, 1610+ .output_create = gal2d_renderer_output_create,
1627+ .output_destroy = gal2d_renderer_output_destroy, 1611+ .output_destroy = gal2d_renderer_output_destroy,
1628+}; 1612+};
1629Index: weston-1.10.0/src/gal2d-renderer.h 1613Index: weston-1.11.0/src/gal2d-renderer.h
1630=================================================================== 1614===================================================================
1631--- /dev/null 1970-01-01 00:00:00.000000000 +0000 1615--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1632+++ weston-1.10.0/src/gal2d-renderer.h 2016-05-12 10:52:23.524496184 -0500 1616+++ weston-1.11.0/src/gal2d-renderer.h 2016-09-20 15:28:46.638190745 -0500
1633@@ -0,0 +1,50 @@ 1617@@ -0,0 +1,50 @@
1634+/* 1618+/*
1635+ * Copyright (c) 2015 Freescale Semiconductor, Inc. 1619+ * Copyright (c) 2015 Freescale Semiconductor, Inc.
@@ -1681,3 +1665,71 @@ Index: weston-1.10.0/src/gal2d-renderer.h
1681+}; 1665+};
1682+ 1666+
1683+#endif 1667+#endif
1668Index: weston-1.11.0/src/compositor-fbdev.h
1669===================================================================
1670--- weston-1.11.0.orig/src/compositor-fbdev.h 2016-05-19 16:36:04.000000000 -0500
1671+++ weston-1.11.0/src/compositor-fbdev.h 2016-09-20 17:03:37.000000000 -0500
1672@@ -40,6 +40,7 @@
1673 int tty;
1674 char *device;
1675 int use_gl;
1676+ int use_gal2d;
1677
1678 uint32_t output_transform;
1679 };
1680Index: weston-1.11.0/src/main.c
1681===================================================================
1682--- weston-1.11.0.orig/src/main.c 2016-05-19 16:36:04.000000000 -0500
1683+++ weston-1.11.0/src/main.c 2016-09-20 17:29:12.000000000 -0500
1684@@ -285,7 +285,13 @@
1685 "Options for fbdev-backend.so:\n\n"
1686 " --tty=TTY\t\tThe tty to use\n"
1687 " --device=DEVICE\tThe framebuffer device to use\n"
1688- " --use-gl\t\tUse the GL renderer\n\n");
1689+#if defined ENABLE_EGL
1690+ " --no-use-gl\t\tDo not use the GL renderer\n"
1691+ " --use-gal2d\t\tUse the GAL2D renderer\n\n");
1692+#else
1693+ " --use-gl\t\tUse the GL renderer\n"
1694+ " --no-use-gal2d\t\tDo not use the GAL2D renderer\n\n");
1695+#endif
1696 #endif
1697
1698 #if defined(BUILD_HEADLESS_COMPOSITOR)
1699@@ -864,18 +870,35 @@
1700 struct weston_config_section *section;
1701 char *s = NULL;
1702 int ret = 0;
1703+#ifdef ENABLE_EGL
1704+ /* GL rendering is default, so user options are --no-use-gl and --use-gal2d */
1705+ int no_use_gl = 0;
1706+#else
1707+ /* GAL2D rendering is default, so user options are --use-gl and --no-use-gal2d */
1708+ int no_use_gal2d = 0;
1709+#endif
1710
1711 const struct weston_option fbdev_options[] = {
1712 { WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
1713 { WESTON_OPTION_STRING, "device", 0, &config.device },
1714+#ifdef ENABLE_EGL
1715+ { WESTON_OPTION_BOOLEAN, "no-use-gl", 0, &no_use_gl },
1716+ { WESTON_OPTION_BOOLEAN, "use-gal2d", 0, &config.use_gal2d },
1717+#else
1718 { WESTON_OPTION_BOOLEAN, "use-gl", 0, &config.use_gl },
1719+ { WESTON_OPTION_BOOLEAN, "no-use-gal2d", 0, &no_use_gal2d },
1720+#endif
1721 };
1722
1723 parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv);
1724
1725 if (!config.device)
1726 config.device = strdup("/dev/fb0");
1727-
1728+#ifdef ENABLE_EGL
1729+ config.use_gl = !no_use_gl;
1730+#else
1731+ config.use_gal2d = !no_use_gal2d;
1732+#endif
1733 section = weston_config_get_section(wc, "output", "name", "fbdev");
1734 weston_config_section_get_string(section, "transform", &s, "normal");
1735 if (weston_parse_transform(s, &config.output_transform) < 0)
diff --git a/recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch b/recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch
index b9dfbeab..019b7105 100644
--- a/recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch
+++ b/recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch
@@ -12,20 +12,17 @@ Signed-off-by: Yong Gan <yong.gan@freescale.com>
12 src/compositor-fbdev.c | 3 ++- 12 src/compositor-fbdev.c | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-) 13 1 file changed, 2 insertions(+), 1 deletion(-)
14 14
15diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c 15Index: weston-1.11.0/src/compositor-fbdev.c
16index c6f732e..ed25576 100644 16===================================================================
17--- a/src/compositor-fbdev.c 17--- weston-1.11.0.orig/src/compositor-fbdev.c 2016-08-31 20:23:38.109228731 -0500
18+++ b/src/compositor-fbdev.c 18+++ weston-1.11.0/src/compositor-fbdev.c 2016-08-31 20:30:25.000000000 -0500
19@@ -900,7 +900,8 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv 19@@ -811,7 +811,8 @@
20 backend->base.restore = fbdev_restore; 20 backend->base.restore = fbdev_restore;
21 21
22 backend->prev_state = WESTON_COMPOSITOR_ACTIVE; 22 backend->prev_state = WESTON_COMPOSITOR_ACTIVE;
23- backend->use_pixman = !param->use_gl; 23- backend->use_pixman = !param->use_gl;
24+ backend->use_pixman = !(param->use_gl || param->use_gal2d); 24+ backend->use_pixman = !(param->use_gl || param->use_gal2d);
25+ backend->use_gal2d = param->use_gal2d; 25+ backend->use_gal2d = param->use_gal2d;
26 backend->output_transform = param->output_transform;
26 27
27 for (key = KEY_F1; key < KEY_F9; key++) 28 weston_setup_vt_switch_bindings(compositor);
28 weston_compositor_add_key_binding(compositor, key,
29--
301.9.1
31