summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel A. Vico2017-02-27 16:17:02 -0800
committerMiguel A. Vico2017-02-27 16:34:57 -0800
commit0c13397cfb664feded35ae04f83dac78fb7f60bc (patch)
tree6fb7e205805359f0689c6172d5e8119f1c625a91
parent0351b429af478ee4c2b90520bf793438c3526490 (diff)
downloadaur-0c13397cfb664feded35ae04f83dac78fb7f60bc.tar.gz
Update to weston 2.0.0
Some of the patches are no longer required as they were merged upstream. The rest were rebased on top of weston 2.0.0 and conflicts resolved. Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com>
-rw-r--r--.SRCINFO69
-rw-r--r--0001-gl-renderer-Add-EGLDevice-enumeration-support.patch (renamed from 0007-gl-renderer-Add-EGLDevice-enumeration-support.patch)28
-rw-r--r--0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch131
-rw-r--r--0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch (renamed from 0008-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch)77
-rw-r--r--0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch150
-rw-r--r--0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch (renamed from 0009-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch)52
-rw-r--r--0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch85
-rw-r--r--0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch (renamed from 0010-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch)16
-rw-r--r--0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch98
-rw-r--r--0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch (renamed from 0011-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch)170
-rw-r--r--0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch32
-rw-r--r--0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch168
-rw-r--r--0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch168
-rw-r--r--0007-Add-nvidia-release-notes-file.patch42
-rw-r--r--0012-Add-nvidia-release-notes-file.patch37
-rw-r--r--PKGBUILD76
16 files changed, 457 insertions, 942 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f8d7badb7a16..c532e25377a2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,50 +1,55 @@
pkgbase = weston-eglstream
pkgdesc = Reference implementation of a Wayland compositor with EGLStream support
- pkgver = 1.12.0
- pkgrel = 2
- url = http://wayland.freedesktop.org
+ pkgver = 2.0.0
+ pkgrel = 1
+ url = https://wayland.freedesktop.org/
arch = i686
arch = x86_64
license = MIT
makedepends = wayland-protocols
+ depends = glibc
depends = wayland
depends = libxkbcommon
depends = libinput
depends = libunwind
- depends = poppler-glib
+ depends = pixman
+ depends = libdrm
+ depends = pam
+ depends = libsystemd
+ depends = cairo
+ depends = libpng
+ depends = libjpeg-turbo
+ depends = libwebp
+ depends = libegl
+ depends = libgles
+ depends = glib2
+ depends = pango
+ depends = lcms2
depends = mtdev
+ depends = libx11
+ depends = libxcb
+ depends = dbus
+ depends = libva
depends = libxcursor
- depends = glu
- depends = pango
depends = colord
provides = weston
conflicts = weston
- source = http://wayland.freedesktop.org/releases/weston-1.12.0.tar.xz
- source = 0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch
- source = 0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch
- source = 0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch
- source = 0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch
- source = 0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch
- source = 0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch
- source = 0007-gl-renderer-Add-EGLDevice-enumeration-support.patch
- source = 0008-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
- source = 0009-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
- source = 0010-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
- source = 0011-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
- source = 0012-Add-nvidia-release-notes-file.patch
- sha256sums = ac7ac2a32e3b9f50131fccded5d2326bd36b2226712d90b61999118a09af5033
- sha256sums = dc51d39b460385eff7694f11aa3096896a58246f0d0ffdcd77ac9d07bf4781d7
- sha256sums = e9088f7fa816d8c04bfa0abfcbb0c33b436cea157efce03663202131bcf8a053
- sha256sums = 2abc0c12a7c3465c2289e6940f538cf6cb46f4f9c57eff1884b15134a460ef2e
- sha256sums = 9e9cb4ee001d62c09753994225d944b3eb90788d29b69b1d3ffead38c09c8934
- sha256sums = 7492e7d6b3d4d8a95433cbc845117746e48047794422c28b37c16fe60078a6f8
- sha256sums = d7ae91ed894a17d578371be877ebd0ab2204522f5f17388ea3ef0714afe85bba
- sha256sums = 1a703d7743b55ccbe934389b1c4430f4f4535f4864439b86097b80d1b42e7e2c
- sha256sums = d5a8fddd8ddae650a283915478e8d41669a1dcc953df4317b5d178e14221fa4a
- sha256sums = fb759e98bffb406904366b735f7f50f2726a2a1c6700a9cf544d4c763f46bbfa
- sha256sums = 8b6ef50772bf02adb951266ad5d973a701dd147fc168d8d6fa7cbafe0900dbda
- sha256sums = 7838e7de7ac5b7fe4e98392235907333d4977939a487ff4cf2a2bd8756fc49cb
- sha256sums = f916ded74db76cfe3566654b5dc5a90b214a1572ffd7c15aa5e577ceabc22ab4
+ source = https://wayland.freedesktop.org/releases/weston-2.0.0.tar.xz
+ source = 0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
+ source = 0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
+ source = 0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
+ source = 0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
+ source = 0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
+ source = 0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
+ source = 0007-Add-nvidia-release-notes-file.patch
+ sha256sums = b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8
+ sha256sums = c81d07f0a2b26e772faa02e4b088ff979206216652a4c30beb9aa24631d9d648
+ sha256sums = c32048c7b1e57c24ca7fa665c9e70bc3c12dec338aea3643b637bf8d30188335
+ sha256sums = fabb4ca507b0a5978ebc7f635989637ccfbdeee9b84119bc6588028342913856
+ sha256sums = db56a9f0d09441af58d530130e5f04f7066d11a32cdd99522e39a19ee4ee9f46
+ sha256sums = 8087849a01853e5c69fad7c9821e2202fd78ffe904626fe2f9ff51e83816ed02
+ sha256sums = 3bb9b0a354aa07fb3eb89ad9b7e425b1ce980b1bd0b90166a41795a80acc78ca
+ sha256sums = 47fc9f44083096299e1502cf15c93d9f8670e1a4e4784870d7a843d4de09d502
pkgname = weston-eglstream
diff --git a/0007-gl-renderer-Add-EGLDevice-enumeration-support.patch b/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
index 59597b09ebb1..198d94a6ef81 100644
--- a/0007-gl-renderer-Add-EGLDevice-enumeration-support.patch
+++ b/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
@@ -1,7 +1,7 @@
-From e57c601797288a2391a3ef177cb3681f2f6ca167 Mon Sep 17 00:00:00 2001
+From d178c1add79d48cd639bf5c387067c0e4d5fae09 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Mon, 2 May 2016 15:56:37 +0200
-Subject: [PATCH 07/12] gl-renderer: Add EGLDevice enumeration support
+Subject: [PATCH 1/7] gl-renderer: Add EGLDevice enumeration support
X-NVConfidentiality: public
EGLDevice provides means to enumerate native devices.
@@ -18,14 +18,14 @@ Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
libweston/gl-renderer.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++-
- libweston/gl-renderer.h | 7 ++++
- 2 files changed, 95 insertions(+), 1 deletion(-)
+ libweston/gl-renderer.h | 8 +++++
+ 2 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 508f8b92797e..9ef115ae092f 100644
+index c6091af0..7a840a35 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
-@@ -3208,6 +3208,90 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
+@@ -3357,6 +3357,90 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
return 0;
}
@@ -116,7 +116,7 @@ index 508f8b92797e..9ef115ae092f 100644
WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.opaque_attribs = gl_renderer_opaque_attribs,
.alpha_attribs = gl_renderer_alpha_attribs,
-@@ -3218,5 +3302,8 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
+@@ -3367,5 +3451,8 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.output_destroy = gl_renderer_output_destroy,
.output_surface = gl_renderer_output_surface,
.output_set_border = gl_renderer_output_set_border,
@@ -127,10 +127,18 @@ index 508f8b92797e..9ef115ae092f 100644
+ .get_drm_device_file = gl_renderer_get_drm_device_file
};
diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index b47ea07feaf0..2840ee5bea28 100644
+index b47ea07f..9ff4e21e 100644
--- a/libweston/gl-renderer.h
+++ b/libweston/gl-renderer.h
-@@ -114,5 +114,12 @@ struct gl_renderer_interface {
+@@ -38,6 +38,7 @@
+
+ typedef int EGLint;
+ typedef int EGLenum;
++typedef void *EGLDeviceEXT;
+ typedef void *EGLDisplay;
+ typedef void *EGLSurface;
+ typedef void *EGLConfig;
+@@ -114,5 +115,12 @@ struct gl_renderer_interface {
int32_t tex_width, unsigned char *data);
void (*print_egl_error_state)(void);
@@ -144,5 +152,5 @@ index b47ea07feaf0..2840ee5bea28 100644
};
--
-2.10.2
+2.11.1
diff --git a/0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch b/0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch
deleted file mode 100644
index 6d53946b0412..000000000000
--- a/0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From b573a9c1037449125398c49578e286f2da6dcc29 Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Wed, 30 Mar 2016 15:44:09 +0200
-Subject: [PATCH 01/12] gl-renderer: Rename gl_renderer_create to
- gl_renderer_display_create
-X-NVConfidentiality: public
-
-No functional change. This patch only renames gl_renderer_create() to
-gl_renderer_display_create(), which is something more descriptive of
-what the function does.
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
-Reviewed-by: James Jones <jajones@nvidia.com>
----
- libweston/compositor-drm.c | 12 ++++++------
- libweston/compositor-wayland.c | 12 ++++++------
- libweston/compositor-x11.c | 5 +++--
- libweston/gl-renderer.c | 4 ++--
- libweston/gl-renderer.h | 12 ++++++------
- 5 files changed, 23 insertions(+), 22 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 8319d7cf3ede..c6ec767489ee 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -1619,12 +1619,12 @@ drm_backend_create_gl_renderer(struct drm_backend *b)
-
- if (format[1])
- n_formats = 3;
-- if (gl_renderer->create(b->compositor,
-- EGL_PLATFORM_GBM_KHR,
-- (void *)b->gbm,
-- gl_renderer->opaque_attribs,
-- format,
-- n_formats) < 0) {
-+ if (gl_renderer->display_create(b->compositor,
-+ EGL_PLATFORM_GBM_KHR,
-+ (void *)b->gbm,
-+ gl_renderer->opaque_attribs,
-+ format,
-+ n_formats) < 0) {
- return -1;
- }
-
-diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
-index c223baa3db26..621e59ecac5a 100644
---- a/libweston/compositor-wayland.c
-+++ b/libweston/compositor-wayland.c
-@@ -2220,12 +2220,12 @@ wayland_backend_create(struct weston_compositor *compositor,
- }
-
- if (!b->use_pixman) {
-- if (gl_renderer->create(compositor,
-- EGL_PLATFORM_WAYLAND_KHR,
-- b->parent.wl_display,
-- gl_renderer->alpha_attribs,
-- NULL,
-- 0) < 0) {
-+ if (gl_renderer->display_create(compositor,
-+ EGL_PLATFORM_WAYLAND_KHR,
-+ b->parent.wl_display,
-+ gl_renderer->alpha_attribs,
-+ NULL,
-+ 0) < 0) {
- weston_log("Failed to initialize the GL renderer; "
- "falling back to pixman.\n");
- b->use_pixman = 1;
-diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
-index 3e0d20fbb768..84747a052d10 100644
---- a/libweston/compositor-x11.c
-+++ b/libweston/compositor-x11.c
-@@ -1582,8 +1582,9 @@ init_gl_renderer(struct x11_backend *b)
- if (!gl_renderer)
- return -1;
-
-- ret = gl_renderer->create(b->compositor, EGL_PLATFORM_X11_KHR, (void *) b->dpy,
-- gl_renderer->opaque_attribs, NULL, 0);
-+ ret = gl_renderer->display_create(b->compositor, EGL_PLATFORM_X11_KHR,
-+ (void *) b->dpy,
-+ gl_renderer->opaque_attribs, NULL, 0);
-
- return ret;
- }
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 031576bcf997..9d5d65b03e46 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -2890,7 +2890,7 @@ gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) {
- }
-
- static int
--gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
-+gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
- void *native_window, const EGLint *attribs,
- const EGLint *visual_id, int n_ids)
- {
-@@ -3181,7 +3181,7 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
- .opaque_attribs = gl_renderer_opaque_attribs,
- .alpha_attribs = gl_renderer_alpha_attribs,
-
-- .create = gl_renderer_create,
-+ .display_create = gl_renderer_display_create,
- .display = gl_renderer_display,
- .output_create = gl_renderer_output_create,
- .output_destroy = gl_renderer_output_destroy,
-diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index 37d000fefb85..32ba1536b60e 100644
---- a/libweston/gl-renderer.h
-+++ b/libweston/gl-renderer.h
-@@ -60,12 +60,12 @@ struct gl_renderer_interface {
- const EGLint *opaque_attribs;
- const EGLint *alpha_attribs;
-
-- int (*create)(struct weston_compositor *ec,
-- EGLenum platform,
-- void *native_window,
-- const EGLint *attribs,
-- const EGLint *visual_id,
-- const int n_ids);
-+ int (*display_create)(struct weston_compositor *ec,
-+ EGLenum platform,
-+ void *native_window,
-+ const EGLint *attribs,
-+ const EGLint *visual_id,
-+ const int n_ids);
-
- EGLDisplay (*display)(struct weston_compositor *ec);
-
---
-2.10.2
-
diff --git a/0008-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch b/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
index 032d2b12b75a..b336c0632945 100644
--- a/0008-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
+++ b/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
@@ -1,7 +1,7 @@
-From 34433e17e968229bce5eca51946fb85fcbc69f3d Mon Sep 17 00:00:00 2001
+From b67b64f6c7565a88558f1398895830394b887ee3 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Mon, 2 May 2016 16:34:01 +0200
-Subject: [PATCH 08/12] gl-renderer: Add support for EGLDevice composited frame
+Subject: [PATCH 2/7] gl-renderer: Add support for EGLDevice composited frame
presentation
X-NVConfidentiality: public
@@ -42,13 +42,13 @@ Reviewed-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
- libweston/gl-renderer.c | 262 ++++++++++++++++++++++++++++++++++++++++++++-
- libweston/gl-renderer.h | 16 +++
- libweston/weston-egl-ext.h | 38 +++++++
- 3 files changed, 313 insertions(+), 3 deletions(-)
+ libweston/gl-renderer.c | 262 +++++++++++++++++++++++++++++++++++++++++++++++-
+ libweston/gl-renderer.h | 16 +++
+ shared/weston-egl-ext.h | 40 ++++++++
+ 3 files changed, 315 insertions(+), 3 deletions(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 9ef115ae092f..a0efea2ed648 100644
+index 7a840a35..498a14bd 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -86,6 +86,8 @@ struct gl_output_state {
@@ -60,7 +60,7 @@ index 9ef115ae092f..a0efea2ed648 100644
struct weston_matrix output_matrix;
};
-@@ -204,6 +206,28 @@ struct gl_renderer {
+@@ -209,6 +211,28 @@ struct gl_renderer {
int has_surfaceless_context;
@@ -89,7 +89,7 @@ index 9ef115ae092f..a0efea2ed648 100644
int has_dmabuf_import;
struct wl_list dmabuf_images;
-@@ -1189,6 +1213,38 @@ gl_renderer_repaint_output(struct weston_output *output,
+@@ -1196,6 +1220,38 @@ gl_renderer_repaint_output(struct weston_output *output,
}
static int
@@ -128,7 +128,7 @@ index 9ef115ae092f..a0efea2ed648 100644
gl_renderer_read_pixels(struct weston_output *output,
pixman_format_code_t format, void *pixels,
uint32_t x, uint32_t y,
-@@ -2584,9 +2640,93 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
+@@ -2699,9 +2755,93 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
return egl_surface;
}
@@ -223,7 +223,7 @@ index 9ef115ae092f..a0efea2ed648 100644
{
struct gl_output_state *go;
int i;
-@@ -2596,6 +2736,7 @@ gl_renderer_output_create(struct weston_output *output,
+@@ -2711,6 +2851,7 @@ gl_renderer_output_create(struct weston_output *output,
return -1;
go->egl_surface = surface;
@@ -231,14 +231,14 @@ index 9ef115ae092f..a0efea2ed648 100644
for (i = 0; i < BUFFER_DAMAGE_COUNT; i++)
pixman_region32_init(&go->buffer_damage[i]);
-@@ -2628,13 +2769,41 @@ gl_renderer_output_window_create(struct weston_output *output,
+@@ -2743,13 +2884,41 @@ gl_renderer_output_window_create(struct weston_output *output,
return -1;
}
- ret = gl_renderer_output_create(output, egl_surface);
+ ret = gl_renderer_output_create(output, egl_surface, EGL_NO_STREAM_KHR);
if (ret < 0)
- eglDestroySurface(gr->egl_display, egl_surface);
+ weston_platform_destroy_egl_surface(gr->egl_display, egl_surface);
return ret;
}
@@ -274,9 +274,9 @@ index 9ef115ae092f..a0efea2ed648 100644
static void
gl_renderer_output_destroy(struct weston_output *output)
{
-@@ -2647,6 +2816,9 @@ gl_renderer_output_destroy(struct weston_output *output)
+@@ -2766,6 +2935,9 @@ gl_renderer_output_destroy(struct weston_output *output)
- eglDestroySurface(gr->egl_display, go->egl_surface);
+ weston_platform_destroy_egl_surface(gr->egl_display, go->egl_surface);
+ if (go->egl_stream != EGL_NO_STREAM_KHR)
+ gr->destroy_stream(gr->egl_display, go->egl_stream);
@@ -284,7 +284,7 @@ index 9ef115ae092f..a0efea2ed648 100644
free(go);
}
-@@ -2728,6 +2900,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -2861,6 +3033,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
(void *) eglGetProcAddress("eglUnbindWaylandDisplayWL");
gr->query_buffer =
(void *) eglGetProcAddress("eglQueryWaylandBufferWL");
@@ -304,9 +304,9 @@ index 9ef115ae092f..a0efea2ed648 100644
extensions =
(const char *) eglQueryString(gr->egl_display, EGL_EXTENSIONS);
-@@ -2766,6 +2951,30 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
- if (weston_check_egl_extension(extensions, "EGL_EXT_image_dma_buf_import"))
- gr->has_dmabuf_import = 1;
+@@ -2911,6 +3096,30 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+ if (weston_check_egl_extension(extensions, "GL_EXT_texture_rg"))
+ gr->has_gl_texture_rg = 1;
+ if (weston_check_egl_extension(extensions, "EGL_EXT_output_base"))
+ gr->has_egl_output_base = 1;
@@ -335,7 +335,7 @@ index 9ef115ae092f..a0efea2ed648 100644
renderer_setup_egl_client_extensions(gr);
return 0;
-@@ -2791,6 +3000,15 @@ static const EGLint gl_renderer_alpha_attribs[] = {
+@@ -2936,6 +3145,15 @@ static const EGLint gl_renderer_alpha_attribs[] = {
EGL_NONE
};
@@ -351,7 +351,7 @@ index 9ef115ae092f..a0efea2ed648 100644
/** Checks whether a platform EGL client extension is supported
*
-@@ -2864,6 +3082,8 @@ platform_to_extension(EGLenum platform)
+@@ -3009,6 +3227,8 @@ platform_to_extension(EGLenum platform)
return "wayland";
case EGL_PLATFORM_X11_KHR:
return "x11";
@@ -360,7 +360,7 @@ index 9ef115ae092f..a0efea2ed648 100644
default:
assert(0 && "bad EGL platform enum");
}
-@@ -3000,6 +3220,38 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -3145,6 +3365,38 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
if (gl_renderer_setup_egl_extensions(ec) < 0)
goto fail_with_error;
@@ -399,7 +399,7 @@ index 9ef115ae092f..a0efea2ed648 100644
wl_list_init(&gr->dmabuf_images);
if (gr->has_dmabuf_import)
gr->base.import_dmabuf = gl_renderer_import_dmabuf;
-@@ -3295,15 +3547,19 @@ gl_renderer_get_drm_device_file(EGLDeviceEXT device,
+@@ -3444,15 +3696,19 @@ gl_renderer_get_drm_device_file(EGLDeviceEXT device,
WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.opaque_attribs = gl_renderer_opaque_attribs,
.alpha_attribs = gl_renderer_alpha_attribs,
@@ -421,10 +421,10 @@ index 9ef115ae092f..a0efea2ed648 100644
+ .output_stream_flip = gl_renderer_output_stream_flip
};
diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index 2840ee5bea28..6e2fd34f4257 100644
+index 9ff4e21e..39ea3b42 100644
--- a/libweston/gl-renderer.h
+++ b/libweston/gl-renderer.h
-@@ -59,6 +59,7 @@ enum gl_renderer_border_side {
+@@ -60,6 +60,7 @@ enum gl_renderer_border_side {
struct gl_renderer_interface {
const EGLint *opaque_attribs;
const EGLint *alpha_attribs;
@@ -432,7 +432,7 @@ index 2840ee5bea28..6e2fd34f4257 100644
int (*display_create)(struct weston_compositor *ec,
EGLenum platform,
-@@ -77,6 +78,9 @@ struct gl_renderer_interface {
+@@ -78,6 +79,9 @@ struct gl_renderer_interface {
const EGLint *visual_id,
const int n_ids);
@@ -442,7 +442,7 @@ index 2840ee5bea28..6e2fd34f4257 100644
void (*output_destroy)(struct weston_output *output);
EGLSurface (*output_surface)(struct weston_output *output);
-@@ -121,5 +125,17 @@ struct gl_renderer_interface {
+@@ -122,5 +126,17 @@ struct gl_renderer_interface {
int (*get_drm_device_file)(EGLDeviceEXT device,
const char **drm_device_file);
@@ -460,11 +460,11 @@ index 2840ee5bea28..6e2fd34f4257 100644
+ void *flip_data);
};
-diff --git a/libweston/weston-egl-ext.h b/libweston/weston-egl-ext.h
-index 6e3699602b5b..709c80959b66 100644
---- a/libweston/weston-egl-ext.h
-+++ b/libweston/weston-egl-ext.h
-@@ -152,5 +152,43 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
+diff --git a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h
+index f3e6dcea..1c3fec1c 100644
+--- a/shared/weston-egl-ext.h
++++ b/shared/weston-egl-ext.h
+@@ -158,12 +158,52 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
#define EGL_PLATFORM_X11_KHR 0x31D5
#endif
@@ -506,8 +506,17 @@ index 6e3699602b5b..709c80959b66 100644
+#define EGL_NV_output_drm_flip_event 1
+#define EGL_DRM_FLIP_EVENT_DATA_NV 0x333E
+#endif /* EGL_NV_output_drm_flip_event */
++
+ #else /* ENABLE_EGL */
+
+ /* EGL platform definition are keept to allow compositor-xx.c to build */
+ #define EGL_PLATFORM_GBM_KHR 0x31D7
+ #define EGL_PLATFORM_WAYLAND_KHR 0x31D8
+ #define EGL_PLATFORM_X11_KHR 0x31D5
++#define EGL_PLATFORM_DEVICE_EXT 0x313F
+
+ #endif /* ENABLE_EGL */
- #endif
--
-2.10.2
+2.11.1
diff --git a/0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch b/0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch
deleted file mode 100644
index 16d54ff7c08b..000000000000
--- a/0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 91a4ade03a1d92f275a046dcf1b616b551e8bbc5 Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Wed, 30 Mar 2016 15:09:14 +0200
-Subject: [PATCH 02/12] gl-renderer: Rename gl_renderer::output_create to
- output_window_create
-X-NVConfidentiality: public
-
-No functional change. This patch renames gl_renderer_output_create() to
-gl_renderer_output_window_create(), which is something more descriptive
-of what the function does.
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
-Reviewed-by: Andy Ritger <aritger@nvidia.com>
-Reviewed-by: James Jones <jajones@nvidia.com>
----
- libweston/compositor-drm.c | 12 ++++++------
- libweston/compositor-wayland.c | 12 ++++++------
- libweston/compositor-x11.c | 13 +++++++------
- libweston/gl-renderer.c | 14 +++++++-------
- libweston/gl-renderer.h | 12 ++++++------
- 5 files changed, 32 insertions(+), 31 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index c6ec767489ee..d10734a6e777 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -1886,12 +1886,12 @@ drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
-
- if (format[1])
- n_formats = 2;
-- if (gl_renderer->output_create(&output->base,
-- (EGLNativeWindowType)output->gbm_surface,
-- output->gbm_surface,
-- gl_renderer->opaque_attribs,
-- format,
-- n_formats) < 0) {
-+ if (gl_renderer->output_window_create(&output->base,
-+ (EGLNativeWindowType)output->gbm_surface,
-+ output->gbm_surface,
-+ gl_renderer->opaque_attribs,
-+ format,
-+ n_formats) < 0) {
- weston_log("failed to create gl renderer output state\n");
- gbm_surface_destroy(output->gbm_surface);
- return -1;
-diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
-index 621e59ecac5a..6370f6a2ecb3 100644
---- a/libweston/compositor-wayland.c
-+++ b/libweston/compositor-wayland.c
-@@ -671,12 +671,12 @@ wayland_output_init_gl_renderer(struct wayland_output *output)
- return -1;
- }
-
-- if (gl_renderer->output_create(&output->base,
-- output->gl.egl_window,
-- output->gl.egl_window,
-- gl_renderer->alpha_attribs,
-- NULL,
-- 0) < 0)
-+ if (gl_renderer->output_window_create(&output->base,
-+ output->gl.egl_window,
-+ output->gl.egl_window,
-+ gl_renderer->alpha_attribs,
-+ NULL,
-+ 0) < 0)
- goto cleanup_window;
-
- return 0;
-diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
-index 84747a052d10..ef98f74bb9da 100644
---- a/libweston/compositor-x11.c
-+++ b/libweston/compositor-x11.c
-@@ -953,12 +953,13 @@ x11_backend_create_output(struct x11_backend *b, int x, int y,
- * but eglCreateWindowSurface takes a Window. */
- Window xid = (Window) output->window;
-
-- ret = gl_renderer->output_create(&output->base,
-- (EGLNativeWindowType) output->window,
-- &xid,
-- gl_renderer->opaque_attribs,
-- NULL,
-- 0);
-+ ret = gl_renderer->output_window_create(
-+ &output->base,
-+ (EGLNativeWindowType) output->window,
-+ &xid,
-+ gl_renderer->opaque_attribs,
-+ NULL,
-+ 0);
- if (ret < 0)
- return NULL;
- }
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 9d5d65b03e46..7e6a707406ad 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -2544,12 +2544,12 @@ static int
- gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface);
-
- static int
--gl_renderer_output_create(struct weston_output *output,
-- EGLNativeWindowType window_for_legacy,
-- void *window_for_platform,
-- const EGLint *attribs,
-- const EGLint *visual_id,
-- int n_ids)
-+gl_renderer_output_window_create(struct weston_output *output,
-+ EGLNativeWindowType window_for_legacy,
-+ void *window_for_platform,
-+ const EGLint *attribs,
-+ const EGLint *visual_id,
-+ int n_ids)
- {
- struct weston_compositor *ec = output->compositor;
- struct gl_renderer *gr = get_renderer(ec);
-@@ -3183,7 +3183,7 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
-
- .display_create = gl_renderer_display_create,
- .display = gl_renderer_display,
-- .output_create = gl_renderer_output_create,
-+ .output_window_create = gl_renderer_output_window_create,
- .output_destroy = gl_renderer_output_destroy,
- .output_surface = gl_renderer_output_surface,
- .output_set_border = gl_renderer_output_set_border,
-diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index 32ba1536b60e..ee32790463aa 100644
---- a/libweston/gl-renderer.h
-+++ b/libweston/gl-renderer.h
-@@ -69,12 +69,12 @@ struct gl_renderer_interface {
-
- EGLDisplay (*display)(struct weston_compositor *ec);
-
-- int (*output_create)(struct weston_output *output,
-- EGLNativeWindowType window_for_legacy,
-- void *window_for_platform,
-- const EGLint *attribs,
-- const EGLint *visual_id,
-- const int n_ids);
-+ int (*output_window_create)(struct weston_output *output,
-+ EGLNativeWindowType window_for_legacy,
-+ void *window_for_platform,
-+ const EGLint *attribs,
-+ const EGLint *visual_id,
-+ const int n_ids);
-
- void (*output_destroy)(struct weston_output *output);
-
---
-2.10.2
-
diff --git a/0009-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch b/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
index c8700ce21a1d..aa42a095ebd1 100644
--- a/0009-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
+++ b/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
@@ -1,7 +1,7 @@
-From decfa267d12c6b48720e5263c71011b64638bbda Mon Sep 17 00:00:00 2001
+From aa3aee0503249a0d667dba1001b292b3907fad18 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Mon, 2 May 2016 18:22:47 +0200
-Subject: [PATCH 09/12] gl-renderer: Add EGL client support for EGLStream frame
+Subject: [PATCH 3/7] gl-renderer: Add EGL client support for EGLStream frame
presentation
X-NVConfidentiality: public
@@ -24,17 +24,17 @@ Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
- libweston/gl-renderer.c | 183 ++++++++++++++++++++++++++++++++++++++++++++-
- libweston/weston-egl-ext.h | 5 ++
+ libweston/gl-renderer.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++-
+ shared/weston-egl-ext.h | 5 ++
2 files changed, 187 insertions(+), 1 deletion(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index a0efea2ed648..a3440fc7162c 100644
+index 498a14bd..6bcfe40f 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
-@@ -163,6 +163,9 @@ struct gl_surface_state {
- int height; /* in pixels */
- int y_inverted;
+@@ -168,6 +168,9 @@ struct gl_surface_state {
+ int hsub[3]; /* horizontal subsampling per plane */
+ int vsub[3]; /* vertical subsampling per plane */
+ EGLStreamKHR egl_stream;
+ bool new_stream;
@@ -42,7 +42,7 @@ index a0efea2ed648..a3440fc7162c 100644
struct weston_surface *surface;
struct wl_listener surface_destroy_listener;
-@@ -214,6 +217,7 @@ struct gl_renderer {
+@@ -219,6 +222,7 @@ struct gl_renderer {
PFNEGLCREATESTREAMKHRPROC create_stream;
PFNEGLDESTROYSTREAMKHRPROC destroy_stream;
@@ -50,7 +50,7 @@ index a0efea2ed648..a3440fc7162c 100644
int has_egl_stream;
PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC create_stream_producer_surface;
-@@ -223,11 +227,16 @@ struct gl_renderer {
+@@ -228,11 +232,16 @@ struct gl_renderer {
int has_egl_stream_consumer_egloutput;
#ifdef EGL_NV_stream_attrib
@@ -67,7 +67,7 @@ index a0efea2ed648..a3440fc7162c 100644
int has_dmabuf_import;
struct wl_list dmabuf_images;
-@@ -1936,6 +1945,145 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
+@@ -2050,6 +2059,145 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
gs->y_inverted = buffer->y_inverted;
}
@@ -213,7 +213,7 @@ index a0efea2ed648..a3440fc7162c 100644
static void
gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
{
-@@ -1959,6 +2107,12 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
+@@ -2073,6 +2221,12 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
gs->num_textures = 0;
gs->buffer_type = BUFFER_TYPE_NULL;
gs->y_inverted = 1;
@@ -226,7 +226,7 @@ index a0efea2ed648..a3440fc7162c 100644
return;
}
-@@ -1971,7 +2125,7 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
+@@ -2086,7 +2240,7 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
gl_renderer_attach_egl(es, buffer, format);
else if ((dmabuf = linux_dmabuf_buffer_get(buffer->resource)))
gl_renderer_attach_dmabuf(es, buffer, dmabuf);
@@ -235,7 +235,7 @@ index a0efea2ed648..a3440fc7162c 100644
weston_log("unhandled buffer type!\n");
weston_buffer_reference(&gs->buffer_ref, NULL);
gs->buffer_type = BUFFER_TYPE_NULL;
-@@ -2159,6 +2313,10 @@ surface_state_destroy(struct gl_surface_state *gs, struct gl_renderer *gr)
+@@ -2274,6 +2428,10 @@ surface_state_destroy(struct gl_surface_state *gs, struct gl_renderer *gr)
weston_buffer_reference(&gs->buffer_ref, NULL);
pixman_region32_fini(&gs->texture_damage);
@@ -246,7 +246,7 @@ index a0efea2ed648..a3440fc7162c 100644
free(gs);
}
-@@ -2209,6 +2367,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
+@@ -2324,6 +2482,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
gs->surface = surface;
@@ -255,7 +255,7 @@ index a0efea2ed648..a3440fc7162c 100644
pixman_region32_init(&gs->texture_damage);
surface->renderer_state = gs;
-@@ -2905,14 +3065,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3038,14 +3198,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
(void *) eglGetProcAddress("eglQueryOutputLayerAttribEXT");
gr->create_stream = (void *) eglGetProcAddress("eglCreateStreamKHR");
gr->destroy_stream = (void *) eglGetProcAddress("eglDestroyStreamKHR");
@@ -275,7 +275,7 @@ index a0efea2ed648..a3440fc7162c 100644
extensions =
(const char *) eglQueryString(gr->egl_display, EGL_EXTENSIONS);
-@@ -2975,6 +3140,12 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3120,6 +3285,12 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
if (weston_check_egl_extension(extensions, "EGL_EXT_stream_acquire_mode"))
gr->has_egl_stream_acquire_mode = 1;
@@ -288,7 +288,7 @@ index a0efea2ed648..a3440fc7162c 100644
renderer_setup_egl_client_extensions(gr);
return 0;
-@@ -3247,6 +3418,16 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -3392,6 +3563,16 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
goto fail_terminate;
}
@@ -305,11 +305,11 @@ index a0efea2ed648..a3440fc7162c 100644
if (!gr->has_egl_output_drm_flip_event)
weston_log("warning: EGL page flip event notification "
"not supported\n");
-diff --git a/libweston/weston-egl-ext.h b/libweston/weston-egl-ext.h
-index 709c80959b66..f5ae44848fee 100644
---- a/libweston/weston-egl-ext.h
-+++ b/libweston/weston-egl-ext.h
-@@ -191,4 +191,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
+diff --git a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h
+index 1c3fec1c..11e9ccc1 100644
+--- a/shared/weston-egl-ext.h
++++ b/shared/weston-egl-ext.h
+@@ -197,6 +197,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
#define EGL_DRM_FLIP_EVENT_DATA_NV 0x333E
#endif /* EGL_NV_output_drm_flip_event */
@@ -318,7 +318,9 @@ index 709c80959b66..f5ae44848fee 100644
+#define EGL_WAYLAND_EGLSTREAM_WL 0x334B
+#endif /* EGL_WL_wayland_eglstream */
+
- #endif
+ #else /* ENABLE_EGL */
+
+ /* EGL platform definition are keept to allow compositor-xx.c to build */
--
-2.10.2
+2.11.1
diff --git a/0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch b/0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch
deleted file mode 100644
index 906d98d37c5f..000000000000
--- a/0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 12f63391c5a05d1b6176ac91d8a00b3e9982f996 Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Wed, 30 Mar 2016 15:23:49 +0200
-Subject: [PATCH 03/12] gl-renderer: Rename <attribs> param of gl_renderer to
- <config_attribs>
-X-NVConfidentiality: public
-
-In preparation for follow-on changes to support frame presentation
-through EGLDevice+EGLOutput, this change renames <attribs> parameter
-of gl_renderer_display_create() and gl_renderer_output_window_create()
-to <config_attribs>
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
-Reviewed-by: Andy Ritger <aritger@nvidia.com>
-Reviewed-by: James Jones <jajones@nvidia.com>
----
- libweston/gl-renderer.c | 8 ++++----
- libweston/gl-renderer.h | 4 ++--
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 7e6a707406ad..bb5c079eed92 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -2547,7 +2547,7 @@ static int
- gl_renderer_output_window_create(struct weston_output *output,
- EGLNativeWindowType window_for_legacy,
- void *window_for_platform,
-- const EGLint *attribs,
-+ const EGLint *config_attribs,
- const EGLint *visual_id,
- int n_ids)
- {
-@@ -2557,7 +2557,7 @@ gl_renderer_output_window_create(struct weston_output *output,
- EGLConfig egl_config;
- int i;
-
-- if (egl_choose_config(gr, attribs, visual_id,
-+ if (egl_choose_config(gr, config_attribs, visual_id,
- n_ids, &egl_config) == -1) {
- weston_log("failed to choose EGL config for output\n");
- return -1;
-@@ -2891,7 +2891,7 @@ gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) {
-
- static int
- gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
-- void *native_window, const EGLint *attribs,
-+ void *native_window, const EGLint *config_attribs,
- const EGLint *visual_id, int n_ids)
- {
- struct gl_renderer *gr;
-@@ -2955,7 +2955,7 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
- goto fail_with_error;
- }
-
-- if (egl_choose_config(gr, attribs, visual_id,
-+ if (egl_choose_config(gr, config_attribs, visual_id,
- n_ids, &gr->egl_config) < 0) {
- weston_log("failed to choose EGL config\n");
- goto fail_terminate;
-diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index ee32790463aa..1835d2536670 100644
---- a/libweston/gl-renderer.h
-+++ b/libweston/gl-renderer.h
-@@ -63,7 +63,7 @@ struct gl_renderer_interface {
- int (*display_create)(struct weston_compositor *ec,
- EGLenum platform,
- void *native_window,
-- const EGLint *attribs,
-+ const EGLint *config_attribs,
- const EGLint *visual_id,
- const int n_ids);
-
-@@ -72,7 +72,7 @@ struct gl_renderer_interface {
- int (*output_window_create)(struct weston_output *output,
- EGLNativeWindowType window_for_legacy,
- void *window_for_platform,
-- const EGLint *attribs,
-+ const EGLint *config_attribs,
- const EGLint *visual_id,
- const int n_ids);
-
---
-2.10.2
-
diff --git a/0010-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch b/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
index 355329e0f58d..fcbf8fe04c54 100644
--- a/0010-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
+++ b/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
@@ -1,8 +1,8 @@
-From e08b0882b29ce39ef67742a1caa53af4b6bb18bd Mon Sep 17 00:00:00 2001
+From d89c874ea121b6855c7bdf2e757fa13d0b04661f Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Tue, 1 Mar 2016 22:19:14 +0100
-Subject: [PATCH 10/12] compositor-drm: Gracefully handle vblank and flip
- invalid timestamps
+Subject: [PATCH 4/7] compositor-drm: Gracefully handle vblank and flip invalid
+ timestamps
X-NVConfidentiality: public
Instant query for vblank timestamp may always fail, resulting in
@@ -22,7 +22,7 @@ Reviewed-by: Andy Ritger <aritger@nvidia.com>
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index df357c3c809b..044633f7c740 100644
+index 1d38f051..12c1b8b5 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -1,6 +1,7 @@
@@ -33,7 +33,7 @@ index df357c3c809b..044633f7c740 100644
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -799,8 +800,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -825,8 +826,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
vbl.request.type |= drm_waitvblank_pipe(output);
ret = drmWaitVBlank(backend->drm.fd, &vbl);
@@ -52,7 +52,7 @@ index df357c3c809b..044633f7c740 100644
ts.tv_sec = vbl.reply.tval_sec;
ts.tv_nsec = vbl.reply.tval_usec * 1000;
-@@ -821,7 +830,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -847,7 +856,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
}
}
@@ -61,7 +61,7 @@ index df357c3c809b..044633f7c740 100644
* Use pageflip fallback.
*/
fb_id = output->current->fb_id;
-@@ -907,6 +916,19 @@ page_flip_handler(int fd, unsigned int frame,
+@@ -935,6 +944,19 @@ page_flip_handler(int fd, unsigned int frame,
else if (!output->vblank_pending) {
ts.tv_sec = sec;
ts.tv_nsec = usec * 1000;
@@ -82,5 +82,5 @@ index df357c3c809b..044633f7c740 100644
/* We can't call this from frame_notify, because the output's
--
-2.10.2
+2.11.1
diff --git a/0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch b/0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch
deleted file mode 100644
index 9e7097b0b3d7..000000000000
--- a/0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From d8ff7f97e20b05ae5889a42590df5614845d1f7f Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Wed, 30 Mar 2016 15:17:01 +0200
-Subject: [PATCH 04/12] gl-renderer: Add <platform_attribs> param to
- gl_renderer_display_create
-X-NVConfidentiality: public
-
-In preparation for follow-on changes to support frame presentation
-through EGLDevice+EGLOutput, this change adds <platform_attribs>
-parameter to gl_renderer_display_create().
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
-Reviewed-by: Andy Ritger <aritger@nvidia.com>
-Reviewed-by: James Jones <jajones@nvidia.com>
----
- libweston/compositor-drm.c | 1 +
- libweston/compositor-wayland.c | 1 +
- libweston/compositor-x11.c | 2 +-
- libweston/gl-renderer.c | 6 +++---
- libweston/gl-renderer.h | 1 +
- 5 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index d10734a6e777..df357c3c809b 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -1622,6 +1622,7 @@ drm_backend_create_gl_renderer(struct drm_backend *b)
- if (gl_renderer->display_create(b->compositor,
- EGL_PLATFORM_GBM_KHR,
- (void *)b->gbm,
-+ NULL,
- gl_renderer->opaque_attribs,
- format,
- n_formats) < 0) {
-diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
-index 6370f6a2ecb3..7655f8d3e4c8 100644
---- a/libweston/compositor-wayland.c
-+++ b/libweston/compositor-wayland.c
-@@ -2223,6 +2223,7 @@ wayland_backend_create(struct weston_compositor *compositor,
- if (gl_renderer->display_create(compositor,
- EGL_PLATFORM_WAYLAND_KHR,
- b->parent.wl_display,
-+ NULL,
- gl_renderer->alpha_attribs,
- NULL,
- 0) < 0) {
-diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
-index ef98f74bb9da..a8246b1ee221 100644
---- a/libweston/compositor-x11.c
-+++ b/libweston/compositor-x11.c
-@@ -1584,7 +1584,7 @@ init_gl_renderer(struct x11_backend *b)
- return -1;
-
- ret = gl_renderer->display_create(b->compositor, EGL_PLATFORM_X11_KHR,
-- (void *) b->dpy,
-+ (void *) b->dpy, NULL,
- gl_renderer->opaque_attribs, NULL, 0);
-
- return ret;
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index bb5c079eed92..736394a53eed 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -2891,8 +2891,8 @@ gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) {
-
- static int
- gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
-- void *native_window, const EGLint *config_attribs,
-- const EGLint *visual_id, int n_ids)
-+ void *native_window, const EGLint *platform_attribs,
-+ const EGLint *config_attribs, const EGLint *visual_id, int n_ids)
- {
- struct gl_renderer *gr;
- EGLint major, minor;
-@@ -2934,7 +2934,7 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
- if (get_platform_display && platform) {
- gr->egl_display = get_platform_display(platform,
- native_window,
-- NULL);
-+ platform_attribs);
- }
- }
-
-diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index 1835d2536670..b47ea07feaf0 100644
---- a/libweston/gl-renderer.h
-+++ b/libweston/gl-renderer.h
-@@ -63,6 +63,7 @@ struct gl_renderer_interface {
- int (*display_create)(struct weston_compositor *ec,
- EGLenum platform,
- void *native_window,
-+ const EGLint *platform_attribs,
- const EGLint *config_attribs,
- const EGLint *visual_id,
- const int n_ids);
---
-2.10.2
-
diff --git a/0011-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch b/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
index 90b2e289e6b5..7c1fe10bd5b5 100644
--- a/0011-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
+++ b/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
@@ -1,7 +1,7 @@
-From 8fbf890397fbd5ceecf6c11007ffb218c235689e Mon Sep 17 00:00:00 2001
+From b1db106d3c91c1b35a01573a455c5661a17a06ee Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Thu, 28 Jan 2016 19:37:10 +0100
-Subject: [PATCH 11/12] compositor-drm: Add support for EGLDevice+EGLOutput
+Subject: [PATCH 5/7] compositor-drm: Add support for EGLDevice+EGLOutput
X-NVConfidentiality: public
As previously stated, EGLDevice and EGLOutput will provide means
@@ -26,15 +26,17 @@ Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
compositor/main.c | 2 +
- libweston/compositor-drm.c | 327 ++++++++++++++++++++++++++++++++-------------
+ libweston/compositor-drm.c | 303 ++++++++++++++++++++++++++++++++-------------
libweston/compositor-drm.h | 4 +
- 3 files changed, 237 insertions(+), 96 deletions(-)
+ libweston/gl-renderer.h | 1 +
+ shared/weston-egl-ext.h | 9 ++
+ 5 files changed, 230 insertions(+), 89 deletions(-)
diff --git a/compositor/main.c b/compositor/main.c
-index 0e5af5b17fe6..9e9758253eeb 100644
+index 72c3cd10..ad348d82 100644
--- a/compositor/main.c
+++ b/compositor/main.c
-@@ -522,6 +522,7 @@ usage(int error_code)
+@@ -566,6 +566,7 @@ usage(int error_code)
" --seat=SEAT\t\tThe seat that weston should run on\n"
" --tty=TTY\t\tThe tty to use\n"
" --use-pixman\t\tUse the pixman (CPU) renderer\n"
@@ -42,30 +44,19 @@ index 0e5af5b17fe6..9e9758253eeb 100644
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n");
#endif
-@@ -1020,6 +1021,7 @@ load_drm_backend(struct weston_compositor *c,
+@@ -1227,6 +1228,7 @@ load_drm_backend(struct weston_compositor *c,
{ WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
- { WESTON_OPTION_BOOLEAN, "current-mode", 0, &config.use_current_mode },
+ { WESTON_OPTION_BOOLEAN, "current-mode", 0, &wet->drm_use_current_mode },
{ WESTON_OPTION_BOOLEAN, "use-pixman", 0, &config.use_pixman },
+ { WESTON_OPTION_BOOLEAN, "use-egldevice", 0, &config.use_egldevice },
};
parse_options(options, ARRAY_LENGTH(options), argc, argv);
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 044633f7c740..eeb63877e862 100644
+index 12c1b8b5..0236d196 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -77,6 +77,10 @@
- #define GBM_BO_USE_CURSOR GBM_BO_USE_CURSOR_64X64
- #endif
-
-+#ifndef EGL_DRM_MASTER_FD_EXT
-+#define EGL_DRM_MASTER_FD_EXT 0x333C
-+#endif
-+
- struct drm_backend {
- struct weston_backend base;
- struct weston_compositor *compositor;
-@@ -92,7 +96,10 @@ struct drm_backend {
+@@ -94,7 +94,10 @@ struct drm_backend {
int fd;
char *filename;
} drm;
@@ -73,18 +64,18 @@ index 044633f7c740..eeb63877e862 100644
+ EGLDeviceEXT egldevice;
struct gbm_device *gbm;
+
- uint32_t *crtcs;
- int num_crtcs;
- uint32_t crtc_allocator;
-@@ -115,6 +122,7 @@ struct drm_backend {
+ struct wl_listener session_listener;
+ uint32_t gbm_format;
+
+@@ -113,6 +116,7 @@ struct drm_backend {
int cursors_are_broken;
int use_pixman;
+ int use_egldevice;
- uint32_t prev_state;
+ struct udev_input input;
-@@ -569,17 +577,21 @@ drm_output_render_gl(struct drm_output *output, pixman_region32_t *damage)
+@@ -595,17 +599,21 @@ drm_output_render_gl(struct drm_output *output, pixman_region32_t *damage)
output->base.compositor->renderer->repaint_output(&output->base,
damage);
@@ -116,7 +107,7 @@ index 044633f7c740..eeb63877e862 100644
}
}
-@@ -704,9 +716,14 @@ drm_output_repaint(struct weston_output *output_base,
+@@ -730,9 +738,14 @@ drm_output_repaint(struct weston_output *output_base,
output_base->set_dpms(output_base, WESTON_DPMS_ON);
}
@@ -134,7 +125,7 @@ index 044633f7c740..eeb63877e862 100644
weston_log("queueing pageflip failed: %m\n");
goto err_pageflip;
}
-@@ -777,7 +794,6 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -803,7 +816,6 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
struct drm_output *output = to_drm_output(output_base);
struct drm_backend *backend =
to_drm_backend(output_base->compositor);
@@ -142,7 +133,7 @@ index 044633f7c740..eeb63877e862 100644
struct timespec ts, tnow;
struct timespec vbl2now;
int64_t refresh_nsec;
-@@ -833,10 +849,14 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -859,10 +871,14 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
/* Immediate query succeeded, but didn't provide valid timestamp.
* Use pageflip fallback.
*/
@@ -160,44 +151,7 @@ index 044633f7c740..eeb63877e862 100644
weston_log("queueing pageflip failed: %m\n");
goto finish_frame;
}
-@@ -1367,6 +1387,9 @@ static void
- drm_output_fini_pixman(struct drm_output *output);
-
- static void
-+drm_output_fini_egl(struct drm_output *output);
-+
-+static void
- drm_output_destroy(struct weston_output *output_base)
- {
- struct drm_output *output = to_drm_output(output_base);
-@@ -1396,12 +1419,10 @@ drm_output_destroy(struct weston_output *output_base)
- b->crtc_allocator &= ~(1 << output->crtc_id);
- b->connector_allocator &= ~(1 << output->connector_id);
-
-- if (b->use_pixman) {
-+ if (b->use_pixman)
- drm_output_fini_pixman(output);
-- } else {
-- gl_renderer->output_destroy(output_base);
-- gbm_surface_destroy(output->gbm_surface);
-- }
-+ else
-+ drm_output_fini_egl(output);
-
- weston_plane_release(&output->fb_plane);
- weston_plane_release(&output->cursor_plane);
-@@ -1500,9 +1521,7 @@ drm_output_switch_mode(struct weston_output *output_base, struct weston_mode *mo
- return -1;
- }
- } else {
-- gl_renderer->output_destroy(&output->base);
-- gbm_surface_destroy(output->gbm_surface);
--
-+ drm_output_fini_egl(output);
- if (drm_output_init_egl(output, b) < 0) {
- weston_log("failed to init output egl state with "
- "new mode");
-@@ -1589,11 +1608,6 @@ create_gbm_device(int fd)
+@@ -1589,11 +1605,6 @@ create_gbm_device(int fd)
{
struct gbm_device *gbm;
@@ -209,7 +163,7 @@ index 044633f7c740..eeb63877e862 100644
/* GBM will load a dri driver, but even though they need symbols from
* libglapi, in some version of Mesa they are not linked to it. Since
* only the gl-renderer module links to it, the call above won't make
-@@ -1606,6 +1620,40 @@ create_gbm_device(int fd)
+@@ -1606,6 +1617,40 @@ create_gbm_device(int fd)
return gbm;
}
@@ -250,7 +204,7 @@ index 044633f7c740..eeb63877e862 100644
/* When initializing EGL, if the preferred buffer format isn't available
* we may be able to substitute an ARGB format for an XRGB one.
*
-@@ -1632,38 +1680,62 @@ fallback_format_for(uint32_t format)
+@@ -1632,38 +1677,62 @@ fallback_format_for(uint32_t format)
static int
drm_backend_create_gl_renderer(struct drm_backend *b)
{
@@ -334,7 +288,7 @@ index 044633f7c740..eeb63877e862 100644
return -1;
}
-@@ -1890,55 +1962,102 @@ find_crtc_for_connector(struct drm_backend *b,
+@@ -1894,50 +1963,83 @@ find_crtc_for_connector(struct drm_backend *b,
static int
drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
{
@@ -457,12 +411,11 @@ index 044633f7c740..eeb63877e862 100644
}
return 0;
- }
-
-+static void
-+drm_output_fini_egl(struct drm_output *output)
-+{
-+ gl_renderer->output_destroy(&output->base);
+@@ -1947,7 +2049,14 @@ static void
+ drm_output_fini_egl(struct drm_output *output)
+ {
+ gl_renderer->output_destroy(&output->base);
+- gbm_surface_destroy(output->gbm_surface);
+
+ if (output->dumb[0]) {
+ drm_fb_destroy_dumb(output->dumb[0]);
@@ -471,12 +424,10 @@ index 044633f7c740..eeb63877e862 100644
+
+ if (output->gbm_surface)
+ gbm_surface_destroy(output->gbm_surface);
-+}
-+
+ }
+
static int
- drm_output_init_pixman(struct drm_output *output, struct drm_backend *b)
- {
-@@ -3005,6 +3124,11 @@ recorder_binding(struct weston_keyboard *keyboard, uint32_t time, uint32_t key,
+@@ -3107,6 +3216,11 @@ recorder_binding(struct weston_keyboard *keyboard, uint32_t time, uint32_t key,
struct drm_output *output;
int width, height;
@@ -488,7 +439,7 @@ index 044633f7c740..eeb63877e862 100644
output = container_of(b->compositor->output_list.next,
struct drm_output, base.link);
-@@ -3060,11 +3184,20 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -3162,11 +3276,20 @@ switch_to_gl_renderer(struct drm_backend *b)
weston_log("Switching to GL renderer\n");
@@ -514,7 +465,7 @@ index 044633f7c740..eeb63877e862 100644
}
wl_list_for_each(output, &b->compositor->output_list, base.link)
-@@ -3073,7 +3206,8 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -3175,7 +3298,8 @@ switch_to_gl_renderer(struct drm_backend *b)
b->compositor->renderer->destroy(b->compositor);
if (drm_backend_create_gl_renderer(b) < 0) {
@@ -524,19 +475,19 @@ index 044633f7c740..eeb63877e862 100644
weston_log("Failed to create GL renderer. Quitting.\n");
/* FIXME: we need a function to shutdown cleanly */
assert(0);
-@@ -3130,6 +3264,7 @@ drm_backend_create(struct weston_compositor *compositor,
+@@ -3239,6 +3363,7 @@ drm_backend_create(struct weston_compositor *compositor,
b->sprites_are_broken = 1;
b->compositor = compositor;
b->use_pixman = config->use_pixman;
+ b->use_egldevice = config->use_egldevice;
- b->configure_output = config->configure_output;
- b->use_current_mode = config->use_current_mode;
+ if (parse_gbm_format(config->gbm_format, GBM_FORMAT_XRGB8888, &b->gbm_format) < 0)
+ goto err_compositor;
diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h
-index 1266031f09f1..01223c173988 100644
+index 2e2995a2..9cd0eef6 100644
--- a/libweston/compositor-drm.h
+++ b/libweston/compositor-drm.h
-@@ -89,6 +89,10 @@ struct weston_drm_backend_config {
+@@ -110,6 +110,10 @@ struct weston_drm_backend_config {
/** Whether to use the pixman renderer instead of the OpenGL ES renderer. */
bool use_pixman;
@@ -547,6 +498,45 @@ index 1266031f09f1..01223c173988 100644
/** The seat to be used for input and output.
*
* If NULL the default "seat0" will be used. The backend will
+diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
+index 39ea3b42..37252492 100644
+--- a/libweston/gl-renderer.h
++++ b/libweston/gl-renderer.h
+@@ -45,6 +45,7 @@ typedef void *EGLConfig;
+ typedef intptr_t EGLNativeDisplayType;
+ typedef intptr_t EGLNativeWindowType;
+ #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
++#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)0)
+
+ #endif /* ENABLE_EGL */
+
+diff --git a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h
+index 11e9ccc1..de82310f 100644
+--- a/shared/weston-egl-ext.h
++++ b/shared/weston-egl-ext.h
+@@ -162,6 +162,10 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
+ #define EGL_PLATFORM_DEVICE_EXT 0x313F
+ #endif
+
++#ifndef EGL_DRM_MASTER_FD_EXT
++#define EGL_DRM_MASTER_FD_EXT 0x333C
++#endif
++
+ /*
+ * FIXME: Remove both EGL_EXT_stream_acquire_mode and
+ * EGL_NV_output_drm_flip_event definitions below once both extensions
+@@ -210,6 +214,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
+ #define EGL_PLATFORM_X11_KHR 0x31D5
+ #define EGL_PLATFORM_DEVICE_EXT 0x313F
+
++/* EGL_DRM_MASTER_FD_EXT and EGL_NONE enum values are also kept to allow
++ * compositor-drm.c to build with EGLDevice and EGLStream support */
++#define EGL_DRM_MASTER_FD_EXT 0x333C
++#define EGL_NONE 0x3038
++
+ #endif /* ENABLE_EGL */
+
+ #endif
--
-2.10.2
+2.11.1
diff --git a/0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch b/0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch
deleted file mode 100644
index 0b16279fae70..000000000000
--- a/0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 7c056812b4c233b8af919e4d3db44a887e948b03 Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Wed, 30 Mar 2016 15:29:37 +0200
-Subject: [PATCH 05/12] gl-renderer: Accept non-NULL empty <visual_id> arrays
-X-NVConfidentiality: public
-
-This change modifies egl_choose_config() to accept a non-NULL but empty
-<visual_id> array (i.e. n_ids == 0)
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
-Reviewed-by: Andy Ritger <aritger@nvidia.com>
-Reviewed-by: James Jones <jajones@nvidia.com>
----
- libweston/gl-renderer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 736394a53eed..3ffd0dd8e3b7 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -2490,7 +2490,7 @@ egl_choose_config(struct gl_renderer *gr, const EGLint *attribs,
- goto out;
- }
-
-- if (!visual_id)
-+ if (!visual_id || n_ids == 0)
- config_index = 0;
-
- for (i = 0; config_index == -1 && i < n_ids; i++)
---
-2.10.2
-
diff --git a/0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch b/0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch
deleted file mode 100644
index 314b2cfded5e..000000000000
--- a/0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From c481d05b7284ec9a8d46267052b773b44043905a Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Fri, 26 Feb 2016 15:44:59 +0100
-Subject: [PATCH 06/12] gl-renderer: Refactor
- gl_renderer_output_window_create()
-X-NVConfidentiality: public
-
-In preparation for follow-on changes to support frame presentation
-through EGLDevice+EGLOutput, this change refactors
-gl_renderer_output_window_create() to separate out window surface
-creation code from output common creation code.
-
-Bonus: Fix EGLSurface leakage upon gl_renderer_setup() failure.
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
-Reviewed-by: Andy Ritger <aritger@nvidia.com>
-Reviewed-by: James Jones <jajones@nvidia.com>
----
- libweston/gl-renderer.c | 99 ++++++++++++++++++++++++++++++++-----------------
- 1 file changed, 65 insertions(+), 34 deletions(-)
-
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 3ffd0dd8e3b7..508f8b92797e 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -1,6 +1,7 @@
- /*
- * Copyright © 2012 Intel Corporation
- * Copyright © 2015 Collabora, Ltd.
-+ * Copyright © 2016 NVIDIA Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
-@@ -2543,24 +2544,21 @@ gl_renderer_output_set_border(struct weston_output *output,
- static int
- gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface);
-
--static int
--gl_renderer_output_window_create(struct weston_output *output,
-- EGLNativeWindowType window_for_legacy,
-- void *window_for_platform,
-- const EGLint *config_attribs,
-- const EGLint *visual_id,
-- int n_ids)
--{
-- struct weston_compositor *ec = output->compositor;
-- struct gl_renderer *gr = get_renderer(ec);
-- struct gl_output_state *go;
-+static EGLSurface
-+gl_renderer_create_window_surface(struct gl_renderer *gr,
-+ EGLNativeWindowType window_for_legacy,
-+ void *window_for_platform,
-+ const EGLint *config_attribs,
-+ const EGLint *visual_id,
-+ int n_ids)
-+{
-+ EGLSurface egl_surface = EGL_NO_SURFACE;
- EGLConfig egl_config;
-- int i;
-
- if (egl_choose_config(gr, config_attribs, visual_id,
- n_ids, &egl_config) == -1) {
- weston_log("failed to choose EGL config for output\n");
-- return -1;
-+ return EGL_NO_SURFACE;
- }
-
- if (egl_config != gr->egl_config &&
-@@ -2568,42 +2566,75 @@ gl_renderer_output_window_create(struct weston_output *output,
- weston_log("attempted to use a different EGL config for an "
- "output but EGL_MESA_configless_context is not "
- "supported\n");
-- return -1;
-+ return EGL_NO_SURFACE;
- }
-
-+ log_egl_config_info(gr->egl_display, egl_config);
-+
-+ if (gr->create_platform_window)
-+ egl_surface = gr->create_platform_window(gr->egl_display,
-+ egl_config,
-+ window_for_platform,
-+ NULL);
-+ else
-+ egl_surface = eglCreateWindowSurface(gr->egl_display,
-+ egl_config,
-+ window_for_legacy, NULL);
-+
-+ return egl_surface;
-+}
-+
-+static int
-+gl_renderer_output_create(struct weston_output *output,
-+ EGLSurface surface)
-+{
-+ struct gl_output_state *go;
-+ int i;
-+
- go = zalloc(sizeof *go);
- if (go == NULL)
- return -1;
-
-- if (gr->create_platform_window) {
-- go->egl_surface =
-- gr->create_platform_window(gr->egl_display,
-- egl_config,
-- window_for_platform,
-- NULL);
-- } else {
-- go->egl_surface =
-- eglCreateWindowSurface(gr->egl_display,
-- egl_config,
-- window_for_legacy, NULL);
-- }
--
-- if (go->egl_surface == EGL_NO_SURFACE) {
-- weston_log("failed to create egl surface\n");
-- free(go);
-- return -1;
-- }
-+ go->egl_surface = surface;
-
- for (i = 0; i < BUFFER_DAMAGE_COUNT; i++)
- pixman_region32_init(&go->buffer_damage[i]);
-
- output->renderer_state = go;
-
-- log_egl_config_info(gr->egl_display, egl_config);
--
- return 0;
- }
-
-+static int
-+gl_renderer_output_window_create(struct weston_output *output,
-+ EGLNativeWindowType window_for_legacy,
-+ void *window_for_platform,
-+ const EGLint *config_attribs,
-+ const EGLint *visual_id,
-+ int n_ids)
-+{
-+ struct weston_compositor *ec = output->compositor;
-+ struct gl_renderer *gr = get_renderer(ec);
-+ EGLSurface egl_surface = EGL_NO_SURFACE;
-+ int ret = 0;
-+
-+ egl_surface = gl_renderer_create_window_surface(gr,
-+ window_for_legacy,
-+ window_for_platform,
-+ config_attribs,
-+ visual_id, n_ids);
-+ if (egl_surface == EGL_NO_SURFACE) {
-+ weston_log("failed to create egl surface\n");
-+ return -1;
-+ }
-+
-+ ret = gl_renderer_output_create(output, egl_surface);
-+ if (ret < 0)
-+ eglDestroySurface(gr->egl_display, egl_surface);
-+
-+ return ret;
-+}
-+
- static void
- gl_renderer_output_destroy(struct weston_output *output)
- {
---
-2.10.2
-
diff --git a/0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch b/0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
new file mode 100644
index 000000000000..3e6e03cc34b1
--- /dev/null
+++ b/0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
@@ -0,0 +1,168 @@
+From c876b463f62b18da2446ad097d0bdad63d34363d Mon Sep 17 00:00:00 2001
+From: "Miguel A. Vico" <mvicomoya@nvidia.com>
+Date: Mon, 27 Feb 2017 15:31:35 -0800
+Subject: [PATCH 6/7] simple-egl: Do not set EGL up until XDG setup is complete
+X-NVConfidentiality: public
+
+There is nothing that prohibits the underlying EGL_PLATFORM_WAYLAND
+implementation to attach a buffer or commit surfaces right after the
+Wayland EGLSurface has been created.
+
+Since XDG Shell v6 imposes that no buffer attachments or surface commits
+must be done before a configure is complete, Wayland clients shouldn't
+start setting EGL up until XDG setup is complete.
+
+Related bug:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=98731
+
+Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
+---
+ clients/simple-egl.c | 67 +++++++++++++++++++++++++++-------------------------
+ 1 file changed, 35 insertions(+), 32 deletions(-)
+
+diff --git a/clients/simple-egl.c b/clients/simple-egl.c
+index 9b6fa1f2..59311cfc 100644
+--- a/clients/simple-egl.c
++++ b/clients/simple-egl.c
+@@ -221,11 +221,32 @@ init_egl(struct display *display, struct window *window)
+ if (display->swap_buffers_with_damage)
+ printf("has EGL_EXT_buffer_age and %s\n", swap_damage_ext_to_entrypoint[i].extension);
+
++ window->egl_surface =
++ weston_platform_create_egl_surface(display->egl.dpy,
++ display->egl.conf,
++ window->native, NULL);
++
++ ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
++ window->egl_surface, window->display->egl.ctx);
++ assert(ret == EGL_TRUE);
++
++ if (!window->frame_sync)
++ eglSwapInterval(display->egl.dpy, 0);
++
+ }
+
+ static void
+-fini_egl(struct display *display)
++fini_egl(struct display *display, struct window *window)
+ {
++ /* Required, otherwise segfault in egl_dri2.c: dri2_make_current()
++ * on eglReleaseThread(). */
++ eglMakeCurrent(window->display->egl.dpy, EGL_NO_SURFACE, EGL_NO_SURFACE,
++ EGL_NO_CONTEXT);
++
++ weston_platform_destroy_egl_surface(window->display->egl.dpy,
++ window->egl_surface);
++ wl_egl_window_destroy(window->native);
++
+ eglTerminate(display->egl.dpy);
+ eglReleaseThread();
+ }
+@@ -360,7 +381,8 @@ handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface,
+ {
+ struct window *window = data;
+
+- wl_egl_window_resize(window->native, width, height, 0, 0);
++ if (window->native)
++ wl_egl_window_resize(window->native, width, height, 0, 0);
+
+ window->geometry.width = width;
+ window->geometry.height = height;
+@@ -413,7 +435,6 @@ static void
+ create_surface(struct window *window)
+ {
+ struct display *display = window->display;
+- EGLBoolean ret;
+
+ window->surface = wl_compositor_create_surface(display->compositor);
+
+@@ -421,10 +442,6 @@ create_surface(struct window *window)
+ wl_egl_window_create(window->surface,
+ window->geometry.width,
+ window->geometry.height);
+- window->egl_surface =
+- weston_platform_create_egl_surface(display->egl.dpy,
+- display->egl.conf,
+- window->native, NULL);
+
+
+ if (display->shell) {
+@@ -435,13 +452,6 @@ create_surface(struct window *window)
+ assert(0);
+ }
+
+- ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
+- window->egl_surface, window->display->egl.ctx);
+- assert(ret == EGL_TRUE);
+-
+- if (!window->frame_sync)
+- eglSwapInterval(display->egl.dpy, 0);
+-
+ if (!display->shell)
+ return;
+
+@@ -452,15 +462,6 @@ create_surface(struct window *window)
+ static void
+ destroy_surface(struct window *window)
+ {
+- /* Required, otherwise segfault in egl_dri2.c: dri2_make_current()
+- * on eglReleaseThread(). */
+- eglMakeCurrent(window->display->egl.dpy, EGL_NO_SURFACE, EGL_NO_SURFACE,
+- EGL_NO_CONTEXT);
+-
+- weston_platform_destroy_egl_surface(window->display->egl.dpy,
+- window->egl_surface);
+- wl_egl_window_destroy(window->native);
+-
+ if (window->xdg_toplevel)
+ zxdg_toplevel_v6_destroy(window->xdg_toplevel);
+ if (window->xdg_surface)
+@@ -895,9 +896,7 @@ main(int argc, char **argv)
+
+ wl_display_roundtrip(display.display);
+
+- init_egl(&display, &window);
+ create_surface(&window);
+- init_gl(&window);
+
+ display.cursor_surface =
+ wl_compositor_create_surface(display.compositor);
+@@ -907,23 +906,27 @@ main(int argc, char **argv)
+ sigint.sa_flags = SA_RESETHAND;
+ sigaction(SIGINT, &sigint, NULL);
+
++ /* We must assure XDG setup is complete before setting EGL up */
++ while (running && window.wait_for_configure) {
++ wl_display_dispatch(display.display);
++ }
++
++ init_egl(&display, &window);
++ init_gl(&window);
++
+ /* The mainloop here is a little subtle. Redrawing will cause
+ * EGL to read events so we can just call
+ * wl_display_dispatch_pending() to handle any events that got
+ * queued up as a side effect. */
+ while (running && ret != -1) {
+- if (window.wait_for_configure) {
+- wl_display_dispatch(display.display);
+- } else {
+- wl_display_dispatch_pending(display.display);
+- redraw(&window, NULL, 0);
+- }
++ wl_display_dispatch_pending(display.display);
++ redraw(&window, NULL, 0);
+ }
+
+ fprintf(stderr, "simple-egl exiting\n");
+
++ fini_egl(&display, &window);
+ destroy_surface(&window);
+- fini_egl(&display);
+
+ wl_surface_destroy(display.cursor_surface);
+ if (display.cursor_theme)
+--
+2.11.1
+
diff --git a/0007-Add-nvidia-release-notes-file.patch b/0007-Add-nvidia-release-notes-file.patch
new file mode 100644
index 000000000000..8ceddd02aee8
--- /dev/null
+++ b/0007-Add-nvidia-release-notes-file.patch
@@ -0,0 +1,42 @@
+From 7f733c58c947c5355dda3d829dd0f4a47c4c819d Mon Sep 17 00:00:00 2001
+From: "Miguel A. Vico" <mvicomoya@nvidia.com>
+Date: Fri, 11 Nov 2016 20:07:19 +0100
+Subject: [PATCH 7/7] Add nvidia-release-notes file
+X-NVConfidentiality: public
+
+Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
+---
+ nvidia-release-notes | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 nvidia-release-notes
+
+diff --git a/nvidia-release-notes b/nvidia-release-notes
+new file mode 100644
+index 00000000..4bd24000
+--- /dev/null
++++ b/nvidia-release-notes
+@@ -0,0 +1,21 @@
++NVIDIA EGLStream-based Weston version 2.0
++-----------------------------------------
++
++This branch includes NVIDIA EGLStream patches on top of
++Weston 2.0.
++
++* Known issues:
++
++ - Bad interactions with XDG Shell v6 preventing
++ clients that implement the new interface from
++ starting
++
++ Fixed in 'weston-simple-egl' with commit:
++
++ c876b463f62b18da2446ad097d0bdad63d34363d simple-egl: Do not set EGL up until XDG setup is complete
++
++
++* Contact:
++
++ Miguel A. Vico (mvicomoya AT nvidia.com)
++
+--
+2.11.1
+
diff --git a/0012-Add-nvidia-release-notes-file.patch b/0012-Add-nvidia-release-notes-file.patch
deleted file mode 100644
index adfa82884c73..000000000000
--- a/0012-Add-nvidia-release-notes-file.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 93f1500533d30ebea97c8055ea62f9e252027e21 Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Fri, 11 Nov 2016 20:07:19 +0100
-Subject: [PATCH 12/12] Add nvidia-release-notes file
-X-NVConfidentiality: public
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
----
- nvidia-release-notes | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
- create mode 100644 nvidia-release-notes
-
-diff --git a/nvidia-release-notes b/nvidia-release-notes
-new file mode 100644
-index 000000000000..182251df0008
---- /dev/null
-+++ b/nvidia-release-notes
-@@ -0,0 +1,16 @@
-+NVIDIA EGLStream-based Weston version 1.12
-+------------------------------------------
-+
-+This branch includes NVIDIA EGLStream patches on top of
-+Weston 1.12.
-+
-+* Known issues:
-+
-+ - Bad interactions with XDG Shell v6 preventing
-+ clients that implement the new interface from
-+ starting
-+
-+* Contact:
-+
-+ Miguel A. Vico (mvicomoya AT nvidia.com)
-+
---
-2.10.2
-
diff --git a/PKGBUILD b/PKGBUILD
index 088c72ace92b..d4f8a8838db1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,60 +1,49 @@
# Maintainer: Aaron Plattner <aplattner@nvidia.com>
+# Maintainer: Miguel A. Vico <mvicomoya@nvidia.com>
# Contributor: Sébastien Luttringer
# Contributor: Joel Teichroeb <joel@teichroeb.net>
pkgname=weston-eglstream
-pkgver=1.12.0
-pkgrel=2
+pkgver=2.0.0
+pkgrel=1
pkgdesc='Reference implementation of a Wayland compositor with EGLStream support'
arch=('i686' 'x86_64')
-url='http://wayland.freedesktop.org'
+url='https://wayland.freedesktop.org/'
license=('MIT')
-depends=('wayland' 'libxkbcommon' 'libinput' 'libunwind' 'poppler-glib' 'mtdev' 'libxcursor' 'glu' 'pango' 'colord')
+depends=('glibc' 'wayland' 'libxkbcommon' 'libinput' 'libunwind' 'pixman'
+ 'libdrm' 'pam' 'libsystemd' 'cairo' 'libpng' 'libjpeg-turbo' 'libwebp'
+ 'libegl' 'libgles' 'glib2' 'pango' 'lcms2' 'mtdev' 'libx11'
+ 'libxcb' 'dbus' 'libva' 'libxcursor' 'colord')
makedepends=('wayland-protocols')
provides=('weston')
conflicts=('weston')
-source=("http://wayland.freedesktop.org/releases/weston-$pkgver.tar.xz"
- '0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch'
- '0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch'
- '0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch'
- '0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch'
- '0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch'
- '0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch'
- '0007-gl-renderer-Add-EGLDevice-enumeration-support.patch'
- '0008-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch'
- '0009-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch'
- '0010-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch'
- '0011-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch'
- '0012-Add-nvidia-release-notes-file.patch')
-sha256sums=('ac7ac2a32e3b9f50131fccded5d2326bd36b2226712d90b61999118a09af5033'
- 'dc51d39b460385eff7694f11aa3096896a58246f0d0ffdcd77ac9d07bf4781d7'
- 'e9088f7fa816d8c04bfa0abfcbb0c33b436cea157efce03663202131bcf8a053'
- '2abc0c12a7c3465c2289e6940f538cf6cb46f4f9c57eff1884b15134a460ef2e'
- '9e9cb4ee001d62c09753994225d944b3eb90788d29b69b1d3ffead38c09c8934'
- '7492e7d6b3d4d8a95433cbc845117746e48047794422c28b37c16fe60078a6f8'
- 'd7ae91ed894a17d578371be877ebd0ab2204522f5f17388ea3ef0714afe85bba'
- '1a703d7743b55ccbe934389b1c4430f4f4535f4864439b86097b80d1b42e7e2c'
- 'd5a8fddd8ddae650a283915478e8d41669a1dcc953df4317b5d178e14221fa4a'
- 'fb759e98bffb406904366b735f7f50f2726a2a1c6700a9cf544d4c763f46bbfa'
- '8b6ef50772bf02adb951266ad5d973a701dd147fc168d8d6fa7cbafe0900dbda'
- '7838e7de7ac5b7fe4e98392235907333d4977939a487ff4cf2a2bd8756fc49cb'
- 'f916ded74db76cfe3566654b5dc5a90b214a1572ffd7c15aa5e577ceabc22ab4')
+source=("https://wayland.freedesktop.org/releases/weston-$pkgver.tar.xz"
+ '0001-gl-renderer-Add-EGLDevice-enumeration-support.patch'
+ '0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch'
+ '0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch'
+ '0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch'
+ '0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch'
+ '0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch'
+ '0007-Add-nvidia-release-notes-file.patch')
+sha256sums=('b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8'
+ 'c81d07f0a2b26e772faa02e4b088ff979206216652a4c30beb9aa24631d9d648'
+ 'c32048c7b1e57c24ca7fa665c9e70bc3c12dec338aea3643b637bf8d30188335'
+ 'fabb4ca507b0a5978ebc7f635989637ccfbdeee9b84119bc6588028342913856'
+ 'db56a9f0d09441af58d530130e5f04f7066d11a32cdd99522e39a19ee4ee9f46'
+ '8087849a01853e5c69fad7c9821e2202fd78ffe904626fe2f9ff51e83816ed02'
+ '3bb9b0a354aa07fb3eb89ad9b7e425b1ce980b1bd0b90166a41795a80acc78ca'
+ '47fc9f44083096299e1502cf15c93d9f8670e1a4e4784870d7a843d4de09d502')
prepare() {
cd weston-$pkgver
- patch -Np1 -i "${srcdir}/0001-gl-renderer-Rename-gl_renderer_create-to-gl_renderer.patch"
- patch -Np1 -i "${srcdir}/0002-gl-renderer-Rename-gl_renderer-output_create-to-outp.patch"
- patch -Np1 -i "${srcdir}/0003-gl-renderer-Rename-attribs-param-of-gl_renderer-to-c.patch"
- patch -Np1 -i "${srcdir}/0004-gl-renderer-Add-platform_attribs-param-to-gl_rendere.patch"
- patch -Np1 -i "${srcdir}/0005-gl-renderer-Accept-non-NULL-empty-visual_id-arrays.patch"
- patch -Np1 -i "${srcdir}/0006-gl-renderer-Refactor-gl_renderer_output_window_creat.patch"
- patch -Np1 -i "${srcdir}/0007-gl-renderer-Add-EGLDevice-enumeration-support.patch"
- patch -Np1 -i "${srcdir}/0008-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch"
- patch -Np1 -i "${srcdir}/0009-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch"
- patch -Np1 -i "${srcdir}/0010-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch"
- patch -Np1 -i "${srcdir}/0011-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch"
- patch -Np1 -i "${srcdir}/0012-Add-nvidia-release-notes-file.patch"
+ patch -Np1 -i "${srcdir}/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch"
+ patch -Np1 -i "${srcdir}/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch"
+ patch -Np1 -i "${srcdir}/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch"
+ patch -Np1 -i "${srcdir}/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch"
+ patch -Np1 -i "${srcdir}/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch"
+ patch -Np1 -i "${srcdir}/0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch"
+ patch -Np1 -i "${srcdir}/0007-Add-nvidia-release-notes-file.patch"
}
build() {
@@ -63,6 +52,9 @@ build() {
--prefix=/usr \
--libexecdir=/usr/lib/weston \
--enable-libinput-backend \
+ --enable-systemd-login \
+ --enable-systemd-notify \
+ --enable-xwayland \
--enable-demo-clients-install
make
}