summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--0001-gl-renderer-Add-EGLDevice-enumeration-support.patch8
-rw-r--r--0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch8
-rw-r--r--0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch6
-rw-r--r--0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch20
-rw-r--r--0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch190
-rw-r--r--0006-compositor-Process-stream-attach-requests-with-wl_eg.patch (renamed from 0007-compositor-Process-stream-attach-requests-with-wl_eg.patch)36
-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)8
-rw-r--r--0008-Add-nvidia-release-notes-file.patch16
-rw-r--r--PKGBUILD30
10 files changed, 198 insertions, 152 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 71ac333a5116..1932470b5ddf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = weston-eglstream
pkgdesc = Reference implementation of a Wayland compositor with EGLStream support
- pkgver = 4.0.0
- pkgrel = 2
+ pkgver = 5.0.0
+ pkgrel = 1
url = https://wayland.freedesktop.org/
arch = i686
arch = x86_64
@@ -35,24 +35,24 @@ pkgbase = weston-eglstream
depends = egl-wayland
provides = weston
conflicts = weston
- source = https://wayland.freedesktop.org/releases/weston-4.0.0.tar.xz
+ source = https://wayland.freedesktop.org/releases/weston-5.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-compositor-Process-stream-attach-requests-with-wl_eg.patch
+ source = 0006-compositor-Process-stream-attach-requests-with-wl_eg.patch
+ source = 0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
source = 0008-Add-nvidia-release-notes-file.patch
- sha256sums = a0fc0ae7ef83dfbed12abfe9b8096a24a7dd00705e86fa0db1e619ded18b4b58
- sha256sums = 41cb791c07e377ce16ccb7ba6a6a84a49e5351c3ed815a98076069fb1386ecec
- sha256sums = 0bd297017262bf278e20c05e5d0a46208c77f5462d80db1906286764de867720
- sha256sums = a6a05d101701ff97bee1d5d3974fbbc12abb34c4b483568cc3c3552e328c3b55
- sha256sums = d8f04aef2b38628b38dae92c73f16aab36b74ca83a44d144123439cb68c273a6
- sha256sums = dda90181e2f91c03da8d180d7fbae42d61e2a31122301a2fc08f020b1da19a84
- sha256sums = f893280becdb18583d234d1a26814aa092356402fc8731a1b2da8ef8d6963a6e
- sha256sums = 5e56cf8d136a241cb05abcad39537287a97777c1697746697631c10f9ab551f1
- sha256sums = 919923d3a545d1e8420d128cd63d7e60095887ec603d417e23df6d7138ba42da
+ sha256sums = 15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf
+ sha256sums = 467c25f7158e54736ed7e9d071c8524e0f83509defcea49a7b053b11be1e9f93
+ sha256sums = b60522d00263f1e67e4d4ca823550c1c90f30be450facd9a95fca7a91376b160
+ sha256sums = 7ae690d0f75c8e341efea4a2b1f3557a0aec481fa38fe732b61805f9ee530b03
+ sha256sums = 4845734de15fa99dbfc7e58b364996a72f63cf3632793d57eca7f696d3d6186e
+ sha256sums = 037632c607638d98cf04cb5f1d5754842b77670671358ef34629c8c9dc2d9d19
+ sha256sums = c83406c44c75e68f2efe0419d9500d1e4a3b5b6c212bec9df15bb40b6b2287dc
+ sha256sums = 7d756c6e091eb6933aa49d7bb822e3a10abfdab5466f7c3763e7bff3ce60090f
+ sha256sums = aad2f5c1941abae1cf42db3c59377aa688a9c9fbb0f60b15defc67bd63f9c149
pkgname = weston-eglstream
diff --git a/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch b/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
index 3b451da853e3..377c7fc25e9e 100644
--- a/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
+++ b/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
@@ -1,4 +1,4 @@
-From 89c953d8bc97cb9d80c344d8dad4e44ed22ee691 Mon Sep 17 00:00:00 2001
+From 0592a2a1b337880ce74d621297d10c988972efd1 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/8] gl-renderer: Add EGLDevice enumeration support
@@ -17,8 +17,8 @@ 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 | 89 ++++++++++++++++++++++++++++++++++++++++++++++++-
- libweston/gl-renderer.h | 8 +++++
+ libweston/gl-renderer.c | 89 ++++++++++++++++++++++++++++++++++++++++-
+ libweston/gl-renderer.h | 8 ++++
2 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
@@ -152,5 +152,5 @@ index b47ea07f..9ff4e21e 100644
};
--
-2.15.1
+2.18.0
diff --git a/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch b/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
index febe9db55cb3..b3fae87cbac8 100644
--- a/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
+++ b/0002-gl-renderer-Add-support-for-EGLDevice-composited-fra.patch
@@ -1,4 +1,4 @@
-From 61c044bfaa84364e6043e19dd8c056e1ccffb749 Mon Sep 17 00:00:00 2001
+From db0add622cd4f8594222e493e164bfb3224230e5 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/8] gl-renderer: Add support for EGLDevice composited frame
@@ -42,9 +42,9 @@ 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.c | 262 +++++++++++++++++++++++++++++++++++++++-
libweston/gl-renderer.h | 16 +++
- shared/weston-egl-ext.h | 40 ++++++++
+ 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
@@ -518,5 +518,5 @@ index 0784ea2d..f39990ed 100644
#endif /* ENABLE_EGL */
--
-2.15.1
+2.18.0
diff --git a/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch b/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
index 1e557c68c3dd..dec2adb7dcde 100644
--- a/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
+++ b/0003-gl-renderer-Add-EGL-client-support-for-EGLStream-fra.patch
@@ -1,4 +1,4 @@
-From b1109f50484634fe66e07e9ef958e870263a0b21 Mon Sep 17 00:00:00 2001
+From 1ec5af6e4f51004856d7aee2184d7e4fe11ef086 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Thu, 29 Mar 2018 00:15:49 -0700
Subject: [PATCH 3/8] gl-renderer: Add EGL client support for EGLStream frame
@@ -24,7 +24,7 @@ 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/gl-renderer.c | 183 +++++++++++++++++++++++++++++++++++++++-
shared/weston-egl-ext.h | 5 ++
2 files changed, 187 insertions(+), 1 deletion(-)
@@ -322,5 +322,5 @@ index f39990ed..96982e2d 100644
/* EGL platform definition are keept to allow compositor-xx.c to build */
--
-2.15.1
+2.18.0
diff --git a/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch b/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
index 0b4a62b47b40..744a4f766aff 100644
--- a/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
+++ b/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch
@@ -1,4 +1,4 @@
-From e207c4f2bf1e359e329b73974184ac4f8ef3a7f3 Mon Sep 17 00:00:00 2001
+From 51f88599bea32521399f572e02da6f7ff1557172 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/8] compositor-drm: Gracefully handle vblank and flip invalid
@@ -22,18 +22,18 @@ 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 c09c49bf..24573f48 100644
+index 38911763..577d2e2f 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -1,6 +1,7 @@
- /*
- * Copyright © 2008-2011 Kristian Høgsberg
+@@ -3,6 +3,7 @@
* Copyright © 2011 Intel Corporation
-+ * Copyright © 2016 NVIDIA Corporation
+ * Copyright © 2017, 2018 Collabora, Ltd.
+ * Copyright © 2017, 2018 General Electric Company
++ * Copyright © 2016-2018 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -1433,6 +1434,19 @@ drm_output_update_complete(struct drm_output *output, uint32_t flags,
+@@ -1860,6 +1861,19 @@ drm_output_update_complete(struct drm_output *output, uint32_t flags,
ts.tv_sec = sec;
ts.tv_nsec = usec * 1000;
@@ -53,7 +53,7 @@ index c09c49bf..24573f48 100644
weston_output_finish_frame(&output->base, &ts, flags);
/* We can't call this from frame_notify, because the output's
-@@ -2434,8 +2448,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -2849,8 +2863,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
vbl.request.type |= drm_waitvblank_pipe(output);
ret = drmWaitVBlank(backend->drm.fd, &vbl);
@@ -72,7 +72,7 @@ index c09c49bf..24573f48 100644
ts.tv_sec = vbl.reply.tval_sec;
ts.tv_nsec = vbl.reply.tval_usec * 1000;
-@@ -2456,7 +2478,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -2871,7 +2893,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
}
}
@@ -82,5 +82,5 @@ index c09c49bf..24573f48 100644
*/
--
-2.15.1
+2.18.0
diff --git a/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch b/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
index 03d0eb9c6e95..3b9fce0898f4 100644
--- a/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
+++ b/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
@@ -1,4 +1,4 @@
-From 951a52e7494aeb38da9804c887dfb285fdb1d600 Mon Sep 17 00:00:00 2001
+From a2a230463cf0bbbf452d40019f7e2aa31f6c7f1d 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/8] compositor-drm: Add support for EGLDevice+EGLOutput
@@ -26,17 +26,17 @@ Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
compositor/main.c | 2 +
- libweston/compositor-drm.c | 279 ++++++++++++++++++++++++++++++++-------------
+ libweston/compositor-drm.c | 319 +++++++++++++++++++++++++------------
libweston/compositor-drm.h | 4 +
libweston/gl-renderer.h | 1 +
shared/weston-egl-ext.h | 9 ++
- 5 files changed, 217 insertions(+), 78 deletions(-)
+ 5 files changed, 236 insertions(+), 99 deletions(-)
diff --git a/compositor/main.c b/compositor/main.c
-index 1e827884..af0cb902 100644
+index b5b4fc59..73b6fce1 100644
--- a/compositor/main.c
+++ b/compositor/main.c
-@@ -484,6 +484,7 @@ usage(int error_code)
+@@ -517,6 +517,7 @@ usage(int error_code)
" --tty=TTY\t\tThe tty to use\n"
" --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n"
" --use-pixman\t\tUse the pixman (CPU) renderer\n"
@@ -44,7 +44,7 @@ index 1e827884..af0cb902 100644
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n");
#endif
-@@ -1113,6 +1114,7 @@ load_drm_backend(struct weston_compositor *c,
+@@ -1845,6 +1846,7 @@ load_drm_backend(struct weston_compositor *c,
{ WESTON_OPTION_STRING, "drm-device", 0, &config.specific_device },
{ WESTON_OPTION_BOOLEAN, "current-mode", 0, &wet->drm_use_current_mode },
{ WESTON_OPTION_BOOLEAN, "use-pixman", 0, &config.use_pixman },
@@ -53,10 +53,10 @@ index 1e827884..af0cb902 100644
parse_options(options, ARRAY_LENGTH(options), argc, argv);
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 24573f48..572d78f8 100644
+index 577d2e2f..1352a38e 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -232,7 +232,10 @@ struct drm_backend {
+@@ -263,7 +263,10 @@ struct drm_backend {
int fd;
char *filename;
} drm;
@@ -67,15 +67,16 @@ index 24573f48..572d78f8 100644
struct wl_listener session_listener;
uint32_t gbm_format;
-@@ -261,6 +264,7 @@ struct drm_backend {
- bool atomic_modeset;
-
+@@ -293,6 +296,8 @@ struct drm_backend {
int use_pixman;
-+ int use_egldevice;
+ bool use_pixman_shadow;
++ int use_egldevice;
++
struct udev_input input;
-@@ -1654,19 +1658,23 @@ drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage)
+ int32_t cursor_width;
+@@ -2027,20 +2032,24 @@ drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage)
output->base.compositor->renderer->repaint_output(&output->base,
damage);
@@ -93,12 +94,14 @@ index 24573f48..572d78f8 100644
+ return NULL;
+ }
-- ret = drm_fb_get_from_bo(bo, b, output->gbm_format, BUFFER_GBM_SURFACE);
+- /* The renderer always produces an opaque image. */
+- ret = drm_fb_get_from_bo(bo, b, true, BUFFER_GBM_SURFACE);
- if (!ret) {
- weston_log("failed to get drm_fb for bo\n");
- gbm_surface_release_buffer(output->gbm_surface, bo);
- return NULL;
-+ ret = drm_fb_get_from_bo(bo, b, output->gbm_format, BUFFER_GBM_SURFACE);
++ /* The renderer always produces an opaque image. */
++ ret = drm_fb_get_from_bo(bo, b, true, BUFFER_GBM_SURFACE);
+ if (!ret) {
+ weston_log("failed to get drm_fb for bo\n");
+ gbm_surface_release_buffer(output->gbm_surface, bo);
@@ -110,7 +113,7 @@ index 24573f48..572d78f8 100644
return ret;
}
-@@ -1717,7 +1725,9 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
+@@ -2083,7 +2092,9 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
if (scanout_state->fb)
return;
@@ -121,7 +124,7 @@ index 24573f48..572d78f8 100644
scanout_plane->state_cur->fb &&
(scanout_plane->state_cur->fb->type == BUFFER_GBM_SURFACE ||
scanout_plane->state_cur->fb->type == BUFFER_PIXMAN_DUMB) &&
-@@ -1893,9 +1903,14 @@ drm_output_apply_state_legacy(struct drm_output_state *state)
+@@ -2267,9 +2278,14 @@ drm_output_apply_state_legacy(struct drm_output_state *state)
}
}
@@ -139,7 +142,7 @@ index 24573f48..572d78f8 100644
weston_log("queueing pageflip failed: %m\n");
goto err;
}
-@@ -3329,7 +3344,8 @@ init_kms_caps(struct drm_backend *b)
+@@ -3833,7 +3849,8 @@ init_kms_caps(struct drm_backend *b)
b->universal_planes ? "supports" : "does not support");
#ifdef HAVE_DRM_ATOMIC
@@ -149,7 +152,7 @@ index 24573f48..572d78f8 100644
ret = drmGetCap(b->drm.fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &cap);
if (ret != 0)
cap = 0;
-@@ -3348,11 +3364,6 @@ create_gbm_device(int fd)
+@@ -3868,11 +3885,6 @@ create_gbm_device(int fd)
{
struct gbm_device *gbm;
@@ -161,7 +164,7 @@ index 24573f48..572d78f8 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
-@@ -3365,6 +3376,40 @@ create_gbm_device(int fd)
+@@ -3885,6 +3897,40 @@ create_gbm_device(int fd)
return gbm;
}
@@ -202,7 +205,7 @@ index 24573f48..572d78f8 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.
*
-@@ -3391,38 +3436,62 @@ fallback_format_for(uint32_t format)
+@@ -3911,38 +3957,62 @@ fallback_format_for(uint32_t format)
static int
drm_backend_create_gl_renderer(struct drm_backend *b)
{
@@ -286,7 +289,7 @@ index 24573f48..572d78f8 100644
return -1;
}
-@@ -4052,37 +4121,67 @@ err:
+@@ -4653,63 +4723,90 @@ err:
static int
drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
{
@@ -295,32 +298,16 @@ index 24573f48..572d78f8 100644
- fallback_format_for(output->gbm_format),
- };
- int n_formats = 1;
--
-- output->gbm_surface = gbm_surface_create(b->gbm,
-- output->base.current_mode->width,
-- output->base.current_mode->height,
-- format[0],
-- GBM_BO_USE_SCANOUT |
-- GBM_BO_USE_RENDERING);
-- if (!output->gbm_surface) {
-- weston_log("failed to create gbm surface\n");
-- return -1;
-- }
+- struct weston_mode *mode = output->base.current_mode;
+- struct drm_plane *plane = output->scanout_plane;
+- unsigned int i;
+ if (b->use_egldevice) {
+ int w = output->base.current_mode->width;
+ int h = output->base.current_mode->height;
-- if (format[1])
-- n_formats = 2;
-- 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;
+- for (i = 0; i < plane->count_formats; i++) {
+- if (plane->formats[i].format == output->gbm_format)
+- break;
- }
+ /* Create a black dumb fb for modesetting */
+ output->dumb[0] = drm_fb_create_dumb(b, w, h,
@@ -339,7 +326,12 @@ index 24573f48..572d78f8 100644
+ output->dumb[0] = NULL;
+ return -1;
+ }
-+
+
+- if (i == plane->count_formats) {
+- weston_log("format 0x%x not supported by output %s\n",
+- output->gbm_format, output->base.name);
+- return -1;
+- }
+ /* FIXME: Add hw planes and cursors for EGL device when supported */
+ b->sprites_are_broken = 1;
+ b->cursors_are_broken = 1;
@@ -349,30 +341,84 @@ index 24573f48..572d78f8 100644
+ fallback_format_for(output->gbm_format),
+ };
+ int n_formats = 1;
++ struct weston_mode *mode = output->base.current_mode;
++ struct drm_plane *plane = output->scanout_plane;
++ unsigned int i;
++
++ for (i = 0; i < plane->count_formats; i++) {
++ if (plane->formats[i].format == output->gbm_format)
++ break;
++ }
+
-+ output->gbm_surface = gbm_surface_create(
-+ b->gbm,
-+ output->base.current_mode->width,
-+ output->base.current_mode->height,
-+ format[0],
-+ GBM_BO_USE_SCANOUT |
-+ GBM_BO_USE_RENDERING);
++ if (i == plane->count_formats) {
++ weston_log("format 0x%x not supported by output %s\n",
++ output->gbm_format, output->base.name);
++ return -1;
++ }
+
+ #ifdef HAVE_GBM_MODIFIERS
+- if (plane->formats[i].count_modifiers > 0) {
+- output->gbm_surface =
+- gbm_surface_create_with_modifiers(b->gbm,
+- mode->width,
+- mode->height,
+- output->gbm_format,
+- plane->formats[i].modifiers,
+- plane->formats[i].count_modifiers);
+- } else
++ if (plane->formats[i].count_modifiers > 0) {
++ output->gbm_surface =
++ gbm_surface_create_with_modifiers(b->gbm,
++ mode->width,
++ mode->height,
++ output->gbm_format,
++ plane->formats[i].modifiers,
++ plane->formats[i].count_modifiers);
++ } else
+ #endif
+- {
+- output->gbm_surface =
+- gbm_surface_create(b->gbm, mode->width, mode->height,
+- output->gbm_format,
+- GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT);
+- }
++ {
++ output->gbm_surface =
++ gbm_surface_create(b->gbm, mode->width, mode->height,
++ output->gbm_format,
++ GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT);
++ }
+
+- if (!output->gbm_surface) {
+- weston_log("failed to create gbm surface\n");
+- return -1;
+- }
+ if (!output->gbm_surface) {
+ weston_log("failed to create gbm surface\n");
+ return -1;
+ }
-+
+
+- if (format[1])
+- n_formats = 2;
+- 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;
+- }
+ if (format[1])
+ n_formats = 2;
-+ 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");
++ 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;
+ }
@@ -383,14 +429,14 @@ index 24573f48..572d78f8 100644
return 0;
}
-@@ -4104,7 +4203,15 @@ drm_output_fini_egl(struct drm_output *output)
+@@ -4731,7 +4828,15 @@ 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]);
++ drm_fb_unref(output->dumb[0]);
+ output->dumb[0] = NULL;
+ }
+
@@ -400,7 +446,7 @@ index 24573f48..572d78f8 100644
drm_output_fini_cursor_egl(output);
}
-@@ -5544,6 +5651,11 @@ recorder_binding(struct weston_keyboard *keyboard, const struct timespec *time,
+@@ -6608,6 +6713,11 @@ recorder_binding(struct weston_keyboard *keyboard, const struct timespec *time,
struct drm_output *output;
int width, height;
@@ -412,7 +458,7 @@ index 24573f48..572d78f8 100644
output = container_of(b->compositor->output_list.next,
struct drm_output, base.link);
-@@ -5599,11 +5711,20 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -6663,11 +6773,20 @@ switch_to_gl_renderer(struct drm_backend *b)
weston_log("Switching to GL renderer\n");
@@ -438,7 +484,7 @@ index 24573f48..572d78f8 100644
}
wl_list_for_each(output, &b->compositor->output_list, base.link)
-@@ -5612,7 +5733,8 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -6676,7 +6795,8 @@ switch_to_gl_renderer(struct drm_backend *b)
b->compositor->renderer->destroy(b->compositor);
if (drm_backend_create_gl_renderer(b) < 0) {
@@ -448,16 +494,16 @@ index 24573f48..572d78f8 100644
weston_log("Failed to create GL renderer. Quitting.\n");
/* FIXME: we need a function to shutdown cleanly */
assert(0);
-@@ -5681,6 +5803,7 @@ drm_backend_create(struct weston_compositor *compositor,
- b->compositor = compositor;
+@@ -6742,6 +6862,7 @@ drm_backend_create(struct weston_compositor *compositor,
b->use_pixman = config->use_pixman;
b->pageflip_timeout = config->pageflip_timeout;
+ b->use_pixman_shadow = config->use_pixman_shadow;
+ b->use_egldevice = config->use_egldevice;
compositor->backend = &b->base;
diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h
-index 68f93eab..01946a5b 100644
+index 9c37c153..a9d69e5e 100644
--- a/libweston/compositor-drm.h
+++ b/libweston/compositor-drm.h
@@ -104,6 +104,10 @@ struct weston_drm_backend_config {
@@ -470,7 +516,7 @@ index 68f93eab..01946a5b 100644
+
/** The seat to be used for input and output.
*
- * If NULL the default "seat0" will be used. The backend will
+ * If seat_id is NULL, the seat is taken from XDG_SEAT environment
diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
index 39ea3b42..37252492 100644
--- a/libweston/gl-renderer.h
@@ -511,5 +557,5 @@ index 96982e2d..e4e10ef9 100644
#endif
--
-2.15.1
+2.18.0
diff --git a/0007-compositor-Process-stream-attach-requests-with-wl_eg.patch b/0006-compositor-Process-stream-attach-requests-with-wl_eg.patch
index 0536ecf0ca7f..8ae69ac5e61e 100644
--- a/0007-compositor-Process-stream-attach-requests-with-wl_eg.patch
+++ b/0006-compositor-Process-stream-attach-requests-with-wl_eg.patch
@@ -1,7 +1,7 @@
-From 81512adf8d6f1ced68ea55513a8428f323d1185f Mon Sep 17 00:00:00 2001
+From 8d52cfe1ae51e6a69ec2c41c65faeb02a5cc1314 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 7/8] compositor: Process stream attach requests with
+Subject: [PATCH 6/8] compositor: Process stream attach requests with
wl_eglstream_controller
X-NVConfidentiality: public
@@ -32,18 +32,18 @@ Signed-off-by: Ashutosh Agarwal <asagarwal@nvidia.com>
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
---
Makefile.am | 5 +
- libweston/compositor.c | 78 ++++++++++++++++
+ libweston/compositor.c | 78 ++++++++++++
libweston/compositor.h | 4 +
- libweston/gl-renderer.c | 147 +++++++++++++++++++-----------
- protocol/wayland-eglstream-controller.xml | 37 ++++++++
+ libweston/gl-renderer.c | 147 ++++++++++++++--------
+ protocol/wayland-eglstream-controller.xml | 37 ++++++
5 files changed, 217 insertions(+), 54 deletions(-)
create mode 100644 protocol/wayland-eglstream-controller.xml
diff --git a/Makefile.am b/Makefile.am
-index 69ca6cba..fbfbe8d0 100644
+index 83bb2533..3b8fe631 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -172,6 +172,11 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
+@@ -173,6 +173,11 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
@@ -56,18 +56,18 @@ index 69ca6cba..fbfbe8d0 100644
weston_LDFLAGS = -export-dynamic
diff --git a/libweston/compositor.c b/libweston/compositor.c
-index 4816f33e..8c144117 100644
+index 9deb7817..a2941788 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
-@@ -2,6 +2,7 @@
- * Copyright © 2010-2011 Intel Corporation
+@@ -3,6 +3,7 @@
* Copyright © 2008-2011 Kristian Høgsberg
- * Copyright © 2012-2015 Collabora, Ltd.
-+ * Copyright © 2017 NVIDIA Corporation
+ * Copyright © 2012-2018 Collabora, Ltd.
+ * Copyright © 2017, 2018 General Electric Company
++ * Copyright © 2017-2018 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -63,6 +64,7 @@
+@@ -64,6 +65,7 @@
#include "git-version.h"
#include "version.h"
#include "plugin-registry.h"
@@ -75,7 +75,7 @@ index 4816f33e..8c144117 100644
#define DEFAULT_REPAINT_WINDOW 7 /* milliseconds */
-@@ -5243,6 +5245,80 @@ bind_presentation(struct wl_client *client,
+@@ -6246,6 +6248,80 @@ bind_presentation(struct wl_client *client,
wp_presentation_send_clock_id(resource, compositor->presentation_clock);
}
@@ -156,7 +156,7 @@ index 4816f33e..8c144117 100644
static void
compositor_bind(struct wl_client *client,
void *data, uint32_t version, uint32_t id)
-@@ -5355,6 +5431,8 @@ weston_compositor_create(struct wl_display *display, void *user_data)
+@@ -6361,6 +6437,8 @@ weston_compositor_create(struct wl_display *display, void *user_data)
ec, bind_presentation))
goto fail;
@@ -166,10 +166,10 @@ index 4816f33e..8c144117 100644
goto fail;
diff --git a/libweston/compositor.h b/libweston/compositor.h
-index 010f1fa8..d43625bc 100644
+index 8b7a1020..2edce664 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
-@@ -769,6 +769,10 @@ struct weston_renderer {
+@@ -924,6 +924,10 @@ struct weston_renderer {
void (*query_dmabuf_modifiers)(struct weston_compositor *ec,
int format, uint64_t **modifiers,
int *num_modifiers);
@@ -421,5 +421,5 @@ index 00000000..dea072e6
+ </interface>
+</protocol>
--
-2.15.1
+2.18.0
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 437e7a5a1b31..aaab3bc0f83c 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 6e414ed71b82b92fc21dd2bd05dc66fd1d05de97 Mon Sep 17 00:00:00 2001
+From 27266e389b238f023f8789fec40ae661541372e4 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/8] simple-egl: Do not set EGL up until XDG setup is complete
+Subject: [PATCH 7/8] 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
@@ -18,7 +18,7 @@ Related bug:
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
---
- clients/simple-egl.c | 67 +++++++++++++++++++++++++++-------------------------
+ clients/simple-egl.c | 67 +++++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 32 deletions(-)
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
@@ -164,5 +164,5 @@ index a1e57aef..0ca66415 100644
wl_surface_destroy(display.cursor_surface);
if (display.cursor_theme)
--
-2.15.1
+2.18.0
diff --git a/0008-Add-nvidia-release-notes-file.patch b/0008-Add-nvidia-release-notes-file.patch
index 39153b07d793..e9a6a54958c4 100644
--- a/0008-Add-nvidia-release-notes-file.patch
+++ b/0008-Add-nvidia-release-notes-file.patch
@@ -1,4 +1,4 @@
-From c87642ad69fb5ce256430b85fd3a0b00bd0355d3 Mon Sep 17 00:00:00 2001
+From 58926a862d2fe59c918ab2cd4d15ac60f51039f3 Mon Sep 17 00:00:00 2001
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
Date: Wed, 9 Aug 2017 16:01:34 -0700
Subject: [PATCH 8/8] Add nvidia-release-notes file
@@ -12,15 +12,15 @@ Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
diff --git a/nvidia-release-notes b/nvidia-release-notes
new file mode 100644
-index 00000000..5da24838
+index 00000000..1ef437ea
--- /dev/null
+++ b/nvidia-release-notes
@@ -0,0 +1,27 @@
-+NVIDIA EGLStream-based Weston version 4.0
-+-----------------------------------------
++NVIDIA EGLStream-based Weston version 5.0.0
++-------------------------------------------
+
+This branch includes NVIDIA EGLStream patches on top of
-+Weston 4.0.
++Weston 5.0.0.
+
+* Known issues:
+
@@ -30,13 +30,13 @@ index 00000000..5da24838
+
+ Fixed if using wl_eglstream_controller from commit:
+
-+ a044287897d3646440644555f7ac1d756e39e0d2 compositor: Process stream attach requests with wl_eglstream_controller
++ 8d52cfe1ae51e6a69ec2c41c65faeb02a5cc1314 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:
+
-+ ce015e27839809ed4d602dd8d977f2df770b0921 simple-egl: Do not set EGL up until XDG setup is complete
++ 27266e389b238f023f8789fec40ae661541372e4 simple-egl: Do not set EGL up until XDG setup is complete
+
+
+* Contact:
@@ -44,5 +44,5 @@ index 00000000..5da24838
+ Miguel A. Vico (mvicomoya AT nvidia.com)
+
--
-2.15.1
+2.18.0
diff --git a/PKGBUILD b/PKGBUILD
index 8302347e5f45..1fbaf876eeae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,8 @@
# Contributor: Joel Teichroeb <joel@teichroeb.net>
pkgname=weston-eglstream
-pkgver=4.0.0
-pkgrel=2
+pkgver=5.0.0
+pkgrel=1
pkgdesc='Reference implementation of a Wayland compositor with EGLStream support'
arch=('i686' 'x86_64')
url='https://wayland.freedesktop.org/'
@@ -23,18 +23,18 @@ source=("https://wayland.freedesktop.org/releases/weston-$pkgver.tar.xz"
'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-compositor-Process-stream-attach-requests-with-wl_eg.patch'
+ '0006-compositor-Process-stream-attach-requests-with-wl_eg.patch'
+ '0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch'
'0008-Add-nvidia-release-notes-file.patch')
-sha256sums=('a0fc0ae7ef83dfbed12abfe9b8096a24a7dd00705e86fa0db1e619ded18b4b58'
- '41cb791c07e377ce16ccb7ba6a6a84a49e5351c3ed815a98076069fb1386ecec'
- '0bd297017262bf278e20c05e5d0a46208c77f5462d80db1906286764de867720'
- 'a6a05d101701ff97bee1d5d3974fbbc12abb34c4b483568cc3c3552e328c3b55'
- 'd8f04aef2b38628b38dae92c73f16aab36b74ca83a44d144123439cb68c273a6'
- 'dda90181e2f91c03da8d180d7fbae42d61e2a31122301a2fc08f020b1da19a84'
- 'f893280becdb18583d234d1a26814aa092356402fc8731a1b2da8ef8d6963a6e'
- '5e56cf8d136a241cb05abcad39537287a97777c1697746697631c10f9ab551f1'
- '919923d3a545d1e8420d128cd63d7e60095887ec603d417e23df6d7138ba42da')
+sha256sums=('15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf'
+ '467c25f7158e54736ed7e9d071c8524e0f83509defcea49a7b053b11be1e9f93'
+ 'b60522d00263f1e67e4d4ca823550c1c90f30be450facd9a95fca7a91376b160'
+ '7ae690d0f75c8e341efea4a2b1f3557a0aec481fa38fe732b61805f9ee530b03'
+ '4845734de15fa99dbfc7e58b364996a72f63cf3632793d57eca7f696d3d6186e'
+ '037632c607638d98cf04cb5f1d5754842b77670671358ef34629c8c9dc2d9d19'
+ 'c83406c44c75e68f2efe0419d9500d1e4a3b5b6c212bec9df15bb40b6b2287dc'
+ '7d756c6e091eb6933aa49d7bb822e3a10abfdab5466f7c3763e7bff3ce60090f'
+ 'aad2f5c1941abae1cf42db3c59377aa688a9c9fbb0f60b15defc67bd63f9c149')
prepare() {
cd weston-$pkgver
@@ -43,8 +43,8 @@ prepare() {
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-compositor-Process-stream-attach-requests-with-wl_eg.patch"
+ patch -Np1 -i "${srcdir}/0006-compositor-Process-stream-attach-requests-with-wl_eg.patch"
+ patch -Np1 -i "${srcdir}/0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch"
patch -Np1 -i "${srcdir}/0008-Add-nvidia-release-notes-file.patch"
}