diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2016-05-12 11:45:50 -0500 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-05-23 17:00:54 -0300 |
commit | ef206c2ae8ebfd7d02d85a638ad2ae9f44e436a3 (patch) | |
tree | b9c1f812787df185f486dd8b65b3b206a9726caf | |
parent | be30177c9fa6a349e7b69d827e36af4dab16ee0d (diff) | |
download | meta-fsl-arm-ef206c2ae8ebfd7d02d85a638ad2ae9f44e436a3.tar.gz |
weston: Rebase Vivante patch for Yocto 2.2
Change-Id: Ideb91234d9aba465968f278955e74c13248cc1c7
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r-- | recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch | 92 |
1 files changed, 40 insertions, 52 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 9d35356..cb93728 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 | ||
18 | diff --git a/Makefile.am b/Makefile.am | 18 | Index: weston-1.10.0/Makefile.am |
19 | index 62719c9..86d3dfa 100644 | 19 | =================================================================== |
20 | --- a/Makefile.am | 20 | --- weston-1.10.0.orig/Makefile.am 2016-05-12 10:52:23.308495113 -0500 |
21 | +++ b/Makefile.am | 21 | +++ weston-1.10.0/Makefile.am 2016-05-12 10:52:23.524496184 -0500 |
22 | @@ -214,6 +214,18 @@ gl_renderer_la_SOURCES = \ | 22 | @@ -231,6 +231,18 @@ |
23 | src/vertex-clipping.h \ | 23 | src/vertex-clipping.h \ |
24 | shared/helpers.h | 24 | shared/helpers.h |
25 | endif | 25 | endif |
@@ -38,10 +38,10 @@ index 62719c9..86d3dfa 100644 | |||
38 | 38 | ||
39 | if ENABLE_X11_COMPOSITOR | 39 | if ENABLE_X11_COMPOSITOR |
40 | module_LTLIBRARIES += x11-backend.la | 40 | module_LTLIBRARIES += x11-backend.la |
41 | diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c | 41 | Index: weston-1.10.0/src/compositor-fbdev.c |
42 | index 81281d0..c6f732e 100644 | 42 | =================================================================== |
43 | --- a/src/compositor-fbdev.c | 43 | --- weston-1.10.0.orig/src/compositor-fbdev.c 2016-05-12 10:52:21.356485434 -0500 |
44 | +++ b/src/compositor-fbdev.c | 44 | +++ weston-1.10.0/src/compositor-fbdev.c 2016-05-12 11:41:07.000000000 -0500 |
45 | @@ -49,6 +49,7 @@ | 45 | @@ -49,6 +49,7 @@ |
46 | #include "libinput-seat.h" | 46 | #include "libinput-seat.h" |
47 | #include "gl-renderer.h" | 47 | #include "gl-renderer.h" |
@@ -50,7 +50,7 @@ index 81281d0..c6f732e 100644 | |||
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 @@ struct fbdev_backend { | 53 | @@ -58,7 +59,9 @@ |
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; |
@@ -60,9 +60,9 @@ index 81281d0..c6f732e 100644 | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct fbdev_screeninfo { | 62 | struct fbdev_screeninfo { |
63 | @@ -93,15 +96,20 @@ struct fbdev_output { | 63 | @@ -91,15 +94,20 @@ |
64 | pixman_image_t *shadow_surface; | 64 | /* pixman details. */ |
65 | void *shadow_buf; | 65 | pixman_image_t *hw_surface; |
66 | uint8_t depth; | 66 | uint8_t depth; |
67 | + | 67 | + |
68 | + NativeDisplayType display; | 68 | + NativeDisplayType display; |
@@ -81,7 +81,7 @@ index 81281d0..c6f732e 100644 | |||
81 | 81 | ||
82 | static const char default_seat[] = "seat0"; | 82 | static const char default_seat[] = "seat0"; |
83 | 83 | ||
84 | @@ -476,6 +484,10 @@ fbdev_frame_buffer_destroy(struct fbdev_output *output) | 84 | @@ -447,6 +455,10 @@ |
85 | strerror(errno)); | 85 | strerror(errno)); |
86 | 86 | ||
87 | output->fb = NULL; | 87 | output->fb = NULL; |
@@ -92,7 +92,7 @@ index 81281d0..c6f732e 100644 | |||
92 | } | 92 | } |
93 | 93 | ||
94 | static void fbdev_output_destroy(struct weston_output *base); | 94 | static void fbdev_output_destroy(struct weston_output *base); |
95 | @@ -483,7 +495,7 @@ static void fbdev_output_disable(struct weston_output *base); | 95 | @@ -454,7 +466,7 @@ |
96 | 96 | ||
97 | static int | 97 | static int |
98 | fbdev_output_create(struct fbdev_backend *backend, | 98 | fbdev_output_create(struct fbdev_backend *backend, |
@@ -101,7 +101,7 @@ index 81281d0..c6f732e 100644 | |||
101 | { | 101 | { |
102 | struct fbdev_output *output; | 102 | struct fbdev_output *output; |
103 | struct weston_config_section *section; | 103 | struct weston_config_section *section; |
104 | @@ -494,7 +506,7 @@ fbdev_output_create(struct fbdev_backend *backend, | 104 | @@ -463,7 +475,7 @@ |
105 | uint32_t config_transform; | 105 | uint32_t config_transform; |
106 | char *s; | 106 | char *s; |
107 | 107 | ||
@@ -110,7 +110,7 @@ index 81281d0..c6f732e 100644 | |||
110 | 110 | ||
111 | output = zalloc(sizeof *output); | 111 | output = zalloc(sizeof *output); |
112 | if (output == NULL) | 112 | if (output == NULL) |
113 | @@ -547,7 +559,7 @@ fbdev_output_create(struct fbdev_backend *backend, | 113 | @@ -516,7 +528,7 @@ |
114 | free(s); | 114 | free(s); |
115 | 115 | ||
116 | weston_output_init(&output->base, backend->compositor, | 116 | weston_output_init(&output->base, backend->compositor, |
@@ -119,13 +119,11 @@ index 81281d0..c6f732e 100644 | |||
119 | output->fb_info.height_mm, | 119 | output->fb_info.height_mm, |
120 | config_transform, | 120 | config_transform, |
121 | 1); | 121 | 1); |
122 | @@ -570,10 +582,41 @@ fbdev_output_create(struct fbdev_backend *backend, | 122 | @@ -524,10 +536,39 @@ |
123 | if (backend->use_pixman) { | 123 | if (backend->use_pixman) { |
124 | if (pixman_renderer_output_create(&output->base) < 0) | 124 | if (pixman_renderer_output_create(&output->base) < 0) |
125 | goto out_shadow_surface; | 125 | goto out_hw_surface; |
126 | - } else { | 126 | + } else if(backend->use_gal2d) { |
127 | + } | ||
128 | + else if(backend->use_gal2d) { | ||
129 | + | 127 | + |
130 | + char* fbenv = getenv("FB_FRAMEBUFFER_0"); | 128 | + char* fbenv = getenv("FB_FRAMEBUFFER_0"); |
131 | + setenv("FB_FRAMEBUFFER_0", device, 1); | 129 | + setenv("FB_FRAMEBUFFER_0", device, 1); |
@@ -146,11 +144,10 @@ index 81281d0..c6f732e 100644 | |||
146 | + output->display, | 144 | + output->display, |
147 | + (NativeWindowType)output->window) < 0) { | 145 | + (NativeWindowType)output->window) < 0) { |
148 | + weston_log("gal_renderer_output_create failed.\n"); | 146 | + weston_log("gal_renderer_output_create failed.\n"); |
149 | + goto out_shadow_surface; | 147 | + goto out_hw_surface; |
150 | + } | 148 | + } |
151 | + | 149 | + |
152 | + } | 150 | } else { |
153 | + else { | ||
154 | setenv("HYBRIS_EGLPLATFORM", "wayland", 1); | 151 | setenv("HYBRIS_EGLPLATFORM", "wayland", 1); |
155 | + output->window = fbCreateWindow(backend->display, -1, -1, 0, 0); | 152 | + output->window = fbCreateWindow(backend->display, -1, -1, 0, 0); |
156 | + if (output->window == NULL) { | 153 | + if (output->window == NULL) { |
@@ -163,20 +160,16 @@ index 81281d0..c6f732e 100644 | |||
163 | gl_renderer->opaque_attribs, | 160 | gl_renderer->opaque_attribs, |
164 | NULL, 0) < 0) { | 161 | NULL, 0) < 0) { |
165 | weston_log("gl_renderer_output_create failed.\n"); | 162 | weston_log("gl_renderer_output_create failed.\n"); |
166 | @@ -634,7 +677,11 @@ fbdev_output_destroy(struct weston_output *base) | 163 | @@ -573,6 +614,8 @@ |
167 | free(output->shadow_buf); | 164 | if (backend->use_pixman) { |
168 | output->shadow_buf = NULL; | 165 | if (base->renderer_state != NULL) |
169 | } | 166 | pixman_renderer_output_destroy(base); |
170 | - } else { | 167 | + } else if (backend->use_gal2d) { |
171 | + } | ||
172 | + else if (backend->use_gal2d) { | ||
173 | + gal2d_renderer->output_destroy(base); | 168 | + gal2d_renderer->output_destroy(base); |
174 | + } | 169 | } else { |
175 | + else { | ||
176 | gl_renderer->output_destroy(base); | 170 | gl_renderer->output_destroy(base); |
177 | } | 171 | } |
178 | 172 | @@ -636,7 +679,7 @@ | |
179 | @@ -697,7 +744,7 @@ fbdev_output_reenable(struct fbdev_backend *backend, | ||
180 | * are re-initialised. */ | 173 | * are re-initialised. */ |
181 | device = output->device; | 174 | device = output->device; |
182 | fbdev_output_destroy(base); | 175 | fbdev_output_destroy(base); |
@@ -185,7 +178,7 @@ index 81281d0..c6f732e 100644 | |||
185 | 178 | ||
186 | return 0; | 179 | return 0; |
187 | } | 180 | } |
188 | @@ -863,7 +910,50 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv | 181 | @@ -789,7 +832,50 @@ |
189 | if (backend->use_pixman) { | 182 | if (backend->use_pixman) { |
190 | if (pixman_renderer_init(compositor) < 0) | 183 | if (pixman_renderer_init(compositor) < 0) |
191 | goto out_launcher; | 184 | goto out_launcher; |
@@ -237,7 +230,7 @@ index 81281d0..c6f732e 100644 | |||
237 | gl_renderer = weston_load_module("gl-renderer.so", | 230 | gl_renderer = weston_load_module("gl-renderer.so", |
238 | "gl_renderer_interface"); | 231 | "gl_renderer_interface"); |
239 | if (!gl_renderer) { | 232 | if (!gl_renderer) { |
240 | @@ -871,17 +961,22 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv | 233 | @@ -797,17 +883,22 @@ |
241 | goto out_launcher; | 234 | goto out_launcher; |
242 | } | 235 | } |
243 | 236 | ||
@@ -264,7 +257,7 @@ index 81281d0..c6f732e 100644 | |||
264 | 257 | ||
265 | udev_input_init(&backend->input, compositor, backend->udev, seat_id); | 258 | udev_input_init(&backend->input, compositor, backend->udev, seat_id); |
266 | 259 | ||
267 | @@ -911,13 +1006,20 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[], | 260 | @@ -838,13 +929,20 @@ |
268 | struct fbdev_parameters param = { | 261 | struct fbdev_parameters param = { |
269 | .tty = 0, /* default to current tty */ | 262 | .tty = 0, /* default to current tty */ |
270 | .device = "/dev/fb0", /* default frame buffer */ | 263 | .device = "/dev/fb0", /* default frame buffer */ |
@@ -286,11 +279,10 @@ index 81281d0..c6f732e 100644 | |||
286 | }; | 279 | }; |
287 | 280 | ||
288 | parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv); | 281 | parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv); |
289 | diff --git a/src/gal2d-renderer.c b/src/gal2d-renderer.c | 282 | Index: weston-1.10.0/src/gal2d-renderer.c |
290 | new file mode 100644 | 283 | =================================================================== |
291 | index 0000000..c68f02c | 284 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
292 | --- /dev/null | 285 | +++ weston-1.10.0/src/gal2d-renderer.c 2016-05-12 11:37:05.000000000 -0500 |
293 | +++ b/src/gal2d-renderer.c | ||
294 | @@ -0,0 +1,1342 @@ | 286 | @@ -0,0 +1,1342 @@ |
295 | +/* | 287 | +/* |
296 | + * Copyright (c) 2015 Freescale Semiconductor, Inc. | 288 | + * Copyright (c) 2015 Freescale Semiconductor, Inc. |
@@ -1634,11 +1626,10 @@ index 0000000..c68f02c | |||
1634 | + .output_create = gal2d_renderer_output_create, | 1626 | + .output_create = gal2d_renderer_output_create, |
1635 | + .output_destroy = gal2d_renderer_output_destroy, | 1627 | + .output_destroy = gal2d_renderer_output_destroy, |
1636 | +}; | 1628 | +}; |
1637 | diff --git a/src/gal2d-renderer.h b/src/gal2d-renderer.h | 1629 | Index: weston-1.10.0/src/gal2d-renderer.h |
1638 | new file mode 100644 | 1630 | =================================================================== |
1639 | index 0000000..279358d | 1631 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
1640 | --- /dev/null | 1632 | +++ weston-1.10.0/src/gal2d-renderer.h 2016-05-12 10:52:23.524496184 -0500 |
1641 | +++ b/src/gal2d-renderer.h | ||
1642 | @@ -0,0 +1,50 @@ | 1633 | @@ -0,0 +1,50 @@ |
1643 | +/* | 1634 | +/* |
1644 | + * Copyright (c) 2015 Freescale Semiconductor, Inc. | 1635 | + * Copyright (c) 2015 Freescale Semiconductor, Inc. |
@@ -1690,6 +1681,3 @@ index 0000000..279358d | |||
1690 | +}; | 1681 | +}; |
1691 | + | 1682 | + |
1692 | +#endif | 1683 | +#endif |
1693 | -- | ||
1694 | 2.5.1 | ||
1695 | |||