diff options
4 files changed, 223 insertions, 248 deletions
diff --git a/recipes-bsp/common/firmware.inc b/recipes-bsp/common/firmware.inc index 52aa408..d5e60cb 100644 --- a/recipes-bsp/common/firmware.inc +++ b/recipes-bsp/common/firmware.inc | |||
@@ -1,9 +1,11 @@ | |||
1 | RPIFW_DATE ?= "20180209" | 1 | RPIFW_DATE ?= "20180226" |
2 | RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/b1a7f4aea6cbd380319c2849ecc5988f9a4dba70.tar.gz" | 2 | SRCREV ?= "469fc794fd3e45dbf30e14b46cb0d6283e399cba" |
3 | RPIFW_S ?= "${WORKDIR}/firmware-b1a7f4aea6cbd380319c2849ecc5988f9a4dba70" | 3 | RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" |
4 | RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}" | ||
4 | 5 | ||
5 | SRC_URI = "${RPIFW_SRC_URI}" | 6 | SRC_URI = "${RPIFW_SRC_URI}" |
6 | SRC_URI[md5sum] = "08ed10d92ee064711d73790557267f84" | 7 | SRC_URI[md5sum] = "319e53a3184d5cec6ba78a29d001940c" |
7 | SRC_URI[sha256sum] = "0ad8b66c02ba14917dfdc15f11d702da650c473681d100efb3f8d47aee9b8ece" | 8 | SRC_URI[sha256sum] = "002128368c15b1e030d9a625db49603d7d19973ba58eee11973a9319f6ba5d60" |
9 | |||
8 | PV = "${RPIFW_DATE}" | 10 | PV = "${RPIFW_DATE}" |
9 | 11 | ||
diff --git a/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch index e9c7058..4613504 100644 --- a/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch +++ b/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch | |||
@@ -57,20 +57,20 @@ vc_vchi_dispmanx.h | |||
57 | create mode 100644 interface/wayland/dispmanx.xml | 57 | create mode 100644 interface/wayland/dispmanx.xml |
58 | create mode 100644 makefiles/cmake/Wayland.cmake | 58 | create mode 100644 makefiles/cmake/Wayland.cmake |
59 | 59 | ||
60 | diff --git a/.gitignore b/.gitignore | 60 | Index: git/.gitignore |
61 | index 63570f1..1459436 100644 | 61 | =================================================================== |
62 | --- a/.gitignore | 62 | --- git.orig/.gitignore |
63 | +++ b/.gitignore | 63 | +++ git/.gitignore |
64 | @@ -30,3 +30,4 @@ build/ | 64 | @@ -30,3 +30,4 @@ build/ |
65 | *.pts | 65 | *.pts |
66 | *.ppm | 66 | *.ppm |
67 | *.mkv | 67 | *.mkv |
68 | +*~ | 68 | +*~ |
69 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 69 | Index: git/CMakeLists.txt |
70 | index cfc8ae5..673a5ad 100644 | 70 | =================================================================== |
71 | --- a/CMakeLists.txt | 71 | --- git.orig/CMakeLists.txt |
72 | +++ b/CMakeLists.txt | 72 | +++ git/CMakeLists.txt |
73 | @@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings.cmake) | 73 | @@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings. |
74 | include(makefiles/cmake/arm-linux.cmake) | 74 | include(makefiles/cmake/arm-linux.cmake) |
75 | include(makefiles/cmake/vmcs.cmake) | 75 | include(makefiles/cmake/vmcs.cmake) |
76 | 76 | ||
@@ -88,11 +88,11 @@ index cfc8ae5..673a5ad 100644 | |||
88 | enable_language(ASM) | 88 | enable_language(ASM) |
89 | 89 | ||
90 | # Global include paths | 90 | # Global include paths |
91 | diff --git a/README.md b/README.md | 91 | Index: git/README.md |
92 | index 94b93b8..50b90b1 100644 | 92 | =================================================================== |
93 | --- a/README.md | 93 | --- git.orig/README.md |
94 | +++ b/README.md | 94 | +++ git/README.md |
95 | @@ -6,3 +6,7 @@ Use buildme to build. It requires cmake to be installed and an arm cross compile | 95 | @@ -6,3 +6,7 @@ Use buildme to build. It requires cmake |
96 | https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian | 96 | https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian |
97 | 97 | ||
98 | Note that this repository does not contain the source for the edid_parser and vcdbg binaries due to licensing restrictions. | 98 | Note that this repository does not contain the source for the edid_parser and vcdbg binaries due to licensing restrictions. |
@@ -100,10 +100,10 @@ index 94b93b8..50b90b1 100644 | |||
100 | +To build support for the Wayland winsys in EGL, execute the buildme script like this: | 100 | +To build support for the Wayland winsys in EGL, execute the buildme script like this: |
101 | + | 101 | + |
102 | +$ BUILD_WAYLAND=1 ./buildme. | 102 | +$ BUILD_WAYLAND=1 ./buildme. |
103 | diff --git a/buildme b/buildme | 103 | Index: git/buildme |
104 | index b8fd440..a780bb6 100755 | 104 | =================================================================== |
105 | --- a/buildme | 105 | --- git.orig/buildme |
106 | +++ b/buildme | 106 | +++ git/buildme |
107 | @@ -8,6 +8,10 @@ fi | 107 | @@ -8,6 +8,10 @@ fi |
108 | 108 | ||
109 | BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`; | 109 | BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`; |
@@ -130,11 +130,11 @@ index b8fd440..a780bb6 100755 | |||
130 | make -j `nproc` | 130 | make -j `nproc` |
131 | 131 | ||
132 | if [ "$1" != "" ]; then | 132 | if [ "$1" != "" ]; then |
133 | diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt | 133 | Index: git/host_applications/linux/apps/raspicam/CMakeLists.txt |
134 | index e6aa6b8..69059cb 100644 | 134 | =================================================================== |
135 | --- a/host_applications/linux/apps/raspicam/CMakeLists.txt | 135 | --- git.orig/host_applications/linux/apps/raspicam/CMakeLists.txt |
136 | +++ b/host_applications/linux/apps/raspicam/CMakeLists.txt | 136 | +++ git/host_applications/linux/apps/raspicam/CMakeLists.txt |
137 | @@ -28,7 +28,7 @@ add_executable(raspividyuv ${COMMON_SOURCES} RaspiVidYUV.c) | 137 | @@ -28,7 +28,7 @@ add_executable(raspividyuv ${COMMON_SOU |
138 | 138 | ||
139 | set (MMAL_LIBS mmal_core mmal_util mmal_vc_client) | 139 | set (MMAL_LIBS mmal_core mmal_util mmal_vc_client) |
140 | 140 | ||
@@ -143,10 +143,10 @@ index e6aa6b8..69059cb 100644 | |||
143 | target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host) | 143 | target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host) |
144 | target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host) | 144 | target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host) |
145 | target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host) | 145 | target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host) |
146 | diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt | 146 | Index: git/interface/khronos/CMakeLists.txt |
147 | index 9ad615b..3d3571a 100644 | 147 | =================================================================== |
148 | --- a/interface/khronos/CMakeLists.txt | 148 | --- git.orig/interface/khronos/CMakeLists.txt |
149 | +++ b/interface/khronos/CMakeLists.txt | 149 | +++ git/interface/khronos/CMakeLists.txt |
150 | @@ -6,6 +6,12 @@ | 150 | @@ -6,6 +6,12 @@ |
151 | # have quite a few circular dependencies, and so the only way | 151 | # have quite a few circular dependencies, and so the only way |
152 | # to make it work seems to be to have everything static. | 152 | # to make it work seems to be to have everything static. |
@@ -160,7 +160,7 @@ index 9ad615b..3d3571a 100644 | |||
160 | set(EGL_SOURCE | 160 | set(EGL_SOURCE |
161 | egl/egl_client_config.c | 161 | egl/egl_client_config.c |
162 | egl/egl_client_context.c | 162 | egl/egl_client_context.c |
163 | @@ -55,12 +61,56 @@ set(CLIENT_SOURCE | 163 | @@ -55,12 +61,55 @@ set(CLIENT_SOURCE |
164 | common/khrn_int_hash_asm.s | 164 | common/khrn_int_hash_asm.s |
165 | common/khrn_client_cache.c) | 165 | common/khrn_client_cache.c) |
166 | 166 | ||
@@ -168,8 +168,7 @@ index 9ad615b..3d3571a 100644 | |||
168 | + khrn_client | 168 | + khrn_client |
169 | + vchiq_arm | 169 | + vchiq_arm |
170 | + vcos | 170 | + vcos |
171 | + bcm_host | 171 | + bcm_host) |
172 | + -lm) | ||
173 | + | 172 | + |
174 | +if (BUILD_WAYLAND) | 173 | +if (BUILD_WAYLAND) |
175 | + set(EGL_SOURCE | 174 | + set(EGL_SOURCE |
@@ -217,21 +216,30 @@ index 9ad615b..3d3571a 100644 | |||
217 | # TODO do we need EGL_static and GLESv2_static now that khrn_static exists? | 216 | # TODO do we need EGL_static and GLESv2_static now that khrn_static exists? |
218 | add_library(EGL_static STATIC ${EGL_SOURCE}) | 217 | add_library(EGL_static STATIC ${EGL_SOURCE}) |
219 | add_library(GLESv2_static STATIC ${GLES_SOURCE}) | 218 | add_library(GLESv2_static STATIC ${GLES_SOURCE}) |
220 | @@ -72,8 +122,7 @@ include_directories (../../host_applications/linux/libs/sm ) | 219 | @@ -72,8 +121,7 @@ include_directories (../../host_applicat |
221 | set(VCSM_LIBS vcsm) | 220 | set(VCSM_LIBS vcsm) |
222 | add_definitions(-DKHRONOS_HAVE_VCSM) | 221 | add_definitions(-DKHRONOS_HAVE_VCSM) |
223 | endif() | 222 | endif() |
224 | - | 223 | - |
225 | -target_link_libraries(EGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm) | 224 | -target_link_libraries(EGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm) |
226 | +target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS}) | 225 | +target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS} -lm) |
227 | target_link_libraries(GLESv2 EGL khrn_client vcos) | 226 | target_link_libraries(GLESv2 EGL khrn_client vcos) |
228 | target_link_libraries(WFC EGL) | 227 | target_link_libraries(WFC EGL) |
229 | target_link_libraries(OpenVG EGL) | 228 | target_link_libraries(OpenVG EGL) |
230 | diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c | 229 | @@ -87,7 +135,7 @@ add_library(brcmGLESv2 ${SHARED} ${GLES_ |
231 | index ef4babd..d7e798e 100644 | 230 | add_library(brcmOpenVG ${SHARED} ${VG_SOURCE}) |
232 | --- a/interface/khronos/common/khrn_client.c | 231 | add_library(brcmWFC ${SHARED} ${WFC_SOURCE}) |
233 | +++ b/interface/khronos/common/khrn_client.c | 232 | |
234 | @@ -54,6 +54,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 233 | -target_link_libraries(brcmEGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm) |
234 | +target_link_libraries(brcmEGL ${EGL_LIBS} ${VCSM_LIBS} -lm) | ||
235 | target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos) | ||
236 | target_link_libraries(brcmWFC brcmEGL) | ||
237 | target_link_libraries(brcmOpenVG brcmEGL) | ||
238 | Index: git/interface/khronos/common/khrn_client.c | ||
239 | =================================================================== | ||
240 | --- git.orig/interface/khronos/common/khrn_client.c | ||
241 | +++ git/interface/khronos/common/khrn_client.c | ||
242 | @@ -54,6 +54,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI | ||
235 | #include "applications/vmcs/khronos/khronos_server.h" | 243 | #include "applications/vmcs/khronos/khronos_server.h" |
236 | #endif | 244 | #endif |
237 | 245 | ||
@@ -242,7 +250,7 @@ index ef4babd..d7e798e 100644 | |||
242 | VCOS_LOG_CAT_T khrn_client_log = VCOS_LOG_INIT("khrn_client", VCOS_LOG_WARN); | 250 | VCOS_LOG_CAT_T khrn_client_log = VCOS_LOG_INIT("khrn_client", VCOS_LOG_WARN); |
243 | 251 | ||
244 | /* | 252 | /* |
245 | @@ -142,6 +146,10 @@ void client_try_unload_server(CLIENT_PROCESS_STATE_T *process) | 253 | @@ -142,6 +146,10 @@ void client_try_unload_server(CLIENT_PRO |
246 | bool client_process_state_init(CLIENT_PROCESS_STATE_T *process) | 254 | bool client_process_state_init(CLIENT_PROCESS_STATE_T *process) |
247 | { | 255 | { |
248 | if (!process->inited) { | 256 | if (!process->inited) { |
@@ -253,7 +261,7 @@ index ef4babd..d7e798e 100644 | |||
253 | if (!khrn_pointer_map_init(&process->contexts, 64)) | 261 | if (!khrn_pointer_map_init(&process->contexts, 64)) |
254 | return false; | 262 | return false; |
255 | 263 | ||
256 | @@ -194,6 +202,13 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process) | 264 | @@ -194,6 +202,13 @@ bool client_process_state_init(CLIENT_PR |
257 | } | 265 | } |
258 | #endif | 266 | #endif |
259 | 267 | ||
@@ -267,10 +275,10 @@ index ef4babd..d7e798e 100644 | |||
267 | process->inited = true; | 275 | process->inited = true; |
268 | } | 276 | } |
269 | 277 | ||
270 | diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h | 278 | Index: git/interface/khronos/common/khrn_client.h |
271 | index 804039b..615f7b4 100644 | 279 | =================================================================== |
272 | --- a/interface/khronos/common/khrn_client.h | 280 | --- git.orig/interface/khronos/common/khrn_client.h |
273 | +++ b/interface/khronos/common/khrn_client.h | 281 | +++ git/interface/khronos/common/khrn_client.h |
274 | @@ -310,6 +310,16 @@ struct CLIENT_PROCESS_STATE { | 282 | @@ -310,6 +310,16 @@ struct CLIENT_PROCESS_STATE { |
275 | #ifdef RPC_LIBRARY | 283 | #ifdef RPC_LIBRARY |
276 | KHRONOS_SERVER_CONNECTION_T khrn_connection; | 284 | KHRONOS_SERVER_CONNECTION_T khrn_connection; |
@@ -288,11 +296,11 @@ index 804039b..615f7b4 100644 | |||
288 | }; | 296 | }; |
289 | 297 | ||
290 | extern bool client_process_state_init(CLIENT_PROCESS_STATE_T *process); | 298 | extern bool client_process_state_init(CLIENT_PROCESS_STATE_T *process); |
291 | diff --git a/interface/khronos/common/khrn_client_mangle.h b/interface/khronos/common/khrn_client_mangle.h | 299 | Index: git/interface/khronos/common/khrn_client_mangle.h |
292 | index b3c04f4..b7b21c5 100644 | 300 | =================================================================== |
293 | --- a/interface/khronos/common/khrn_client_mangle.h | 301 | --- git.orig/interface/khronos/common/khrn_client_mangle.h |
294 | +++ b/interface/khronos/common/khrn_client_mangle.h | 302 | +++ git/interface/khronos/common/khrn_client_mangle.h |
295 | @@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 303 | @@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI |
296 | #define eglReleaseGlobalImageBRCM mangled_eglReleaseGlobalImageBRCM | 304 | #define eglReleaseGlobalImageBRCM mangled_eglReleaseGlobalImageBRCM |
297 | #define eglInitGlobalImageBRCM mangled_eglInitGlobalImageBRCM | 305 | #define eglInitGlobalImageBRCM mangled_eglInitGlobalImageBRCM |
298 | #define eglTermGlobalImageBRCM mangled_eglTermGlobalImageBRCM | 306 | #define eglTermGlobalImageBRCM mangled_eglTermGlobalImageBRCM |
@@ -302,11 +310,11 @@ index b3c04f4..b7b21c5 100644 | |||
302 | 310 | ||
303 | /* OpenGL ES 1.1 and 2.0 functions */ | 311 | /* OpenGL ES 1.1 and 2.0 functions */ |
304 | 312 | ||
305 | diff --git a/interface/khronos/common/khrn_client_platform.h b/interface/khronos/common/khrn_client_platform.h | 313 | Index: git/interface/khronos/common/khrn_client_platform.h |
306 | index 1c9da3a..715c67e 100644 | 314 | =================================================================== |
307 | --- a/interface/khronos/common/khrn_client_platform.h | 315 | --- git.orig/interface/khronos/common/khrn_client_platform.h |
308 | +++ b/interface/khronos/common/khrn_client_platform.h | 316 | +++ git/interface/khronos/common/khrn_client_platform.h |
309 | @@ -48,6 +48,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 317 | @@ -48,6 +48,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI |
310 | #include "interface/khronos/common/vcos/khrn_client_platform_filler_vcos.h" | 318 | #include "interface/khronos/common/vcos/khrn_client_platform_filler_vcos.h" |
311 | #endif | 319 | #endif |
312 | 320 | ||
@@ -326,11 +334,11 @@ index 1c9da3a..715c67e 100644 | |||
326 | +#endif | 334 | +#endif |
327 | + | 335 | + |
328 | #endif // KHRN_CLIENT_PLATFORM_H | 336 | #endif // KHRN_CLIENT_PLATFORM_H |
329 | diff --git a/interface/khronos/common/khrn_client_unmangle.h b/interface/khronos/common/khrn_client_unmangle.h | 337 | Index: git/interface/khronos/common/khrn_client_unmangle.h |
330 | index 4f3ce49..84f6ec0 100644 | 338 | =================================================================== |
331 | --- a/interface/khronos/common/khrn_client_unmangle.h | 339 | --- git.orig/interface/khronos/common/khrn_client_unmangle.h |
332 | +++ b/interface/khronos/common/khrn_client_unmangle.h | 340 | +++ git/interface/khronos/common/khrn_client_unmangle.h |
333 | @@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 341 | @@ -83,6 +83,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI |
334 | #undef eglReleaseGlobalImageBRCM | 342 | #undef eglReleaseGlobalImageBRCM |
335 | #undef eglInitGlobalImageBRCM | 343 | #undef eglInitGlobalImageBRCM |
336 | #undef eglTermGlobalImageBRCM | 344 | #undef eglTermGlobalImageBRCM |
@@ -340,11 +348,11 @@ index 4f3ce49..84f6ec0 100644 | |||
340 | 348 | ||
341 | /* OpenGL ES 1.1 and 2.0 functions */ | 349 | /* OpenGL ES 1.1 and 2.0 functions */ |
342 | 350 | ||
343 | diff --git a/interface/khronos/common/linux/khrn_client_platform_linux.c b/interface/khronos/common/linux/khrn_client_platform_linux.c | 351 | Index: git/interface/khronos/common/linux/khrn_client_platform_linux.c |
344 | index 710d20f..50d60a6 100644 | 352 | =================================================================== |
345 | --- a/interface/khronos/common/linux/khrn_client_platform_linux.c | 353 | --- git.orig/interface/khronos/common/linux/khrn_client_platform_linux.c |
346 | +++ b/interface/khronos/common/linux/khrn_client_platform_linux.c | 354 | +++ git/interface/khronos/common/linux/khrn_client_platform_linux.c |
347 | @@ -37,6 +37,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 355 | @@ -37,6 +37,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI |
348 | #include "X11/Xlib.h" | 356 | #include "X11/Xlib.h" |
349 | #endif | 357 | #endif |
350 | 358 | ||
@@ -356,7 +364,7 @@ index 710d20f..50d60a6 100644 | |||
356 | extern VCOS_LOG_CAT_T khrn_client_log; | 364 | extern VCOS_LOG_CAT_T khrn_client_log; |
357 | 365 | ||
358 | extern void vc_vchi_khronos_init(); | 366 | extern void vc_vchi_khronos_init(); |
359 | @@ -464,13 +469,36 @@ EGLDisplay khrn_platform_set_display_id(EGLNativeDisplayType display_id) | 367 | @@ -464,14 +469,37 @@ EGLDisplay khrn_platform_set_display_id( |
360 | return EGL_NO_DISPLAY; | 368 | return EGL_NO_DISPLAY; |
361 | } | 369 | } |
362 | #else | 370 | #else |
@@ -384,18 +392,19 @@ index 710d20f..50d60a6 100644 | |||
384 | +#endif | 392 | +#endif |
385 | + return EGL_NO_DISPLAY; | 393 | + return EGL_NO_DISPLAY; |
386 | + } | 394 | + } |
387 | } | 395 | +} |
388 | + | 396 | + |
389 | +#ifdef BUILD_WAYLAND | 397 | +#ifdef BUILD_WAYLAND |
390 | +struct wl_display *khrn_platform_get_wl_display() | 398 | +struct wl_display *khrn_platform_get_wl_display() |
391 | +{ | 399 | +{ |
392 | + return hacky_display; | 400 | + return hacky_display; |
393 | +} | 401 | } |
394 | +#endif | ||
395 | #endif | 402 | #endif |
403 | +#endif | ||
396 | 404 | ||
397 | #ifdef WANT_X | 405 | #ifdef WANT_X |
398 | @@ -805,22 +833,81 @@ static EGL_DISPMANX_WINDOW_T *check_default(EGLNativeWindowType win) | 406 | static void dump_hierarchy(Window w, Window thisw, Window look, int level) |
407 | @@ -805,22 +833,81 @@ static EGL_DISPMANX_WINDOW_T *check_defa | ||
399 | void platform_get_dimensions(EGLDisplay dpy, EGLNativeWindowType win, | 408 | void platform_get_dimensions(EGLDisplay dpy, EGLNativeWindowType win, |
400 | uint32_t *width, uint32_t *height, uint32_t *swapchain_count) | 409 | uint32_t *width, uint32_t *height, uint32_t *swapchain_count) |
401 | { | 410 | { |
@@ -426,8 +435,8 @@ index 710d20f..50d60a6 100644 | |||
426 | +#ifdef BUILD_WAYLAND | 435 | +#ifdef BUILD_WAYLAND |
427 | + } | 436 | + } |
428 | +#endif | 437 | +#endif |
429 | } | 438 | +} |
430 | 439 | + | |
431 | +#ifdef BUILD_WAYLAND | 440 | +#ifdef BUILD_WAYLAND |
432 | +static DISPMANX_ELEMENT_HANDLE_T create_dummy_element() | 441 | +static DISPMANX_ELEMENT_HANDLE_T create_dummy_element() |
433 | +{ | 442 | +{ |
@@ -458,9 +467,9 @@ index 710d20f..50d60a6 100644 | |||
458 | + vc_dispmanx_display_close(display); | 467 | + vc_dispmanx_display_close(display); |
459 | + | 468 | + |
460 | + return element; | 469 | + return element; |
461 | +} | 470 | } |
462 | +#endif | 471 | +#endif |
463 | + | 472 | |
464 | uint32_t platform_get_handle(EGLDisplay dpy, EGLNativeWindowType win) | 473 | uint32_t platform_get_handle(EGLDisplay dpy, EGLNativeWindowType win) |
465 | { | 474 | { |
466 | - EGL_DISPMANX_WINDOW_T *dwin = check_default(win); | 475 | - EGL_DISPMANX_WINDOW_T *dwin = check_default(win); |
@@ -489,11 +498,10 @@ index 710d20f..50d60a6 100644 | |||
489 | } | 498 | } |
490 | 499 | ||
491 | #endif | 500 | #endif |
492 | diff --git a/interface/khronos/common/linux/khrn_wayland.c b/interface/khronos/common/linux/khrn_wayland.c | 501 | Index: git/interface/khronos/common/linux/khrn_wayland.c |
493 | new file mode 100644 | 502 | =================================================================== |
494 | index 0000000..0e1b9e7 | ||
495 | --- /dev/null | 503 | --- /dev/null |
496 | +++ b/interface/khronos/common/linux/khrn_wayland.c | 504 | +++ git/interface/khronos/common/linux/khrn_wayland.c |
497 | @@ -0,0 +1,215 @@ | 505 | @@ -0,0 +1,215 @@ |
498 | +/* | 506 | +/* |
499 | +Copyright (c) 2013, Raspberry Pi Foundation | 507 | +Copyright (c) 2013, Raspberry Pi Foundation |
@@ -710,74 +718,72 @@ index 0000000..0e1b9e7 | |||
710 | + | 718 | + |
711 | + return wl_dispmanx_client_buffer; | 719 | + return wl_dispmanx_client_buffer; |
712 | +} | 720 | +} |
713 | diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/khronos/common/linux/khrn_wayland.h | 721 | Index: git/interface/vmcs_host/vc_vchi_dispmanx.h |
714 | similarity index 56% | 722 | =================================================================== |
715 | copy from interface/vmcs_host/vc_vchi_dispmanx.h | 723 | --- git.orig/interface/vmcs_host/vc_vchi_dispmanx.h |
716 | copy to interface/khronos/common/linux/khrn_wayland.h | 724 | +++ git/interface/vmcs_host/vc_vchi_dispmanx.h |
717 | index b723b76..b9bf08c 100644 | 725 | @@ -66,4 +66,19 @@ typedef struct { |
718 | --- a/interface/vmcs_host/vc_vchi_dispmanx.h | 726 | #define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) |
719 | +++ b/interface/khronos/common/linux/khrn_wayland.h | 727 | #define ELEMENT_CHANGE_TRANSFORM (1<<5) |
720 | @@ -1,5 +1,5 @@ | ||
721 | /* | ||
722 | -Copyright (c) 2012, Broadcom Europe Ltd | ||
723 | +Copyright (c) 2013, Raspberry Pi Foundation | ||
724 | All rights reserved. | ||
725 | |||
726 | Redistribution and use in source and binary forms, with or without | ||
727 | @@ -25,45 +25,9 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
728 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
729 | */ | ||
730 | 728 | ||
731 | -#ifndef VC_VCHI_DISPMANX_H | 729 | +#ifdef BUILD_WAYLAND |
732 | -#define VC_VCHI_DISPMANX_H | 730 | +/* XXX: This should be in a private header that can be included from EGL and vc_* */ |
731 | +#include <wayland-server.h> | ||
732 | +#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h" | ||
733 | +struct wl_dispmanx_server_buffer { | ||
734 | + struct wl_resource *resource; | ||
735 | + struct wl_dispmanx *dispmanx; | ||
736 | + enum wl_dispmanx_format format; | ||
737 | + DISPMANX_RESOURCE_HANDLE_T handle; | ||
738 | + int32_t width; | ||
739 | + int32_t height; | ||
740 | + int in_use; | ||
741 | +}; | ||
742 | +#endif | ||
743 | + | ||
744 | #endif | ||
745 | Index: git/interface/khronos/common/linux/khrn_wayland.h | ||
746 | =================================================================== | ||
747 | --- /dev/null | ||
748 | +++ git/interface/khronos/common/linux/khrn_wayland.h | ||
749 | @@ -0,0 +1,33 @@ | ||
750 | +/* | ||
751 | +Copyright (c) 2013, Raspberry Pi Foundation | ||
752 | +All rights reserved. | ||
753 | + | ||
754 | +Redistribution and use in source and binary forms, with or without | ||
755 | +modification, are permitted provided that the following conditions are met: | ||
756 | + * Redistributions of source code must retain the above copyright | ||
757 | + notice, this list of conditions and the following disclaimer. | ||
758 | + * Redistributions in binary form must reproduce the above copyright | ||
759 | + notice, this list of conditions and the following disclaimer in the | ||
760 | + documentation and/or other materials provided with the distribution. | ||
761 | + * Neither the name of the copyright holder nor the | ||
762 | + names of its contributors may be used to endorse or promote products | ||
763 | + derived from this software without specific prior written permission. | ||
764 | + | ||
765 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
766 | +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
767 | +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
768 | +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY | ||
769 | +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
770 | +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
771 | +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
772 | +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
773 | +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
774 | +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
775 | +*/ | ||
776 | + | ||
733 | +#include "interface/khronos/common/khrn_client.h" | 777 | +#include "interface/khronos/common/khrn_client.h" |
734 | 778 | + | |
735 | -#include "interface/peer/vc_vchi_dispmanx_common.h" | ||
736 | +int init_process_wayland(CLIENT_PROCESS_STATE_T *process); | 779 | +int init_process_wayland(CLIENT_PROCESS_STATE_T *process); |
737 | +int do_wl_roundtrip(); | 780 | +int do_wl_roundtrip(); |
738 | 781 | + | |
739 | -#define VC_NUM_HOST_RESOURCES 64 | ||
740 | -#define DISPMANX_MSGFIFO_SIZE 1024 | ||
741 | -#define DISPMANX_CLIENT_NAME MAKE_FOURCC("DISP") | ||
742 | -#define DISPMANX_NOTIFY_NAME MAKE_FOURCC("UPDH") | ||
743 | - | ||
744 | -//Or with command to indicate we don't need a response | ||
745 | -#define DISPMANX_NO_REPLY_MASK (1<<31) | ||
746 | - | ||
747 | -typedef struct { | ||
748 | - char description[32]; | ||
749 | - uint32_t width; | ||
750 | - uint32_t height; | ||
751 | - uint32_t aspect_pixwidth; | ||
752 | - uint32_t aspect_pixheight; | ||
753 | - uint32_t fieldrate_num; | ||
754 | - uint32_t fieldrate_denom; | ||
755 | - uint32_t fields_per_frame; | ||
756 | - uint32_t transform; | ||
757 | -} GET_MODES_DATA_T; | ||
758 | - | ||
759 | -typedef struct { | ||
760 | - int32_t response; | ||
761 | - uint32_t width; | ||
762 | - uint32_t height; | ||
763 | - uint32_t transform; | ||
764 | - uint32_t input_format; | ||
765 | -} GET_INFO_DATA_T; | ||
766 | - | ||
767 | -//Attributes changes flag mask | ||
768 | -#define ELEMENT_CHANGE_LAYER (1<<0) | ||
769 | -#define ELEMENT_CHANGE_OPACITY (1<<1) | ||
770 | -#define ELEMENT_CHANGE_DEST_RECT (1<<2) | ||
771 | -#define ELEMENT_CHANGE_SRC_RECT (1<<3) | ||
772 | -#define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) | ||
773 | -#define ELEMENT_CHANGE_TRANSFORM (1<<5) | ||
774 | - | ||
775 | -#endif | ||
776 | +struct wl_dispmanx_client_buffer *allocate_wl_buffer(struct wl_egl_window *window, KHRN_IMAGE_FORMAT_T color); | 782 | +struct wl_dispmanx_client_buffer *allocate_wl_buffer(struct wl_egl_window *window, KHRN_IMAGE_FORMAT_T color); |
777 | diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c | 783 | Index: git/interface/khronos/egl/egl_client.c |
778 | index b8bb374..03fe67b 100644 | 784 | =================================================================== |
779 | --- a/interface/khronos/egl/egl_client.c | 785 | --- git.orig/interface/khronos/egl/egl_client.c |
780 | +++ b/interface/khronos/egl/egl_client.c | 786 | +++ git/interface/khronos/egl/egl_client.c |
781 | @@ -153,6 +153,10 @@ by an attribute value" | 787 | @@ -153,6 +153,10 @@ by an attribute value" |
782 | #include <stdlib.h> | 788 | #include <stdlib.h> |
783 | #include <string.h> | 789 | #include <string.h> |
@@ -789,7 +795,7 @@ index b8bb374..03fe67b 100644 | |||
789 | 795 | ||
790 | #include "interface/khronos/egl/egl_client_cr.c" | 796 | #include "interface/khronos/egl/egl_client_cr.c" |
791 | 797 | ||
792 | @@ -162,17 +166,6 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T * | 798 | @@ -162,17 +166,6 @@ static void egl_current_release(CLIENT_P |
793 | void egl_gl_flush_callback(bool wait); | 799 | void egl_gl_flush_callback(bool wait); |
794 | void egl_vg_flush_callback(bool wait); | 800 | void egl_vg_flush_callback(bool wait); |
795 | 801 | ||
@@ -807,17 +813,17 @@ index b8bb374..03fe67b 100644 | |||
807 | /* | 813 | /* |
808 | TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate) | 814 | TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate) |
809 | Also affects global image (and possibly others?) | 815 | Also affects global image (and possibly others?) |
810 | @@ -450,6 +443,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name) | 816 | @@ -451,6 +444,9 @@ EGLAPI const char EGLAPIENTRY * eglQuery |
811 | #ifdef EGL_KHR_fence_sync | ||
812 | "EGL_KHR_fence_sync " | 817 | "EGL_KHR_fence_sync " |
813 | #endif | 818 | #endif |
814 | +#endif | 819 | #endif |
815 | +#if EGL_WL_bind_wayland_display | 820 | +#if EGL_WL_bind_wayland_display |
816 | + "EGL_WL_bind_wayland_display " | 821 | + "EGL_WL_bind_wayland_display " |
817 | #endif | 822 | +#endif |
818 | ; | 823 | ; |
819 | break; | 824 | break; |
820 | @@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c | 825 | case EGL_VENDOR: |
826 | @@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateW | ||
821 | false, | 827 | false, |
822 | EGL_NO_TEXTURE, | 828 | EGL_NO_TEXTURE, |
823 | EGL_NO_TEXTURE, | 829 | EGL_NO_TEXTURE, |
@@ -827,7 +833,7 @@ index b8bb374..03fe67b 100644 | |||
827 | 833 | ||
828 | if (surface) { | 834 | if (surface) { |
829 | if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { | 835 | if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { |
830 | @@ -901,7 +896,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig | 836 | @@ -901,7 +896,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateP |
831 | mipmap_texture, | 837 | mipmap_texture, |
832 | texture_format, | 838 | texture_format, |
833 | texture_target, | 839 | texture_target, |
@@ -836,7 +842,7 @@ index b8bb374..03fe67b 100644 | |||
836 | 842 | ||
837 | if (surface) { | 843 | if (surface) { |
838 | if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { | 844 | if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { |
839 | @@ -1043,7 +1038,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c | 845 | @@ -1043,7 +1038,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateP |
840 | false, | 846 | false, |
841 | EGL_NO_TEXTURE, | 847 | EGL_NO_TEXTURE, |
842 | EGL_NO_TEXTURE, | 848 | EGL_NO_TEXTURE, |
@@ -845,7 +851,7 @@ index b8bb374..03fe67b 100644 | |||
845 | 851 | ||
846 | if (surface) { | 852 | if (surface) { |
847 | if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { | 853 | if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) { |
848 | @@ -2245,6 +2240,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | 854 | @@ -2245,6 +2240,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuf |
849 | CLIENT_THREAD_STATE_T *thread; | 855 | CLIENT_THREAD_STATE_T *thread; |
850 | CLIENT_PROCESS_STATE_T *process; | 856 | CLIENT_PROCESS_STATE_T *process; |
851 | EGLBoolean result; | 857 | EGLBoolean result; |
@@ -855,7 +861,7 @@ index b8bb374..03fe67b 100644 | |||
855 | 861 | ||
856 | vcos_log_trace("eglSwapBuffers start. dpy=%d. surf=%d.", (int)dpy, (int)surf); | 862 | vcos_log_trace("eglSwapBuffers start. dpy=%d. surf=%d.", (int)dpy, (int)surf); |
857 | 863 | ||
858 | @@ -2315,18 +2313,58 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | 864 | @@ -2315,18 +2313,58 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuf |
859 | 865 | ||
860 | vcos_log_trace("eglSwapBuffers server call"); | 866 | vcos_log_trace("eglSwapBuffers server call"); |
861 | 867 | ||
@@ -926,11 +932,11 @@ index b8bb374..03fe67b 100644 | |||
926 | RPC_CALL6(eglIntSwapBuffers_impl, | 932 | RPC_CALL6(eglIntSwapBuffers_impl, |
927 | thread, | 933 | thread, |
928 | EGLINTSWAPBUFFERS_ID, | 934 | EGLINTSWAPBUFFERS_ID, |
929 | diff --git a/interface/khronos/egl/egl_client_get_proc.c b/interface/khronos/egl/egl_client_get_proc.c | 935 | Index: git/interface/khronos/egl/egl_client_get_proc.c |
930 | index 4cfa9ff..6a715af 100644 | 936 | =================================================================== |
931 | --- a/interface/khronos/egl/egl_client_get_proc.c | 937 | --- git.orig/interface/khronos/egl/egl_client_get_proc.c |
932 | +++ b/interface/khronos/egl/egl_client_get_proc.c | 938 | +++ git/interface/khronos/egl/egl_client_get_proc.c |
933 | @@ -254,6 +254,17 @@ EGLAPI void EGLAPIENTRY (* eglGetProcAddress(const char *procname))(void) | 939 | @@ -254,6 +254,17 @@ EGLAPI void EGLAPIENTRY (* eglGetProcAdd |
934 | return (void(*)(void))eglQueryGlobalImageBRCM; | 940 | return (void(*)(void))eglQueryGlobalImageBRCM; |
935 | #endif | 941 | #endif |
936 | 942 | ||
@@ -948,11 +954,11 @@ index 4cfa9ff..6a715af 100644 | |||
948 | return (void(*)(void)) NULL; | 954 | return (void(*)(void)) NULL; |
949 | } | 955 | } |
950 | 956 | ||
951 | diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c | 957 | Index: git/interface/khronos/egl/egl_client_surface.c |
952 | index 128325e..42350bf 100644 | 958 | =================================================================== |
953 | --- a/interface/khronos/egl/egl_client_surface.c | 959 | --- git.orig/interface/khronos/egl/egl_client_surface.c |
954 | +++ b/interface/khronos/egl/egl_client_surface.c | 960 | +++ git/interface/khronos/egl/egl_client_surface.c |
955 | @@ -46,6 +46,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 961 | @@ -46,6 +46,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI |
956 | #include "interface/khronos/egl/egl_int_impl.h" | 962 | #include "interface/khronos/egl/egl_int_impl.h" |
957 | #endif | 963 | #endif |
958 | 964 | ||
@@ -1026,7 +1032,7 @@ index 128325e..42350bf 100644 | |||
1026 | RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl, | 1032 | RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl, |
1027 | thread, | 1033 | thread, |
1028 | EGLINTCREATESURFACE_ID, | 1034 | EGLINTCREATESURFACE_ID, |
1029 | @@ -663,6 +685,18 @@ void egl_surface_free(EGL_SURFACE_T *surface) | 1035 | @@ -663,6 +685,18 @@ void egl_surface_free(EGL_SURFACE_T *sur |
1030 | if( surface->type == WINDOW ) { | 1036 | if( surface->type == WINDOW ) { |
1031 | vcos_log_trace("egl_surface_free: calling platform_destroy_winhandle..."); | 1037 | vcos_log_trace("egl_surface_free: calling platform_destroy_winhandle..."); |
1032 | platform_destroy_winhandle( surface->win, surface->internal_handle ); | 1038 | platform_destroy_winhandle( surface->win, surface->internal_handle ); |
@@ -1045,10 +1051,10 @@ index 128325e..42350bf 100644 | |||
1045 | } | 1051 | } |
1046 | /* return value ignored -- read performed to ensure blocking. we want this to | 1052 | /* return value ignored -- read performed to ensure blocking. we want this to |
1047 | * block so clients can safely destroy the surface's window as soon as the | 1053 | * block so clients can safely destroy the surface's window as soon as the |
1048 | diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h | 1054 | Index: git/interface/khronos/egl/egl_client_surface.h |
1049 | index b5bf70a..e328b77 100644 | 1055 | =================================================================== |
1050 | --- a/interface/khronos/egl/egl_client_surface.h | 1056 | --- git.orig/interface/khronos/egl/egl_client_surface.h |
1051 | +++ b/interface/khronos/egl/egl_client_surface.h | 1057 | +++ git/interface/khronos/egl/egl_client_surface.h |
1052 | @@ -288,6 +288,41 @@ typedef struct { | 1058 | @@ -288,6 +288,41 @@ typedef struct { |
1053 | type == PIXMAP | 1059 | type == PIXMAP |
1054 | */ | 1060 | */ |
@@ -1091,7 +1097,7 @@ index b5bf70a..e328b77 100644 | |||
1091 | } EGL_SURFACE_T; | 1097 | } EGL_SURFACE_T; |
1092 | 1098 | ||
1093 | extern bool egl_surface_check_attribs( | 1099 | extern bool egl_surface_check_attribs( |
1094 | @@ -322,8 +357,7 @@ extern EGL_SURFACE_T *egl_surface_create( | 1100 | @@ -322,8 +357,7 @@ extern EGL_SURFACE_T *egl_surface_create |
1095 | EGLenum texture_format, | 1101 | EGLenum texture_format, |
1096 | EGLenum texture_target, | 1102 | EGLenum texture_target, |
1097 | EGLNativePixmapType pixmap, | 1103 | EGLNativePixmapType pixmap, |
@@ -1101,10 +1107,10 @@ index b5bf70a..e328b77 100644 | |||
1101 | extern EGL_SURFACE_T *egl_surface_from_vg_image( | 1107 | extern EGL_SURFACE_T *egl_surface_from_vg_image( |
1102 | VGImage vg_handle, | 1108 | VGImage vg_handle, |
1103 | EGLSurface name, | 1109 | EGLSurface name, |
1104 | diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h | 1110 | Index: git/interface/khronos/egl/egl_int_impl.h |
1105 | index 51b3580..6863a3b 100644 | 1111 | =================================================================== |
1106 | --- a/interface/khronos/egl/egl_int_impl.h | 1112 | --- git.orig/interface/khronos/egl/egl_int_impl.h |
1107 | +++ b/interface/khronos/egl/egl_int_impl.h | 1113 | +++ git/interface/khronos/egl/egl_int_impl.h |
1108 | @@ -57,7 +57,7 @@ FN(int, eglIntCreateSurface_impl, ( | 1114 | @@ -57,7 +57,7 @@ FN(int, eglIntCreateSurface_impl, ( |
1109 | uint32_t sem, | 1115 | uint32_t sem, |
1110 | uint32_t type, | 1116 | uint32_t type, |
@@ -1114,11 +1120,10 @@ index 51b3580..6863a3b 100644 | |||
1114 | 1120 | ||
1115 | FN(int, eglIntCreatePbufferFromVGImage_impl, ( | 1121 | FN(int, eglIntCreatePbufferFromVGImage_impl, ( |
1116 | VGImage vg_handle, | 1122 | VGImage vg_handle, |
1117 | diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c | 1123 | Index: git/interface/khronos/ext/egl_wayland.c |
1118 | new file mode 100644 | 1124 | =================================================================== |
1119 | index 0000000..5730743 | ||
1120 | --- /dev/null | 1125 | --- /dev/null |
1121 | +++ b/interface/khronos/ext/egl_wayland.c | 1126 | +++ git/interface/khronos/ext/egl_wayland.c |
1122 | @@ -0,0 +1,246 @@ | 1127 | @@ -0,0 +1,246 @@ |
1123 | +/* | 1128 | +/* |
1124 | +Copyright (c) 2013, Raspberry Pi Foundation | 1129 | +Copyright (c) 2013, Raspberry Pi Foundation |
@@ -1366,11 +1371,11 @@ index 0000000..5730743 | |||
1366 | + | 1371 | + |
1367 | + return EGL_FALSE; | 1372 | + return EGL_FALSE; |
1368 | +} | 1373 | +} |
1369 | diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h | 1374 | Index: git/interface/khronos/include/EGL/eglext.h |
1370 | index 89a3369..d7e5ba7 100755 | 1375 | =================================================================== |
1371 | --- a/interface/khronos/include/EGL/eglext.h | 1376 | --- git.orig/interface/khronos/include/EGL/eglext.h |
1372 | +++ b/interface/khronos/include/EGL/eglext.h | 1377 | +++ git/interface/khronos/include/EGL/eglext.h |
1373 | @@ -191,6 +191,29 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG | 1378 | @@ -191,6 +191,29 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLG |
1374 | #endif | 1379 | #endif |
1375 | 1380 | ||
1376 | 1381 | ||
@@ -1400,11 +1405,10 @@ index 89a3369..d7e5ba7 100755 | |||
1400 | #ifdef __cplusplus | 1405 | #ifdef __cplusplus |
1401 | } | 1406 | } |
1402 | #endif | 1407 | #endif |
1403 | diff --git a/interface/khronos/wayland-egl/wayland-egl-priv.h b/interface/khronos/wayland-egl/wayland-egl-priv.h | 1408 | Index: git/interface/khronos/wayland-egl/wayland-egl-priv.h |
1404 | new file mode 100644 | 1409 | =================================================================== |
1405 | index 0000000..8e38d36 | ||
1406 | --- /dev/null | 1410 | --- /dev/null |
1407 | +++ b/interface/khronos/wayland-egl/wayland-egl-priv.h | 1411 | +++ git/interface/khronos/wayland-egl/wayland-egl-priv.h |
1408 | @@ -0,0 +1,53 @@ | 1412 | @@ -0,0 +1,53 @@ |
1409 | +/* Copied from Mesa */ | 1413 | +/* Copied from Mesa */ |
1410 | + | 1414 | + |
@@ -1459,11 +1463,10 @@ index 0000000..8e38d36 | |||
1459 | +#endif | 1463 | +#endif |
1460 | + | 1464 | + |
1461 | +#endif | 1465 | +#endif |
1462 | diff --git a/interface/khronos/wayland-egl/wayland-egl.c b/interface/khronos/wayland-egl/wayland-egl.c | 1466 | Index: git/interface/khronos/wayland-egl/wayland-egl.c |
1463 | new file mode 100644 | 1467 | =================================================================== |
1464 | index 0000000..b8f050b | ||
1465 | --- /dev/null | 1468 | --- /dev/null |
1466 | +++ b/interface/khronos/wayland-egl/wayland-egl.c | 1469 | +++ git/interface/khronos/wayland-egl/wayland-egl.c |
1467 | @@ -0,0 +1,59 @@ | 1470 | @@ -0,0 +1,59 @@ |
1468 | +/* Copied from Mesa */ | 1471 | +/* Copied from Mesa */ |
1469 | + | 1472 | + |
@@ -1524,11 +1527,10 @@ index 0000000..b8f050b | |||
1524 | + if (height) | 1527 | + if (height) |
1525 | + *height = egl_window->attached_height; | 1528 | + *height = egl_window->attached_height; |
1526 | +} | 1529 | +} |
1527 | diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in | 1530 | Index: git/interface/khronos/wayland-egl/wayland-egl.pc.in |
1528 | new file mode 100644 | 1531 | =================================================================== |
1529 | index 0000000..8bafc15 | ||
1530 | --- /dev/null | 1532 | --- /dev/null |
1531 | +++ b/interface/khronos/wayland-egl/wayland-egl.pc.in | 1533 | +++ git/interface/khronos/wayland-egl/wayland-egl.pc.in |
1532 | @@ -0,0 +1,10 @@ | 1534 | @@ -0,0 +1,10 @@ |
1533 | +prefix=@CMAKE_INSTALL_PREFIX@ | 1535 | +prefix=@CMAKE_INSTALL_PREFIX@ |
1534 | +exec_prefix=${prefix} | 1536 | +exec_prefix=${prefix} |
@@ -1540,10 +1542,10 @@ index 0000000..8bafc15 | |||
1540 | +Version: @PROJECT_APIVER@ | 1542 | +Version: @PROJECT_APIVER@ |
1541 | +Libs: -L${libdir} -lwayland-egl | 1543 | +Libs: -L${libdir} -lwayland-egl |
1542 | +Cflags: -I${includedir} | 1544 | +Cflags: -I${includedir} |
1543 | diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt | 1545 | Index: git/interface/vmcs_host/CMakeLists.txt |
1544 | index fde18da..6718215 100755 | 1546 | =================================================================== |
1545 | --- a/interface/vmcs_host/CMakeLists.txt | 1547 | --- git.orig/interface/vmcs_host/CMakeLists.txt |
1546 | +++ b/interface/vmcs_host/CMakeLists.txt | 1548 | +++ git/interface/vmcs_host/CMakeLists.txt |
1547 | @@ -9,13 +9,24 @@ add_definitions(-fno-strict-aliasing) | 1549 | @@ -9,13 +9,24 @@ add_definitions(-fno-strict-aliasing) |
1548 | 1550 | ||
1549 | include_directories(${VMCS_TARGET}/vcfiled) | 1551 | include_directories(${VMCS_TARGET}/vcfiled) |
@@ -1574,11 +1576,11 @@ index fde18da..6718215 100755 | |||
1574 | #add_library(bufman vc_vchi_bufman.c ) | 1576 | #add_library(bufman vc_vchi_bufman.c ) |
1575 | 1577 | ||
1576 | # OpenMAX/IL component service | 1578 | # OpenMAX/IL component service |
1577 | diff --git a/interface/vmcs_host/vc_dispmanx.h b/interface/vmcs_host/vc_dispmanx.h | 1579 | Index: git/interface/vmcs_host/vc_dispmanx.h |
1578 | index 37fdae1..fe3619a 100755 | 1580 | =================================================================== |
1579 | --- a/interface/vmcs_host/vc_dispmanx.h | 1581 | --- git.orig/interface/vmcs_host/vc_dispmanx.h |
1580 | +++ b/interface/vmcs_host/vc_dispmanx.h | 1582 | +++ git/interface/vmcs_host/vc_dispmanx.h |
1581 | @@ -39,6 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 1583 | @@ -39,6 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI |
1582 | #ifdef __cplusplus | 1584 | #ifdef __cplusplus |
1583 | extern "C" { | 1585 | extern "C" { |
1584 | #endif | 1586 | #endif |
@@ -1590,7 +1592,7 @@ index 37fdae1..fe3619a 100755 | |||
1590 | // Same function as above, to aid migration of code. | 1592 | // Same function as above, to aid migration of code. |
1591 | VCHPRE_ int VCHPOST_ vc_dispman_init( void ); | 1593 | VCHPRE_ int VCHPOST_ vc_dispman_init( void ); |
1592 | // Stop the service from being used | 1594 | // Stop the service from being used |
1593 | @@ -135,6 +140,11 @@ VCHPRE_ int VCHPOST_ vc_dispmanx_resource_set_palette( DISPMANX_RESOURCE_HANDLE_ | 1595 | @@ -135,6 +140,11 @@ VCHPRE_ int VCHPOST_ vc_dispmanx_resourc |
1594 | // Start triggering callbacks synced to vsync | 1596 | // Start triggering callbacks synced to vsync |
1595 | VCHPRE_ int VCHPOST_ vc_dispmanx_vsync_callback( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_CALLBACK_FUNC_T cb_func, void *cb_arg ); | 1597 | VCHPRE_ int VCHPOST_ vc_dispmanx_vsync_callback( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_CALLBACK_FUNC_T cb_func, void *cb_arg ); |
1596 | 1598 | ||
@@ -1602,11 +1604,11 @@ index 37fdae1..fe3619a 100755 | |||
1602 | #ifdef __cplusplus | 1604 | #ifdef __cplusplus |
1603 | } | 1605 | } |
1604 | #endif | 1606 | #endif |
1605 | diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c | 1607 | Index: git/interface/vmcs_host/vc_vchi_dispmanx.c |
1606 | index 7a6cdcd..eab146e 100755 | 1608 | =================================================================== |
1607 | --- a/interface/vmcs_host/vc_vchi_dispmanx.c | 1609 | --- git.orig/interface/vmcs_host/vc_vchi_dispmanx.c |
1608 | +++ b/interface/vmcs_host/vc_vchi_dispmanx.c | 1610 | +++ git/interface/vmcs_host/vc_vchi_dispmanx.c |
1609 | @@ -1319,3 +1319,45 @@ static void *dispmanx_notify_func( void *arg ) { | 1611 | @@ -1319,3 +1319,45 @@ static void *dispmanx_notify_func( void |
1610 | } | 1612 | } |
1611 | return 0; | 1613 | return 0; |
1612 | } | 1614 | } |
@@ -1652,35 +1654,10 @@ index 7a6cdcd..eab146e 100755 | |||
1652 | + buffer->in_use = in_use; | 1654 | + buffer->in_use = in_use; |
1653 | +} | 1655 | +} |
1654 | +#endif | 1656 | +#endif |
1655 | diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h | 1657 | Index: git/interface/wayland/dispmanx.xml |
1656 | index b723b76..f0bae30 100644 | 1658 | =================================================================== |
1657 | --- a/interface/vmcs_host/vc_vchi_dispmanx.h | ||
1658 | +++ b/interface/vmcs_host/vc_vchi_dispmanx.h | ||
1659 | @@ -66,4 +66,19 @@ typedef struct { | ||
1660 | #define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) | ||
1661 | #define ELEMENT_CHANGE_TRANSFORM (1<<5) | ||
1662 | |||
1663 | +#ifdef BUILD_WAYLAND | ||
1664 | +/* XXX: This should be in a private header that can be included from EGL and vc_* */ | ||
1665 | +#include <wayland-server.h> | ||
1666 | +#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h" | ||
1667 | +struct wl_dispmanx_server_buffer { | ||
1668 | + struct wl_resource *resource; | ||
1669 | + struct wl_dispmanx *dispmanx; | ||
1670 | + enum wl_dispmanx_format format; | ||
1671 | + DISPMANX_RESOURCE_HANDLE_T handle; | ||
1672 | + int32_t width; | ||
1673 | + int32_t height; | ||
1674 | + int in_use; | ||
1675 | +}; | ||
1676 | +#endif | ||
1677 | + | ||
1678 | #endif | ||
1679 | diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml | ||
1680 | new file mode 100644 | ||
1681 | index 0000000..c18626d | ||
1682 | --- /dev/null | 1659 | --- /dev/null |
1683 | +++ b/interface/wayland/dispmanx.xml | 1660 | +++ git/interface/wayland/dispmanx.xml |
1684 | @@ -0,0 +1,123 @@ | 1661 | @@ -0,0 +1,123 @@ |
1685 | +<?xml version="1.0" encoding="UTF-8"?> | 1662 | +<?xml version="1.0" encoding="UTF-8"?> |
1686 | +<protocol name="dispmanx"> | 1663 | +<protocol name="dispmanx"> |
@@ -1805,11 +1782,10 @@ index 0000000..c18626d | |||
1805 | + </interface> | 1782 | + </interface> |
1806 | + | 1783 | + |
1807 | +</protocol> | 1784 | +</protocol> |
1808 | diff --git a/makefiles/cmake/Wayland.cmake b/makefiles/cmake/Wayland.cmake | 1785 | Index: git/makefiles/cmake/Wayland.cmake |
1809 | new file mode 100644 | 1786 | =================================================================== |
1810 | index 0000000..ad90d30 | ||
1811 | --- /dev/null | 1787 | --- /dev/null |
1812 | +++ b/makefiles/cmake/Wayland.cmake | 1788 | +++ git/makefiles/cmake/Wayland.cmake |
1813 | @@ -0,0 +1,72 @@ | 1789 | @@ -0,0 +1,72 @@ |
1814 | +#============================================================================= | 1790 | +#============================================================================= |
1815 | +# Copyright (C) 2012-2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 1791 | +# Copyright (C) 2012-2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> |
@@ -1883,6 +1859,3 @@ index 0000000..ad90d30 | |||
1883 | + list(APPEND ${_sources} "${_server_header}") | 1859 | + list(APPEND ${_sources} "${_server_header}") |
1884 | + set(${_sources} ${${_sources}} PARENT_SCOPE) | 1860 | + set(${_sources} ${${_sources}} PARENT_SCOPE) |
1885 | +endfunction() | 1861 | +endfunction() |
1886 | -- | ||
1887 | 2.16.1 | ||
1888 | |||
diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb index de0b3c7..7f2dca6 100644 --- a/recipes-graphics/userland/userland_git.bb +++ b/recipes-graphics/userland/userland_git.bb | |||
@@ -14,11 +14,11 @@ COMPATIBLE_MACHINE = "^rpi$" | |||
14 | 14 | ||
15 | SRCBRANCH = "master" | 15 | SRCBRANCH = "master" |
16 | SRCFORK = "raspberrypi" | 16 | SRCFORK = "raspberrypi" |
17 | SRCREV = "1c3a9eb76da9d6107cadd360301cf20004496b04" | 17 | SRCREV = "11389772c79685442e0ab8aa9be8ad0e32703f68" |
18 | 18 | ||
19 | # Use the date of the above commit as the package version. Update this when | 19 | # Use the date of the above commit as the package version. Update this when |
20 | # SRCREV is changed. | 20 | # SRCREV is changed. |
21 | PV = "20180130" | 21 | PV = "20180219" |
22 | 22 | ||
23 | SRC_URI = "\ | 23 | SRC_URI = "\ |
24 | git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ | 24 | git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ |
diff --git a/recipes-kernel/linux/linux-raspberrypi_4.14.bb b/recipes-kernel/linux/linux-raspberrypi_4.14.bb index 440092e..db249a3 100644 --- a/recipes-kernel/linux/linux-raspberrypi_4.14.bb +++ b/recipes-kernel/linux/linux-raspberrypi_4.14.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | LINUX_VERSION ?= "4.14.22" | 1 | LINUX_VERSION ?= "4.14.22" |
2 | 2 | ||
3 | SRCREV = "d95cdf3e6a0506e3a728b0c80ae02368779d2768" | 3 | SRCREV = "daa138dae512b374c5be05f492e7c62838359b53" |
4 | SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y" | 4 | SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y" |
5 | 5 | ||
6 | require linux-raspberrypi.inc | 6 | require linux-raspberrypi.inc |