summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel A. Vico2017-08-09 17:02:07 -0700
committerMiguel A. Vico2017-08-09 17:02:07 -0700
commit96452a48b8d31a9f48c7ece5d8d5a7935b2fa8b3 (patch)
tree5033b97899584014c8917eb2288fde0b044ecc47
parent87ffac5fff77badfc6c0ecaa022ef7ca96278cd2 (diff)
downloadaur-96452a48b8d31a9f48c7ece5d8d5a7935b2fa8b3.tar.gz
Update to weston 3.0.0
-rw-r--r--.SRCINFO44
-rw-r--r--0001-compositor-drm-Release-current-next-fb-when-deactiva.patch (renamed from 0008-compositor-drm-Release-current-next-fb-when-deactiva.patch)26
-rw-r--r--0002-gl-renderer-Add-EGLDevice-enumeration-support.patch (renamed from 0001-gl-renderer-Add-EGLDevice-enumeration-support.patch)12
-rw-r--r--0003-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch (renamed from 0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch)36
-rw-r--r--0004-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch (renamed from 0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch)28
-rw-r--r--0005-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch (renamed from 0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch)18
-rw-r--r--0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch (renamed from 0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch)140
-rw-r--r--0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch (renamed from 0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch)12
-rw-r--r--0008-compositor-Process-stream-attach-requests-with-wl_eg.patch (renamed from 0009-compositor-Process-stream-attach-requests-with-wl_eg.patch)44
-rw-r--r--0009-Add-nvidia-release-notes-file.patch (renamed from 0007-Add-nvidia-release-notes-file.patch)28
-rw-r--r--PKGBUILD60
11 files changed, 218 insertions, 230 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2af4a6f8165..dc0e54f69eb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = weston-eglstream
pkgdesc = Reference implementation of a Wayland compositor with EGLStream support
- pkgver = 2.0.0
- pkgrel = 3
+ pkgver = 3.0.0
+ pkgrel = 1
url = https://wayland.freedesktop.org/
arch = i686
arch = x86_64
@@ -34,26 +34,26 @@ pkgbase = weston-eglstream
depends = colord
provides = weston
conflicts = weston
- 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
- source = 0008-compositor-drm-Release-current-next-fb-when-deactiva.patch
- source = 0009-compositor-Process-stream-attach-requests-with-wl_eg.patch
- sha256sums = b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8
- sha256sums = c81d07f0a2b26e772faa02e4b088ff979206216652a4c30beb9aa24631d9d648
- sha256sums = c32048c7b1e57c24ca7fa665c9e70bc3c12dec338aea3643b637bf8d30188335
- sha256sums = fabb4ca507b0a5978ebc7f635989637ccfbdeee9b84119bc6588028342913856
- sha256sums = db56a9f0d09441af58d530130e5f04f7066d11a32cdd99522e39a19ee4ee9f46
- sha256sums = 8087849a01853e5c69fad7c9821e2202fd78ffe904626fe2f9ff51e83816ed02
- sha256sums = 3bb9b0a354aa07fb3eb89ad9b7e425b1ce980b1bd0b90166a41795a80acc78ca
- sha256sums = 47fc9f44083096299e1502cf15c93d9f8670e1a4e4784870d7a843d4de09d502
- sha256sums = ca6c3a6fef381c6c7dd05e6d1bfda97b221fd90fc78ebf7b7ade9cfad2b38b63
- sha256sums = d9f0bb2ac862017d0a1f0bddd3fedb5d4e7be3b5af6dd579d75442f9f88acf63
+ source = https://wayland.freedesktop.org/releases/weston-3.0.0.tar.xz
+ source = 0001-compositor-drm-Release-current-next-fb-when-deactiva.patch
+ source = 0002-gl-renderer-Add-EGLDevice-enumeration-support.patch
+ source = 0003-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
+ source = 0004-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
+ source = 0005-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
+ source = 0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
+ source = 0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
+ source = 0008-compositor-Process-stream-attach-requests-with-wl_eg.patch
+ source = 0009-Add-nvidia-release-notes-file.patch
+ sha256sums = cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5
+ sha256sums = c643d5b305ce91150eb0615836dcee494cc28cd12d7cb60e835b69ee5f8c452a
+ sha256sums = 689f619cb8691416f67fd052b217658dfe3dd2bdf3cb4ede532c8240546f998d
+ sha256sums = 058ab62996f7d000c144963148fa2e39a9c99bc4e0cac3e56926426fc100dac0
+ sha256sums = 9f96e3a94a02cc7fb91d0c8660a8bf6497c8375ce88c0115a2ee8b6c558bcab4
+ sha256sums = 04cab2302462d3680152743289e39766b5e38be7acc5b91a1b5cadec6f98d714
+ sha256sums = 93e77066b08e213af1173ef5438b5bdc62cc7e638a43d813fe5b73b437c71250
+ sha256sums = 6786b4c9e77dfc60db04f05a0b613a71b968d1d12d38c534a240f63a34059757
+ sha256sums = ac8c20a932d7e70f4a93a0121cd476be84bf0498a91e927ffe79de66c03382b6
+ sha256sums = c37571d1bea9114a31f360a75a449f10bec067f32aaddd0337e1b95076295f1e
pkgname = weston-eglstream
diff --git a/0008-compositor-drm-Release-current-next-fb-when-deactiva.patch b/0001-compositor-drm-Release-current-next-fb-when-deactiva.patch
index 612bd930026..c94efc1bc75 100644
--- a/0008-compositor-drm-Release-current-next-fb-when-deactiva.patch
+++ b/0001-compositor-drm-Release-current-next-fb-when-deactiva.patch
@@ -1,8 +1,8 @@
-From 812868a91f8c9c42167bf3bf2c66f6ec1f049c41 Mon Sep 17 00:00:00 2001
+From f2da0e2f686ee16ddd3a4e92e06ef3a55ec80472 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Tue, 4 Apr 2017 14:39:47 -0700
-Subject: [PATCH] compositor-drm: Release current & next fb when deactivating
- the session
+Subject: [PATCH 1/9] compositor-drm: Release current & next fb when
+ deactivating the session
X-NVConfidentiality: public
With
@@ -30,24 +30,24 @@ Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
1 file changed, 8 insertions(+)
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 0236d196..7283d0ff 100644
+index 8e1e788f..63153271 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -3058,6 +3058,14 @@ session_notify(struct wl_listener *listener, void *data)
+@@ -3164,6 +3164,14 @@ session_notify(struct wl_listener *listener, void *data)
wl_list_for_each(output, &compositor->output_list, base.link) {
- output->base.repaint_needed = 0;
+ output->base.repaint_needed = false;
drmModeSetCursor(b->drm.fd, output->crtc_id, 0, 0, 0);
-+ if (output->current != NULL) {
-+ drm_output_release_fb(output, output->current);
-+ output->current = NULL;
++ if (output->fb_current != NULL) {
++ drm_fb_unref(output->fb_current);
++ output->fb_current = NULL;
+ }
-+ if (output->next != NULL) {
-+ drm_output_release_fb(output, output->next);
-+ output->next = NULL;
++ if (output->fb_pending != NULL) {
++ drm_fb_unref(output->fb_pending);
++ output->fb_pending = NULL;
+ }
}
output = container_of(compositor->output_list.next,
--
-2.12.1
+2.13.3
diff --git a/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch b/0002-gl-renderer-Add-EGLDevice-enumeration-support.patch
index 198d94a6ef8..41e0190755c 100644
--- a/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
+++ b/0002-gl-renderer-Add-EGLDevice-enumeration-support.patch
@@ -1,7 +1,7 @@
-From d178c1add79d48cd639bf5c387067c0e4d5fae09 Mon Sep 17 00:00:00 2001
+From d511b3d61c8c99633c1a012883931c2eeff9fe3f 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 1/7] gl-renderer: Add EGLDevice enumeration support
+Subject: [PATCH 2/9] gl-renderer: Add EGLDevice enumeration support
X-NVConfidentiality: public
EGLDevice provides means to enumerate native devices.
@@ -22,10 +22,10 @@ Reviewed-by: James Jones <jajones@nvidia.com>
2 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index c6091af0..7a840a35 100644
+index da29b072..ecb19f13 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
-@@ -3357,6 +3357,90 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
+@@ -3478,6 +3478,90 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
return 0;
}
@@ -116,7 +116,7 @@ index c6091af0..7a840a35 100644
WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.opaque_attribs = gl_renderer_opaque_attribs,
.alpha_attribs = gl_renderer_alpha_attribs,
-@@ -3367,5 +3451,8 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
+@@ -3488,5 +3572,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,
@@ -152,5 +152,5 @@ index b47ea07f..9ff4e21e 100644
};
--
-2.11.1
+2.13.3
diff --git a/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch b/0003-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
index b336c063294..3e080b0d888 100644
--- a/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
+++ b/0003-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
@@ -1,7 +1,7 @@
-From b67b64f6c7565a88558f1398895830394b887ee3 Mon Sep 17 00:00:00 2001
+From 77c0daf1c09c7d9a4be2e3f10089157e88c5a338 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 2/7] gl-renderer: Add support for EGLDevice composited frame
+Subject: [PATCH 3/9] gl-renderer: Add support for EGLDevice composited frame
presentation
X-NVConfidentiality: public
@@ -48,7 +48,7 @@ Reviewed-by: James Jones <jajones@nvidia.com>
3 files changed, 315 insertions(+), 3 deletions(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 7a840a35..498a14bd 100644
+index ecb19f13..ab2881c6 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -86,6 +86,8 @@ struct gl_output_state {
@@ -89,7 +89,7 @@ index 7a840a35..498a14bd 100644
int has_dmabuf_import;
struct wl_list dmabuf_images;
-@@ -1196,6 +1220,38 @@ gl_renderer_repaint_output(struct weston_output *output,
+@@ -1200,6 +1224,38 @@ gl_renderer_repaint_output(struct weston_output *output,
}
static int
@@ -128,7 +128,7 @@ index 7a840a35..498a14bd 100644
gl_renderer_read_pixels(struct weston_output *output,
pixman_format_code_t format, void *pixels,
uint32_t x, uint32_t y,
-@@ -2699,9 +2755,93 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
+@@ -2805,9 +2861,93 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
return egl_surface;
}
@@ -223,7 +223,7 @@ index 7a840a35..498a14bd 100644
{
struct gl_output_state *go;
int i;
-@@ -2711,6 +2851,7 @@ gl_renderer_output_create(struct weston_output *output,
+@@ -2817,6 +2957,7 @@ gl_renderer_output_create(struct weston_output *output,
return -1;
go->egl_surface = surface;
@@ -231,7 +231,7 @@ index 7a840a35..498a14bd 100644
for (i = 0; i < BUFFER_DAMAGE_COUNT; i++)
pixman_region32_init(&go->buffer_damage[i]);
-@@ -2743,13 +2884,41 @@ gl_renderer_output_window_create(struct weston_output *output,
+@@ -2849,13 +2990,41 @@ gl_renderer_output_window_create(struct weston_output *output,
return -1;
}
@@ -274,7 +274,7 @@ index 7a840a35..498a14bd 100644
static void
gl_renderer_output_destroy(struct weston_output *output)
{
-@@ -2766,6 +2935,9 @@ gl_renderer_output_destroy(struct weston_output *output)
+@@ -2872,6 +3041,9 @@ gl_renderer_output_destroy(struct weston_output *output)
weston_platform_destroy_egl_surface(gr->egl_display, go->egl_surface);
@@ -284,7 +284,7 @@ index 7a840a35..498a14bd 100644
free(go);
}
-@@ -2861,6 +3033,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -2968,6 +3140,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
(void *) eglGetProcAddress("eglUnbindWaylandDisplayWL");
gr->query_buffer =
(void *) eglGetProcAddress("eglQueryWaylandBufferWL");
@@ -304,7 +304,7 @@ index 7a840a35..498a14bd 100644
extensions =
(const char *) eglQueryString(gr->egl_display, EGL_EXTENSIONS);
-@@ -2911,6 +3096,30 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3027,6 +3212,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;
@@ -335,7 +335,7 @@ index 7a840a35..498a14bd 100644
renderer_setup_egl_client_extensions(gr);
return 0;
-@@ -2936,6 +3145,15 @@ static const EGLint gl_renderer_alpha_attribs[] = {
+@@ -3052,6 +3261,15 @@ static const EGLint gl_renderer_alpha_attribs[] = {
EGL_NONE
};
@@ -351,7 +351,7 @@ index 7a840a35..498a14bd 100644
/** Checks whether a platform EGL client extension is supported
*
-@@ -3009,6 +3227,8 @@ platform_to_extension(EGLenum platform)
+@@ -3125,6 +3343,8 @@ platform_to_extension(EGLenum platform)
return "wayland";
case EGL_PLATFORM_X11_KHR:
return "x11";
@@ -360,7 +360,7 @@ index 7a840a35..498a14bd 100644
default:
assert(0 && "bad EGL platform enum");
}
-@@ -3145,6 +3365,38 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -3261,6 +3481,38 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
if (gl_renderer_setup_egl_extensions(ec) < 0)
goto fail_with_error;
@@ -397,9 +397,9 @@ index 7a840a35..498a14bd 100644
+ }
+
wl_list_init(&gr->dmabuf_images);
- if (gr->has_dmabuf_import)
+ if (gr->has_dmabuf_import) {
gr->base.import_dmabuf = gl_renderer_import_dmabuf;
-@@ -3444,15 +3696,19 @@ gl_renderer_get_drm_device_file(EGLDeviceEXT device,
+@@ -3565,15 +3817,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,
@@ -461,10 +461,10 @@ index 9ff4e21e..39ea3b42 100644
};
diff --git a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h
-index f3e6dcea..1c3fec1c 100644
+index ffea438b..deb1b1c3 100644
--- a/shared/weston-egl-ext.h
+++ b/shared/weston-egl-ext.h
-@@ -158,12 +158,52 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
+@@ -176,12 +176,52 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
#define EGL_PLATFORM_X11_KHR 0x31D5
#endif
@@ -518,5 +518,5 @@ index f3e6dcea..1c3fec1c 100644
#endif /* ENABLE_EGL */
--
-2.11.1
+2.13.3
diff --git a/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch b/0004-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
index aa42a095ebd..7267df5ad61 100644
--- a/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
+++ b/0004-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
@@ -1,7 +1,7 @@
-From aa3aee0503249a0d667dba1001b292b3907fad18 Mon Sep 17 00:00:00 2001
+From 65d79593fb1a4663d4241e31e75f0940662224fb 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 3/7] gl-renderer: Add EGL client support for EGLStream frame
+Subject: [PATCH 4/9] gl-renderer: Add EGL client support for EGLStream frame
presentation
X-NVConfidentiality: public
@@ -29,7 +29,7 @@ Reviewed-by: James Jones <jajones@nvidia.com>
2 files changed, 187 insertions(+), 1 deletion(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 498a14bd..6bcfe40f 100644
+index ab2881c6..a9ed723f 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -168,6 +168,9 @@ struct gl_surface_state {
@@ -67,7 +67,7 @@ index 498a14bd..6bcfe40f 100644
int has_dmabuf_import;
struct wl_list dmabuf_images;
-@@ -2050,6 +2059,145 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
+@@ -2156,6 +2165,145 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
gs->y_inverted = buffer->y_inverted;
}
@@ -213,7 +213,7 @@ index 498a14bd..6bcfe40f 100644
static void
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)
+@@ -2179,6 +2327,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 498a14bd..6bcfe40f 100644
return;
}
-@@ -2086,7 +2240,7 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
+@@ -2192,7 +2346,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 498a14bd..6bcfe40f 100644
weston_log("unhandled buffer type!\n");
weston_buffer_reference(&gs->buffer_ref, NULL);
gs->buffer_type = BUFFER_TYPE_NULL;
-@@ -2274,6 +2428,10 @@ surface_state_destroy(struct gl_surface_state *gs, struct gl_renderer *gr)
+@@ -2380,6 +2534,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 498a14bd..6bcfe40f 100644
free(gs);
}
-@@ -2324,6 +2482,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
+@@ -2430,6 +2588,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
gs->surface = surface;
@@ -255,7 +255,7 @@ index 498a14bd..6bcfe40f 100644
pixman_region32_init(&gs->texture_damage);
surface->renderer_state = gs;
-@@ -3038,14 +3198,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3145,14 +3305,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 498a14bd..6bcfe40f 100644
extensions =
(const char *) eglQueryString(gr->egl_display, EGL_EXTENSIONS);
-@@ -3120,6 +3285,12 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3236,6 +3401,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 498a14bd..6bcfe40f 100644
renderer_setup_egl_client_extensions(gr);
return 0;
-@@ -3392,6 +3563,16 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -3508,6 +3679,16 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
goto fail_terminate;
}
@@ -306,10 +306,10 @@ index 498a14bd..6bcfe40f 100644
weston_log("warning: EGL page flip event notification "
"not supported\n");
diff --git a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h
-index 1c3fec1c..11e9ccc1 100644
+index deb1b1c3..31096e64 100644
--- a/shared/weston-egl-ext.h
+++ b/shared/weston-egl-ext.h
-@@ -197,6 +197,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
+@@ -215,6 +215,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
#define EGL_DRM_FLIP_EVENT_DATA_NV 0x333E
#endif /* EGL_NV_output_drm_flip_event */
@@ -322,5 +322,5 @@ index 1c3fec1c..11e9ccc1 100644
/* EGL platform definition are keept to allow compositor-xx.c to build */
--
-2.11.1
+2.13.3
diff --git a/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch b/0005-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
index fcbf8fe04c5..33bccb67ad1 100644
--- a/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
+++ b/0005-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
@@ -1,7 +1,7 @@
-From d89c874ea121b6855c7bdf2e757fa13d0b04661f Mon Sep 17 00:00:00 2001
+From 7f613474a4d3fe83d297700b56ba06b143b473bc 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 4/7] compositor-drm: Gracefully handle vblank and flip invalid
+Subject: [PATCH 5/9] compositor-drm: Gracefully handle vblank and flip invalid
timestamps
X-NVConfidentiality: public
@@ -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 1d38f051..12c1b8b5 100644
+index 63153271..7120b578 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -1,6 +1,7 @@
@@ -33,7 +33,7 @@ index 1d38f051..12c1b8b5 100644
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -825,8 +826,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -1013,8 +1014,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 1d38f051..12c1b8b5 100644
ts.tv_sec = vbl.reply.tval_sec;
ts.tv_nsec = vbl.reply.tval_usec * 1000;
-@@ -847,7 +856,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -1035,7 +1044,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
}
}
@@ -60,9 +60,9 @@ index 1d38f051..12c1b8b5 100644
+ /* Immediate query succeeded, but didn't provide valid timestamp.
* Use pageflip fallback.
*/
- fb_id = output->current->fb_id;
-@@ -935,6 +944,19 @@ page_flip_handler(int fd, unsigned int frame,
- else if (!output->vblank_pending) {
+ fb_id = output->fb_current->fb_id;
+@@ -1136,6 +1145,19 @@ page_flip_handler(int fd, unsigned int frame,
+
ts.tv_sec = sec;
ts.tv_nsec = usec * 1000;
+
@@ -82,5 +82,5 @@ index 1d38f051..12c1b8b5 100644
/* We can't call this from frame_notify, because the output's
--
-2.11.1
+2.13.3
diff --git a/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch b/0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
index 7c1fe10bd5b..12d9e0121fc 100644
--- a/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
+++ b/0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
@@ -1,7 +1,7 @@
-From b1db106d3c91c1b35a01573a455c5661a17a06ee Mon Sep 17 00:00:00 2001
+From a151d9d94a819673a4fa2cafef2a91dbedc17be4 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 5/7] compositor-drm: Add support for EGLDevice+EGLOutput
+Subject: [PATCH 6/9] compositor-drm: Add support for EGLDevice+EGLOutput
X-NVConfidentiality: public
As previously stated, EGLDevice and EGLOutput will provide means
@@ -26,14 +26,14 @@ Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
compositor/main.c | 2 +
- libweston/compositor-drm.c | 303 ++++++++++++++++++++++++++++++++-------------
+ libweston/compositor-drm.c | 285 ++++++++++++++++++++++++++++++++-------------
libweston/compositor-drm.h | 4 +
libweston/gl-renderer.h | 1 +
shared/weston-egl-ext.h | 9 ++
- 5 files changed, 230 insertions(+), 89 deletions(-)
+ 5 files changed, 220 insertions(+), 81 deletions(-)
diff --git a/compositor/main.c b/compositor/main.c
-index 72c3cd10..ad348d82 100644
+index f8a60e97..7abc8d1a 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -566,6 +566,7 @@ usage(int error_code)
@@ -53,10 +53,10 @@ index 72c3cd10..ad348d82 100644
parse_options(options, ARRAY_LENGTH(options), argc, argv);
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 12c1b8b5..0236d196 100644
+index 7120b578..1eed58a7 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -94,7 +94,10 @@ struct drm_backend {
+@@ -95,7 +95,10 @@ struct drm_backend {
int fd;
char *filename;
} drm;
@@ -67,7 +67,7 @@ index 12c1b8b5..0236d196 100644
struct wl_listener session_listener;
uint32_t gbm_format;
-@@ -113,6 +116,7 @@ struct drm_backend {
+@@ -114,6 +117,7 @@ struct drm_backend {
int cursors_are_broken;
int use_pixman;
@@ -75,57 +75,60 @@ index 12c1b8b5..0236d196 100644
struct udev_input input;
-@@ -595,17 +599,21 @@ drm_output_render_gl(struct drm_output *output, pixman_region32_t *damage)
+@@ -735,19 +739,23 @@ drm_output_render_gl(struct drm_output *output, pixman_region32_t *damage)
output->base.compositor->renderer->repaint_output(&output->base,
damage);
- bo = gbm_surface_lock_front_buffer(output->gbm_surface);
- if (!bo) {
- weston_log("failed to lock front buffer: %m\n");
-- return;
+- return NULL;
- }
+ if (b->use_egldevice)
-+ output->next = output->dumb[0];
++ ret = drm_fb_ref(output->dumb[0]);
+ else {
+ bo = gbm_surface_lock_front_buffer(output->gbm_surface);
+ if (!bo) {
+ weston_log("failed to lock front buffer: %m\n");
-+ return;
++ return NULL;
+ }
-- output->next = drm_fb_get_from_bo(bo, b, output->gbm_format);
-- if (!output->next) {
+- ret = drm_fb_get_from_bo(bo, b, output->gbm_format, BUFFER_GBM_SURFACE);
+- if (!ret) {
- weston_log("failed to get drm_fb for bo\n");
- gbm_surface_release_buffer(output->gbm_surface, bo);
-- return;
-+ output->next = drm_fb_get_from_bo(bo, b, output->gbm_format);
-+ if (!output->next) {
+- return NULL;
++ ret = drm_fb_get_from_bo(bo, b, output->gbm_format, BUFFER_GBM_SURFACE);
++ if (!ret) {
+ weston_log("failed to get drm_fb for bo\n");
+ gbm_surface_release_buffer(output->gbm_surface, bo);
-+ return;
++ return NULL;
+ }
++ ret->gbm_surface = output->gbm_surface;
}
- }
+- ret->gbm_surface = output->gbm_surface;
-@@ -730,9 +738,14 @@ drm_output_repaint(struct weston_output *output_base,
- output_base->set_dpms(output_base, WESTON_DPMS_ON);
+ return ret;
+ }
+@@ -898,9 +906,14 @@ drm_output_repaint(struct weston_output *output_base,
+ output->state_invalid = false;
}
- if (drmModePageFlip(backend->drm.fd, output->crtc_id,
-- output->next->fb_id,
+- output->fb_pending->fb_id,
- DRM_MODE_PAGE_FLIP_EVENT, output) < 0) {
+ if (backend->use_egldevice)
+ ret = gl_renderer->output_stream_flip(&output->base, output);
+ else
+ ret = drmModePageFlip(backend->drm.fd, output->crtc_id,
-+ output->next->fb_id,
++ output->fb_pending->fb_id,
+ DRM_MODE_PAGE_FLIP_EVENT, output);
+
+ if (ret < 0) {
weston_log("queueing pageflip failed: %m\n");
goto err_pageflip;
}
-@@ -803,7 +816,6 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -985,7 +998,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);
@@ -133,25 +136,29 @@ index 12c1b8b5..0236d196 100644
struct timespec ts, tnow;
struct timespec vbl2now;
int64_t refresh_nsec;
-@@ -859,10 +871,14 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -1047,13 +1059,17 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
/* Immediate query succeeded, but didn't provide valid timestamp.
* Use pageflip fallback.
*/
-- fb_id = output->current->fb_id;
+- fb_id = output->fb_current->fb_id;
+-
+ assert(!output->page_flip_pending);
+ assert(!output->fb_last);
+
+- if (drmModePageFlip(backend->drm.fd, output->crtc_id, fb_id,
+- DRM_MODE_PAGE_FLIP_EVENT, output) < 0) {
+ if (backend->use_egldevice)
+ ret = gl_renderer->output_stream_flip(&output->base, output);
+ else
+ ret = drmModePageFlip(backend->drm.fd, output->crtc_id,
-+ output->current->fb_id,
++ output->fb_current->fb_id,
+ DRM_MODE_PAGE_FLIP_EVENT, output);
-
-- if (drmModePageFlip(backend->drm.fd, output->crtc_id, fb_id,
-- DRM_MODE_PAGE_FLIP_EVENT, output) < 0) {
++
+ if (ret < 0) {
weston_log("queueing pageflip failed: %m\n");
goto finish_frame;
}
-@@ -1589,11 +1605,6 @@ create_gbm_device(int fd)
+@@ -1761,11 +1777,6 @@ create_gbm_device(int fd)
{
struct gbm_device *gbm;
@@ -163,7 +170,7 @@ index 12c1b8b5..0236d196 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 +1617,40 @@ create_gbm_device(int fd)
+@@ -1778,6 +1789,40 @@ create_gbm_device(int fd)
return gbm;
}
@@ -204,7 +211,7 @@ index 12c1b8b5..0236d196 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 +1677,62 @@ fallback_format_for(uint32_t format)
+@@ -1804,38 +1849,62 @@ fallback_format_for(uint32_t format)
static int
drm_backend_create_gl_renderer(struct drm_backend *b)
{
@@ -288,7 +295,7 @@ index 12c1b8b5..0236d196 100644
return -1;
}
-@@ -1894,50 +1963,83 @@ find_crtc_for_connector(struct drm_backend *b,
+@@ -2122,37 +2191,67 @@ err:
static int
drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
{
@@ -296,7 +303,7 @@ index 12c1b8b5..0236d196 100644
- output->gbm_format,
- fallback_format_for(output->gbm_format),
- };
-- int i, flags, n_formats = 1;
+- int n_formats = 1;
-
- output->gbm_surface = gbm_surface_create(b->gbm,
- output->base.current_mode->width,
@@ -341,8 +348,7 @@ index 12c1b8b5..0236d196 100644
+ output->dumb[0] = NULL;
+ return -1;
+ }
-
-- flags = GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE;
++
+ /* FIXME: Add hw planes and cursors for EGL device when supported */
+ b->sprites_are_broken = 1;
+ b->cursors_are_broken = 1;
@@ -351,7 +357,7 @@ index 12c1b8b5..0236d196 100644
+ output->gbm_format,
+ fallback_format_for(output->gbm_format),
+ };
-+ int i, flags, n_formats = 1;
++ int n_formats = 1;
+
+ output->gbm_surface = gbm_surface_create(
+ b->gbm,
@@ -365,9 +371,7 @@ index 12c1b8b5..0236d196 100644
+ return -1;
+ }
-- for (i = 0; i < 2; i++) {
-- if (output->gbm_cursor_bo[i])
-- continue;
+- drm_output_init_cursor_egl(output, b);
+ if (format[1])
+ n_formats = 2;
+ if (gl_renderer->output_window_create(
@@ -382,36 +386,13 @@ index 12c1b8b5..0236d196 100644
+ gbm_surface_destroy(output->gbm_surface);
+ return -1;
+ }
-
-- output->gbm_cursor_bo[i] =
-- gbm_bo_create(b->gbm, b->cursor_width, b->cursor_height,
-- GBM_FORMAT_ARGB8888, flags);
-- }
-+ flags = GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE;
-
-- if (output->gbm_cursor_bo[0] == NULL || output->gbm_cursor_bo[1] == NULL) {
-- weston_log("cursor buffers unavailable, using gl cursors\n");
-- b->cursors_are_broken = 1;
-+ for (i = 0; i < 2; i++) {
-+ if (output->gbm_cursor_bo[i])
-+ continue;
-+
-+ output->gbm_cursor_bo[i] =
-+ gbm_bo_create(b->gbm,
-+ b->cursor_width,
-+ b->cursor_height,
-+ GBM_FORMAT_ARGB8888,
-+ flags);
-+ }
+
-+ if (output->gbm_cursor_bo[0] == NULL || output->gbm_cursor_bo[1] == NULL) {
-+ weston_log("cursor buffers unavailable, using gl cursors\n");
-+ b->cursors_are_broken = 1;
-+ }
- }
++ drm_output_init_cursor_egl(output, b);
++ }
return 0;
-@@ -1947,7 +2049,14 @@ static void
+ }
+@@ -2161,7 +2260,15 @@ static void
drm_output_fini_egl(struct drm_output *output)
{
gl_renderer->output_destroy(&output->base);
@@ -424,10 +405,11 @@ index 12c1b8b5..0236d196 100644
+
+ if (output->gbm_surface)
+ gbm_surface_destroy(output->gbm_surface);
++
+ drm_output_fini_cursor_egl(output);
}
- static int
-@@ -3107,6 +3216,11 @@ recorder_binding(struct weston_keyboard *keyboard, uint32_t time, uint32_t key,
+@@ -3438,6 +3545,11 @@ recorder_binding(struct weston_keyboard *keyboard, uint32_t time, uint32_t key,
struct drm_output *output;
int width, height;
@@ -439,7 +421,7 @@ index 12c1b8b5..0236d196 100644
output = container_of(b->compositor->output_list.next,
struct drm_output, base.link);
-@@ -3162,11 +3276,20 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -3493,11 +3605,20 @@ switch_to_gl_renderer(struct drm_backend *b)
weston_log("Switching to GL renderer\n");
@@ -465,7 +447,7 @@ index 12c1b8b5..0236d196 100644
}
wl_list_for_each(output, &b->compositor->output_list, base.link)
-@@ -3175,7 +3298,8 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -3506,7 +3627,8 @@ switch_to_gl_renderer(struct drm_backend *b)
b->compositor->renderer->destroy(b->compositor);
if (drm_backend_create_gl_renderer(b) < 0) {
@@ -475,16 +457,16 @@ index 12c1b8b5..0236d196 100644
weston_log("Failed to create GL renderer. Quitting.\n");
/* FIXME: we need a function to shutdown cleanly */
assert(0);
-@@ -3239,6 +3363,7 @@ drm_backend_create(struct weston_compositor *compositor,
- b->sprites_are_broken = 1;
+@@ -3572,6 +3694,7 @@ drm_backend_create(struct weston_compositor *compositor,
b->compositor = compositor;
b->use_pixman = config->use_pixman;
+ b->pageflip_timeout = config->pageflip_timeout;
+ b->use_egldevice = config->use_egldevice;
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 2e2995a2..9cd0eef6 100644
+index 08707197..bb4ce8cb 100644
--- a/libweston/compositor-drm.h
+++ b/libweston/compositor-drm.h
@@ -110,6 +110,10 @@ struct weston_drm_backend_config {
@@ -511,10 +493,10 @@ index 39ea3b42..37252492 100644
#endif /* ENABLE_EGL */
diff --git a/shared/weston-egl-ext.h b/shared/weston-egl-ext.h
-index 11e9ccc1..de82310f 100644
+index 31096e64..778eae07 100644
--- a/shared/weston-egl-ext.h
+++ b/shared/weston-egl-ext.h
-@@ -162,6 +162,10 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
+@@ -180,6 +180,10 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
#define EGL_PLATFORM_DEVICE_EXT 0x313F
#endif
@@ -525,7 +507,7 @@ index 11e9ccc1..de82310f 100644
/*
* 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,
+@@ -228,6 +232,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
#define EGL_PLATFORM_X11_KHR 0x31D5
#define EGL_PLATFORM_DEVICE_EXT 0x313F
@@ -538,5 +520,5 @@ index 11e9ccc1..de82310f 100644
#endif
--
-2.11.1
+2.13.3
diff --git a/0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch b/0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
index 3e6e03cc34b..9ac968f5b5e 100644
--- a/0006-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
+++ b/0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
@@ -1,7 +1,7 @@
-From c876b463f62b18da2446ad097d0bdad63d34363d Mon Sep 17 00:00:00 2001
+From ce015e27839809ed4d602dd8d977f2df770b0921 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
+Subject: [PATCH 7/9] 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
@@ -22,7 +22,7 @@ Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
1 file changed, 35 insertions(+), 32 deletions(-)
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
-index 9b6fa1f2..59311cfc 100644
+index dad0f09b..5398a315 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -221,11 +221,32 @@ init_egl(struct display *display, struct window *window)
@@ -118,7 +118,7 @@ index 9b6fa1f2..59311cfc 100644
if (window->xdg_toplevel)
zxdg_toplevel_v6_destroy(window->xdg_toplevel);
if (window->xdg_surface)
-@@ -895,9 +896,7 @@ main(int argc, char **argv)
+@@ -902,9 +903,7 @@ main(int argc, char **argv)
wl_display_roundtrip(display.display);
@@ -128,7 +128,7 @@ index 9b6fa1f2..59311cfc 100644
display.cursor_surface =
wl_compositor_create_surface(display.compositor);
-@@ -907,23 +906,27 @@ main(int argc, char **argv)
+@@ -914,23 +913,27 @@ main(int argc, char **argv)
sigint.sa_flags = SA_RESETHAND;
sigaction(SIGINT, &sigint, NULL);
@@ -164,5 +164,5 @@ index 9b6fa1f2..59311cfc 100644
wl_surface_destroy(display.cursor_surface);
if (display.cursor_theme)
--
-2.11.1
+2.13.3
diff --git a/0009-compositor-Process-stream-attach-requests-with-wl_eg.patch b/0008-compositor-Process-stream-attach-requests-with-wl_eg.patch
index 46ec4d03fb8..c322de76080 100644
--- a/0009-compositor-Process-stream-attach-requests-with-wl_eg.patch
+++ b/0008-compositor-Process-stream-attach-requests-with-wl_eg.patch
@@ -1,7 +1,7 @@
-From 0c3c2b77d486f90e19bd6fcfdefc42b143e40b1d Mon Sep 17 00:00:00 2001
+From a044287897d3646440644555f7ac1d756e39e0d2 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Thu, 18 May 2017 14:35:36 -0700
-Subject: [PATCH] compositor: Process stream attach requests with
+Subject: [PATCH 8/9] compositor: Process stream attach requests with
wl_eglstream_controller
X-NVConfidentiality: public
@@ -32,7 +32,7 @@ Signed-off-by: Ashutosh Agarwal <asagarwal@nvidia.com>
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
---
Makefile.am | 5 ++
- Makefile.in | 4 +
+ Makefile.in | 4 ++++
libweston/compositor.c | 78 ++++++++++++++++
libweston/compositor.h | 4 +
libweston/gl-renderer.c | 145 +++++++++++++++++++-----------
@@ -41,10 +41,10 @@ Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
create mode 100644 protocol/wayland-eglstream-controller.xml
diff --git a/Makefile.am b/Makefile.am
-index cdf82ab4..6b706c96 100644
+index e9679e68..59a8ffbc 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -182,6 +182,11 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
+@@ -185,6 +185,11 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
@@ -57,18 +57,18 @@ index cdf82ab4..6b706c96 100644
weston_LDFLAGS = -export-dynamic
diff --git a/Makefile.in b/Makefile.in
-index 0202bfb..4de3f53 100644
+index e24003b3..c8c3df10 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -2107,6 +2107,7 @@ noinst_LTLIBRARIES = libsession-helper.la $(am__append_31) \
+@@ -2135,6 +2135,7 @@ noinst_LTLIBRARIES = libsession-helper.la $(am__append_33) \
BUILT_SOURCES = \
$(nodist_libweston_desktop_@LIBWESTON_MAJOR@_la_SOURCES) \
$(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES) \
+ $(nodist_libweston_eglstreams_@LIBWESTON_MAJOR@_la_SOURCES) \
- $(am__append_28) $(am__append_30) $(am__append_32) \
+ $(am__append_30) $(am__append_32) $(am__append_34) \
protocol/weston-screenshooter-protocol.c \
protocol/weston-screenshooter-client-protocol.h \
-@@ -2270,6 +2271,9 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
+@@ -2302,6 +2303,9 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
protocol/pointer-constraints-unstable-v1-protocol.c \
protocol/pointer-constraints-unstable-v1-server-protocol.h
@@ -79,7 +79,7 @@ index 0202bfb..4de3f53 100644
weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \
-DMODULEDIR='"$(moduledir)"' \
diff --git a/libweston/compositor.c b/libweston/compositor.c
-index 9ded23f3..ecc0f841 100644
+index 813b6634..bb0cee70 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -2,6 +2,7 @@
@@ -98,7 +98,7 @@ index 9ded23f3..ecc0f841 100644
#define DEFAULT_REPAINT_WINDOW 7 /* milliseconds */
-@@ -4991,6 +4993,80 @@ bind_presentation(struct wl_client *client,
+@@ -5170,6 +5172,80 @@ bind_presentation(struct wl_client *client,
wp_presentation_send_clock_id(resource, compositor->presentation_clock);
}
@@ -179,7 +179,7 @@ index 9ded23f3..ecc0f841 100644
static void
compositor_bind(struct wl_client *client,
void *data, uint32_t version, uint32_t id)
-@@ -5102,6 +5178,8 @@ weston_compositor_create(struct wl_display *display, void *user_data)
+@@ -5281,6 +5357,8 @@ weston_compositor_create(struct wl_display *display, void *user_data)
ec, bind_presentation))
goto fail;
@@ -189,13 +189,13 @@ index 9ded23f3..ecc0f841 100644
goto fail;
diff --git a/libweston/compositor.h b/libweston/compositor.h
-index 08e728a9..a9105534 100644
+index 769203a1..dbd95035 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
-@@ -732,6 +732,10 @@ struct weston_renderer {
- /** See weston_compositor_import_dmabuf() */
- bool (*import_dmabuf)(struct weston_compositor *ec,
- struct linux_dmabuf_buffer *buffer);
+@@ -754,6 +754,10 @@ struct weston_renderer {
+ bool (*query_dmabuf_modifiers)(struct weston_compositor *ec,
+ int format, uint64_t **modifiers,
+ int *num_modifiers);
+
+ /** Create weston endpoint of an EGLStream & attach a consumer to it */
+ bool (*attach_eglstream_consumer)(struct weston_surface *es,
@@ -204,7 +204,7 @@ index 08e728a9..a9105534 100644
enum weston_capability {
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 6bcfe40f..34f7842f 100644
+index a9ed723f..19f96ae4 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -1,7 +1,7 @@
@@ -216,7 +216,7 @@ index 6bcfe40f..34f7842f 100644
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -2059,18 +2059,9 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
+@@ -2165,18 +2165,9 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
gs->y_inverted = buffer->y_inverted;
}
@@ -238,7 +238,7 @@ index 6bcfe40f..34f7842f 100644
{
#ifdef EGL_NV_stream_attrib
struct weston_compositor *ec = es->compositor;
-@@ -2079,65 +2070,109 @@ gl_renderer_attach_stream_texture(struct weston_surface *es,
+@@ -2185,65 +2176,109 @@ gl_renderer_attach_stream_texture(struct weston_surface *es,
EGLStreamKHR stream = EGL_NO_STREAM_KHR;
EGLAttrib stream_attribs[] = {
#ifdef EGL_WL_wayland_eglstream
@@ -389,7 +389,7 @@ index 6bcfe40f..34f7842f 100644
}
/* At this point we should have a valid stream handle */
-@@ -3485,6 +3520,8 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -3601,6 +3636,8 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
gr->base.surface_get_content_size =
gl_renderer_surface_get_content_size;
gr->base.surface_copy_content = gl_renderer_surface_copy_content;
@@ -442,5 +442,5 @@ index 00000000..dea072e6
+ </interface>
+</protocol>
--
-2.12.2
+2.13.3
diff --git a/0007-Add-nvidia-release-notes-file.patch b/0009-Add-nvidia-release-notes-file.patch
index 8ceddd02aee..e6994c3f98e 100644
--- a/0007-Add-nvidia-release-notes-file.patch
+++ b/0009-Add-nvidia-release-notes-file.patch
@@ -1,26 +1,26 @@
-From 7f733c58c947c5355dda3d829dd0f4a47c4c819d Mon Sep 17 00:00:00 2001
+From 394829957069c7ac67c847dbccc38b8089bc788e 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
+Date: Wed, 9 Aug 2017 16:01:34 -0700
+Subject: [PATCH 9/9] 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(+)
+ nvidia-release-notes | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
create mode 100644 nvidia-release-notes
diff --git a/nvidia-release-notes b/nvidia-release-notes
new file mode 100644
-index 00000000..4bd24000
+index 00000000..0894c8ff
--- /dev/null
+++ b/nvidia-release-notes
-@@ -0,0 +1,21 @@
-+NVIDIA EGLStream-based Weston version 2.0
+@@ -0,0 +1,27 @@
++NVIDIA EGLStream-based Weston version 3.0
+-----------------------------------------
+
+This branch includes NVIDIA EGLStream patches on top of
-+Weston 2.0.
++Weston 3.0.
+
+* Known issues:
+
@@ -28,9 +28,15 @@ index 00000000..4bd24000
+ clients that implement the new interface from
+ starting
+
++ Fixed if using wl_eglstream_controller from commit:
++
++ a044287897d3646440644555f7ac1d756e39e0d2 compositor: Process stream attach requests with wl_eglstream_controller
++
++ (Needs libnvidia-egl-wayland.so >= 1.0.2 - https://github.com/NVIDIA/egl-wayland)
++
+ Fixed in 'weston-simple-egl' with commit:
+
-+ c876b463f62b18da2446ad097d0bdad63d34363d simple-egl: Do not set EGL up until XDG setup is complete
++ ce015e27839809ed4d602dd8d977f2df770b0921 simple-egl: Do not set EGL up until XDG setup is complete
+
+
+* Contact:
@@ -38,5 +44,5 @@ index 00000000..4bd24000
+ Miguel A. Vico (mvicomoya AT nvidia.com)
+
--
-2.11.1
+2.13.3
diff --git a/PKGBUILD b/PKGBUILD
index 2b7b0c9a2be..5d3da9e256a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,8 @@
# Contributor: Joel Teichroeb <joel@teichroeb.net>
pkgname=weston-eglstream
-pkgver=2.0.0
-pkgrel=3
+pkgver=3.0.0
+pkgrel=1
pkgdesc='Reference implementation of a Wayland compositor with EGLStream support'
arch=('i686' 'x86_64')
url='https://wayland.freedesktop.org/'
@@ -18,38 +18,38 @@ makedepends=('wayland-protocols')
provides=('weston')
conflicts=('weston')
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'
- '0008-compositor-drm-Release-current-next-fb-when-deactiva.patch'
- '0009-compositor-Process-stream-attach-requests-with-wl_eg.patch')
-sha256sums=('b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8'
- 'c81d07f0a2b26e772faa02e4b088ff979206216652a4c30beb9aa24631d9d648'
- 'c32048c7b1e57c24ca7fa665c9e70bc3c12dec338aea3643b637bf8d30188335'
- 'fabb4ca507b0a5978ebc7f635989637ccfbdeee9b84119bc6588028342913856'
- 'db56a9f0d09441af58d530130e5f04f7066d11a32cdd99522e39a19ee4ee9f46'
- '8087849a01853e5c69fad7c9821e2202fd78ffe904626fe2f9ff51e83816ed02'
- '3bb9b0a354aa07fb3eb89ad9b7e425b1ce980b1bd0b90166a41795a80acc78ca'
- '47fc9f44083096299e1502cf15c93d9f8670e1a4e4784870d7a843d4de09d502'
- 'ca6c3a6fef381c6c7dd05e6d1bfda97b221fd90fc78ebf7b7ade9cfad2b38b63'
- 'd9f0bb2ac862017d0a1f0bddd3fedb5d4e7be3b5af6dd579d75442f9f88acf63')
+ '0001-compositor-drm-Release-current-next-fb-when-deactiva.patch'
+ '0002-gl-renderer-Add-EGLDevice-enumeration-support.patch'
+ '0003-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch'
+ '0004-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch'
+ '0005-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch'
+ '0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch'
+ '0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch'
+ '0008-compositor-Process-stream-attach-requests-with-wl_eg.patch'
+ '0009-Add-nvidia-release-notes-file.patch')
+sha256sums=('cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5'
+ 'c643d5b305ce91150eb0615836dcee494cc28cd12d7cb60e835b69ee5f8c452a'
+ '689f619cb8691416f67fd052b217658dfe3dd2bdf3cb4ede532c8240546f998d'
+ '058ab62996f7d000c144963148fa2e39a9c99bc4e0cac3e56926426fc100dac0'
+ '9f96e3a94a02cc7fb91d0c8660a8bf6497c8375ce88c0115a2ee8b6c558bcab4'
+ '04cab2302462d3680152743289e39766b5e38be7acc5b91a1b5cadec6f98d714'
+ '93e77066b08e213af1173ef5438b5bdc62cc7e638a43d813fe5b73b437c71250'
+ '6786b4c9e77dfc60db04f05a0b613a71b968d1d12d38c534a240f63a34059757'
+ 'ac8c20a932d7e70f4a93a0121cd476be84bf0498a91e927ffe79de66c03382b6'
+ 'c37571d1bea9114a31f360a75a449f10bec067f32aaddd0337e1b95076295f1e')
prepare() {
cd weston-$pkgver
- 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"
- patch -Np1 -i "${srcdir}/0008-compositor-drm-Release-current-next-fb-when-deactiva.patch"
- patch -Np1 -i "${srcdir}/0009-compositor-Process-stream-attach-requests-with-wl_eg.patch"
+ patch -Np1 -i "${srcdir}/0001-compositor-drm-Release-current-next-fb-when-deactiva.patch"
+ patch -Np1 -i "${srcdir}/0002-gl-renderer-Add-EGLDevice-enumeration-support.patch"
+ patch -Np1 -i "${srcdir}/0003-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch"
+ patch -Np1 -i "${srcdir}/0004-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch"
+ patch -Np1 -i "${srcdir}/0005-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch"
+ patch -Np1 -i "${srcdir}/0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch"
+ patch -Np1 -i "${srcdir}/0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch"
+ patch -Np1 -i "${srcdir}/0008-compositor-Process-stream-attach-requests-with-wl_eg.patch"
+ patch -Np1 -i "${srcdir}/0009-Add-nvidia-release-notes-file.patch"
}
build() {