summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-02-16 10:46:37 -0800
committerAndrei Gherzan <andrei@gherzan.ro>2017-02-16 20:53:04 +0100
commitd01bf8751be054637dbc56939024e9178115cfdb (patch)
tree08785f51de7f57ab83fd59f835a4287c21f3d3c1
parent39bd54a3f60361a5fdbb1e3e5eb46abf002f58e6 (diff)
downloadmeta-raspberrypi-d01bf8751be054637dbc56939024e9178115cfdb.tar.gz
userland: Upgrade to latest and implement triple buffering for wayland
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch85
-rw-r--r--recipes-graphics/userland/userland_git.bb3
2 files changed, 87 insertions, 1 deletions
diff --git a/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch b/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch
new file mode 100644
index 0000000..8703296
--- /dev/null
+++ b/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch
@@ -0,0 +1,85 @@
1From 81f421b051c726bbe180ee5f7d93cf13a3935904 Mon Sep 17 00:00:00 2001
2From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
3Date: Thu, 19 Jan 2017 18:56:07 +0000
4Subject: [PATCH 13/13] Implement triple buffering for wayland
5
6Change from double to triple buffering for wayland. This enables higher frame rates without tearing artifacts by allowing both the glFinish and the buffer release interlock to operate without pushing the frame period to two vertical intervals
7
8Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
9---
10 interface/khronos/egl/egl_client.c | 3 ++-
11 interface/khronos/egl/egl_client_surface.c | 8 ++++++++
12 interface/khronos/egl/egl_client_surface.h | 11 +++++++++++
13 3 files changed, 21 insertions(+), 1 deletion(-)
14
15diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
16index 13a110c..0380274 100644
17--- a/interface/khronos/egl/egl_client.c
18+++ b/interface/khronos/egl/egl_client.c
19@@ -2323,7 +2323,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
20
21 buffer_temp = surface->front_wl_buffer;
22 surface->front_wl_buffer = surface->back_wl_buffer;
23- surface->back_wl_buffer = buffer_temp;
24+ surface->back_wl_buffer = surface->middle_wl_buffer;
25+ surface->middle_wl_buffer = buffer_temp;
26
27 configid = egl_config_to_id(surface->config);
28 color = egl_config_get_color_format(configid);
29diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
30index 9a9582c..10b3b04 100644
31--- a/interface/khronos/egl/egl_client_surface.c
32+++ b/interface/khronos/egl/egl_client_surface.c
33@@ -402,12 +402,14 @@ EGL_SURFACE_T *egl_surface_create(
34 if (type == WINDOW && wl_display) {
35 surface->wl_egl_window = (struct wl_egl_window*)win;
36 surface->front_wl_buffer = NULL;
37+ surface->middle_wl_buffer = NULL;
38 surface->back_wl_buffer = allocate_wl_buffer(
39 surface->wl_egl_window, color);
40 resource = surface->back_wl_buffer->resource;
41 } else {
42 surface->wl_egl_window = NULL;
43 surface->front_wl_buffer = NULL;
44+ surface->middle_wl_buffer = NULL;
45 surface->back_wl_buffer = NULL;
46 resource = DISPMANX_NO_HANDLE;
47 }
48@@ -696,6 +698,12 @@ void egl_surface_free(EGL_SURFACE_T *surface)
49 surface->back_wl_buffer = 0;
50 }
51
52+ if (surface->middle_wl_buffer) {
53+ wl_buffer_destroy(surface->middle_wl_buffer->wl_buffer);
54+ free(surface->middle_wl_buffer);
55+ surface->middle_wl_buffer = 0;
56+ }
57+
58 if (surface->front_wl_buffer) {
59 wl_buffer_destroy(surface->front_wl_buffer->wl_buffer);
60 free(surface->front_wl_buffer);
61diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
62index e328b77..58a3184 100644
63--- a/interface/khronos/egl/egl_client_surface.h
64+++ b/interface/khronos/egl/egl_client_surface.h
65@@ -313,6 +313,17 @@ typedef struct {
66 struct wl_dispmanx_client_buffer *front_wl_buffer;
67
68 /*
69+ middle_wl_buffer
70+
71+ Validity:
72+ type == WINDOW
73+
74+ Invariant:
75+ client-side information about the wl_buffer in the middle
76+ */
77+ struct wl_dispmanx_client_buffer *middle_wl_buffer;
78+
79+ /*
80 back_wl_buffer
81
82 Validity:
83--
842.7.1
85
diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb
index a37249c..5344dc3 100644
--- a/recipes-graphics/userland/userland_git.bb
+++ b/recipes-graphics/userland/userland_git.bb
@@ -16,7 +16,7 @@ COMPATIBLE_MACHINE = "raspberrypi"
16 16
17SRCBRANCH = "master" 17SRCBRANCH = "master"
18SRCFORK = "raspberrypi" 18SRCFORK = "raspberrypi"
19SRCREV = "bb15afe33b313fe045d52277a78653d288e04f67" 19SRCREV = "338428cf852c658e39987c06b845cb6332394109"
20 20
21SRC_URI = "\ 21SRC_URI = "\
22 git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ 22 git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
@@ -32,6 +32,7 @@ SRC_URI = "\
32 file://0010-Fix-for-framerate-with-nested-composition.patch \ 32 file://0010-Fix-for-framerate-with-nested-composition.patch \
33 file://0011-build-shared-library-for-vchostif.patch \ 33 file://0011-build-shared-library-for-vchostif.patch \
34 file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \ 34 file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \
35 file://0013-Implement-triple-buffering-for-wayland.patch \
35" 36"
36S = "${WORKDIR}/git" 37S = "${WORKDIR}/git"
37 38