summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel A. Vico2019-03-26 17:54:58 -0700
committerMiguel A. Vico2019-03-27 22:04:18 -0700
commit6270174bd71c83185112d299fbc842293b7ffb2c (patch)
treeca801657abff728d5f55c31b55db438fb686053b
parent1ec939fa1774fe9bfa98f601f90a1b0669b267ba (diff)
downloadaur-6270174bd71c83185112d299fbc842293b7ffb2c.tar.gz
Update to weston 6.0.0
-rw-r--r--.SRCINFO59
-rw-r--r--0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.patch54
-rw-r--r--0002-gl-renderer-Add-EGLDevice-enumeration-support.patch (renamed from 0001-gl-renderer-Add-EGLDevice-enumeration-support.patch)20
-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)55
-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)42
-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)20
-rw-r--r--0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch (renamed from 0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch)112
-rw-r--r--0007-compositor-Process-stream-attach-requests-with-wl_eg.patch (renamed from 0006-compositor-Process-stream-attach-requests-with-wl_eg.patch)102
-rw-r--r--0008-gl-renderer-Use-mailbox-streams-for-scanout.patch34
-rw-r--r--0008-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch (renamed from 0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch)48
-rw-r--r--0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch36
-rw-r--r--PKGBUILD93
12 files changed, 343 insertions, 332 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d96488c557f..28682afabd4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,61 +1,44 @@
pkgbase = weston-eglstream
pkgdesc = Reference implementation of a Wayland compositor with EGLStream support
- pkgver = 5.0.0
- pkgrel = 5
+ pkgver = 6.0.0
+ pkgrel = 1
url = https://wayland.freedesktop.org/
- arch = i686
arch = x86_64
license = MIT
+ makedepends = meson
makedepends = wayland-protocols
- depends = glibc
depends = wayland
depends = libxkbcommon
depends = libinput
- depends = libunwind
- 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 = colord
depends = egl-wayland
- depends = autoconf
provides = weston
conflicts = weston
- 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-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-gl-renderer-Use-mailbox-streams-for-scanout.patch
- source = 0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch
- sha256sums = 15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf
- sha256sums = 270c2f68bb84a0f1f670eddb44b3f77729cf29ceecddbe4e62a5ced80fb1d1df
- sha256sums = f4f79611d00847c722e476469f74dc8fce812afdf2fed58ca91235b04bfe0107
- sha256sums = 17c8d59665ad33d3dbfea39d8c32634dac660cf528313b51c7064ce27b93ddec
- sha256sums = f5c7ae1142b2cb0dcf28c4b217c7cac42ab98fb1bb5ee14a2978fa8cc9bc6ea7
- sha256sums = 59287416cf0a57b76f7e77b7eadf0cf9c91afe480b0c400998abafe2deeb3126
- sha256sums = 5917fe7b0b49a1d66c3262958c004ffe22de7bb5026856f92cf5be46e81f9b1e
- sha256sums = 9b910c9b7176a4caea796a11ffd5086a54fe7b3c02336d494b8ea050933cfcbe
- sha256sums = 840166cc83641e6502c119ea1ff060be3afc1c99c0da792e7e43364ad29e799d
- sha256sums = d84cea4d89f79215adb148e5ed2afe7e94f3ef66df10e2bbecfddf9f04bd13e4
+ source = https://wayland.freedesktop.org/releases/weston-6.0.0.tar.xz
+ source = 0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.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-compositor-Process-stream-attach-requests-with-wl_eg.patch
+ source = 0008-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
+ sha256sums = 546323a90607b3bd7f48809ea9d76e64cd09718102f2deca6d95aa59a882e612
+ sha256sums = d6e78c5bfc2118f1955f8c3eb30aedf7dc01cab9e21271b135dc32be1b895607
+ sha256sums = f4b5222e0a8ee1c895f0e60e34d9d7c0a371012c5aab4d7e896e4c6f0df514b7
+ sha256sums = 8e778e55a2268cf932d57e4a6bbedcc7e24b1e223583cb238091dd426217198b
+ sha256sums = 01ecdb0363d36e11365ffe77056e9ec282d1928b007023ac7450aa2812a5018f
+ sha256sums = f14e27d58b7b0ec72b5aa722db95bd62e9b316e91907070cfeed236e65fe5c17
+ sha256sums = 77b1633c0162ac0b6f8126a1e614b8fa54a672927c04c1cacc5486b534ebd4ec
+ sha256sums = 36f05125a0be58d2ce840c8de2b8d42cfeeae8362e5b95861669b85d0f876816
+ sha256sums = a2acbc92962d2ae2c1690398af67eac35c5bbe06f0ff03a94f1aa1f12385ea12
pkgname = weston-eglstream
diff --git a/0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.patch b/0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.patch
new file mode 100644
index 00000000000..0f67b36e4bc
--- /dev/null
+++ b/0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.patch
@@ -0,0 +1,54 @@
+From e1486fee47785c094e93eca336684ab38bcb16bc Mon Sep 17 00:00:00 2001
+From: "Miguel A. Vico" <mvicomoya@nvidia.com>
+Date: Tue, 26 Mar 2019 15:34:12 -0700
+Subject: [PATCH 1/8] configure/meson: Tmp fix for gobject-2.0 libs missing in
+ pango pkgconfig
+X-NVConfidentiality: public
+
+This fixes the following build error, until the pango pkgconfig is
+restored to also include the corresponding flags to link against
+gobject-2.0:
+
+ /usr/bin/ld: clients/weston_editor-editor.o: undefined reference to symbol 'g_object_unref'
+ /usr/bin/ld: /usr/lib/libgobject-2.0.so.0: error adding symbols: DSO missing from command line
+ collect2: error: ld returned 1 exit status
+
+Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
+---
+ configure.ac | 2 +-
+ shared/meson.build | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c05ad011..425ba238 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -503,7 +503,7 @@ if test x$enable_clients = xyes; then
+ [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
+ [have_cairo_egl=no])
+
+- PKG_CHECK_MODULES(PANGO, [pangocairo pango glib-2.0 >= 2.36], [have_pango=yes], [have_pango=no])
++ PKG_CHECK_MODULES(PANGO, [pangocairo pango glib-2.0 >= 2.36 gobject-2.0 >= 2.36], [have_pango=yes], [have_pango=no])
+ fi
+
+ AC_ARG_ENABLE(resize-optimization,
+diff --git a/shared/meson.build b/shared/meson.build
+index 5b0d8d13..c90be7de 100644
+--- a/shared/meson.build
++++ b/shared/meson.build
+@@ -37,9 +37,10 @@ deps_cairo_shared = [
+ dep_pango = dependency('pango', required: false)
+ dep_pangocairo = dependency('pangocairo', required: false)
+ dep_glib = dependency('glib-2.0', version: '>= 2.36', required: false)
++dep_gobject = dependency('gobject-2.0', version: '>= 2.36', required: false)
+
+-if dep_pango.found() and dep_pangocairo.found() and dep_glib.found()
+- deps_cairo_shared += [ dep_pango, dep_pangocairo, dep_glib ]
++if dep_pango.found() and dep_pangocairo.found() and dep_glib.found() and dep_gobject.found()
++ deps_cairo_shared += [ dep_pango, dep_pangocairo, dep_glib, dep_gobject ]
+ config_h.set('HAVE_PANGO', '1')
+ endif
+
+--
+2.21.0
+
diff --git a/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch b/0002-gl-renderer-Add-EGLDevice-enumeration-support.patch
index 99279dd08d3..99c3da9c3d3 100644
--- a/0001-gl-renderer-Add-EGLDevice-enumeration-support.patch
+++ b/0002-gl-renderer-Add-EGLDevice-enumeration-support.patch
@@ -1,7 +1,7 @@
-From 0592a2a1b337880ce74d621297d10c988972efd1 Mon Sep 17 00:00:00 2001
+From ed68f6d00e47bdca93859b36a3c78f6fb555cd25 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/9] gl-renderer: Add EGLDevice enumeration support
+Subject: [PATCH 2/8] 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 2c50d2da..b681668b 100644
+index a03e45ea..74315347 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
-@@ -3775,6 +3775,90 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
+@@ -3990,6 +3990,90 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
return 0;
}
@@ -116,10 +116,10 @@ index 2c50d2da..b681668b 100644
WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.opaque_attribs = gl_renderer_opaque_attribs,
.alpha_attribs = gl_renderer_alpha_attribs,
-@@ -3785,5 +3869,8 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
- .output_destroy = gl_renderer_output_destroy,
+@@ -4001,5 +4085,8 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.output_surface = gl_renderer_output_surface,
.output_set_border = gl_renderer_output_set_border,
+ .create_fence_fd = gl_renderer_create_fence_fd,
- .print_egl_error_state = gl_renderer_print_egl_error_state
+ .print_egl_error_state = gl_renderer_print_egl_error_state,
+
@@ -127,7 +127,7 @@ index 2c50d2da..b681668b 100644
+ .get_drm_device_file = gl_renderer_get_drm_device_file
};
diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index b47ea07f..9ff4e21e 100644
+index 202702b5..151879da 100644
--- a/libweston/gl-renderer.h
+++ b/libweston/gl-renderer.h
@@ -38,6 +38,7 @@
@@ -138,8 +138,8 @@ index b47ea07f..9ff4e21e 100644
typedef void *EGLDisplay;
typedef void *EGLSurface;
typedef void *EGLConfig;
-@@ -114,5 +115,12 @@ struct gl_renderer_interface {
- int32_t tex_width, unsigned char *data);
+@@ -121,5 +122,12 @@ struct gl_renderer_interface {
+ int (*create_fence_fd)(struct weston_output *output);
void (*print_egl_error_state)(void);
+
@@ -152,5 +152,5 @@ index b47ea07f..9ff4e21e 100644
};
--
-2.18.0
+2.21.0
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 fd5b7e19261..359418ff489 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 db0add622cd4f8594222e493e164bfb3224230e5 Mon Sep 17 00:00:00 2001
+From 1df7a9d5e4222a40885bd8e46b33f5dd4525e93b 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/9] gl-renderer: Add support for EGLDevice composited frame
+Subject: [PATCH 3/8] gl-renderer: Add support for EGLDevice composited frame
presentation
X-NVConfidentiality: public
@@ -48,10 +48,10 @@ 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 b681668b..27794b60 100644
+index 74315347..f3fb2c65 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
-@@ -103,6 +103,8 @@ struct gl_output_state {
+@@ -101,6 +101,8 @@ struct gl_output_state {
struct gl_border_image borders[4];
enum gl_border_status border_status;
@@ -59,8 +59,8 @@ index b681668b..27794b60 100644
+
struct weston_matrix output_matrix;
- /* struct timeline_render_point::link */
-@@ -233,6 +235,28 @@ struct gl_renderer {
+ EGLSyncKHR begin_render_sync, end_render_sync;
+@@ -238,6 +240,28 @@ struct gl_renderer {
int has_surfaceless_context;
@@ -89,8 +89,8 @@ index b681668b..27794b60 100644
int has_dmabuf_import;
struct wl_list dmabuf_images;
-@@ -1365,6 +1389,38 @@ gl_renderer_repaint_output(struct weston_output *output,
- TIMELINE_RENDER_POINT_TYPE_END);
+@@ -1503,6 +1527,38 @@ gl_renderer_repaint_output(struct weston_output *output,
+ update_buffer_release_fences(compositor, output);
}
+static int
@@ -128,7 +128,7 @@ index b681668b..27794b60 100644
static int
gl_renderer_read_pixels(struct weston_output *output,
pixman_format_code_t format, void *pixels,
-@@ -3011,9 +3067,93 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
+@@ -3195,9 +3251,93 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
return egl_surface;
}
@@ -140,7 +140,7 @@ index b681668b..27794b60 100644
+ EGLStreamKHR *egl_stream)
+{
+ EGLint stream_attribs[] = {
-+ EGL_STREAM_FIFO_LENGTH_KHR, 1,
++ EGL_STREAM_FIFO_LENGTH_KHR, 0, /* Mailbox mode */
+#ifdef EGL_EXT_stream_acquire_mode
+ EGL_CONSUMER_AUTO_ACQUIRE_EXT, EGL_FALSE,
+#endif
@@ -223,7 +223,7 @@ index b681668b..27794b60 100644
{
struct gl_output_state *go;
int i;
-@@ -3023,6 +3163,7 @@ gl_renderer_output_create(struct weston_output *output,
+@@ -3207,6 +3347,7 @@ gl_renderer_output_create(struct weston_output *output,
return -1;
go->egl_surface = surface;
@@ -231,7 +231,7 @@ index b681668b..27794b60 100644
for (i = 0; i < BUFFER_DAMAGE_COUNT; i++)
pixman_region32_init(&go->buffer_damage[i]);
-@@ -3057,13 +3198,41 @@ gl_renderer_output_window_create(struct weston_output *output,
+@@ -3244,13 +3385,41 @@ gl_renderer_output_window_create(struct weston_output *output,
return -1;
}
@@ -274,9 +274,9 @@ index b681668b..27794b60 100644
static void
gl_renderer_output_destroy(struct weston_output *output)
{
-@@ -3088,6 +3257,9 @@ gl_renderer_output_destroy(struct weston_output *output)
- wl_list_for_each_safe(trp, tmp, &go->timeline_render_point_list, link)
- timeline_render_point_destroy(trp);
+@@ -3280,6 +3449,9 @@ gl_renderer_output_destroy(struct weston_output *output)
+ if (go->end_render_sync != EGL_NO_SYNC_KHR)
+ gr->destroy_sync(gr->egl_display, go->end_render_sync);
+ if (go->egl_stream != EGL_NO_STREAM_KHR)
+ gr->destroy_stream(gr->egl_display, go->egl_stream);
@@ -284,7 +284,7 @@ index b681668b..27794b60 100644
free(go);
}
-@@ -3184,6 +3356,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3393,6 +3565,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
(void *) eglGetProcAddress("eglUnbindWaylandDisplayWL");
gr->query_buffer =
(void *) eglGetProcAddress("eglQueryWaylandBufferWL");
@@ -304,8 +304,8 @@ index b681668b..27794b60 100644
extensions =
(const char *) eglQueryString(gr->egl_display, EGL_EXTENSIONS);
-@@ -3257,6 +3442,30 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
- "missing EGL_ANDROID_native_fence_sync extension\n");
+@@ -3467,6 +3652,30 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+ "to missing EGL_KHR_wait_sync extension\n");
}
+ if (weston_check_egl_extension(extensions, "EGL_EXT_output_base"))
@@ -335,7 +335,7 @@ index b681668b..27794b60 100644
renderer_setup_egl_client_extensions(gr);
return 0;
-@@ -3282,6 +3491,15 @@ static const EGLint gl_renderer_alpha_attribs[] = {
+@@ -3492,6 +3701,15 @@ static const EGLint gl_renderer_alpha_attribs[] = {
EGL_NONE
};
@@ -351,7 +351,7 @@ index b681668b..27794b60 100644
/** Checks whether a platform EGL client extension is supported
*
-@@ -3355,6 +3573,8 @@ platform_to_extension(EGLenum platform)
+@@ -3565,6 +3783,8 @@ platform_to_extension(EGLenum platform)
return "wayland";
case EGL_PLATFORM_X11_KHR:
return "x11";
@@ -360,9 +360,9 @@ index b681668b..27794b60 100644
default:
assert(0 && "bad EGL platform enum");
}
-@@ -3491,6 +3711,38 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
- if (gl_renderer_setup_egl_extensions(ec) < 0)
- goto fail_with_error;
+@@ -3706,6 +3926,38 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+ if (gr->has_native_fence_sync && gr->has_wait_sync)
+ ec->capabilities |= WESTON_CAP_EXPLICIT_SYNC;
+ if (platform == EGL_PLATFORM_DEVICE_EXT) {
+ if (!gr->has_egl_output_base ||
@@ -399,7 +399,7 @@ index b681668b..27794b60 100644
wl_list_init(&gr->dmabuf_images);
if (gr->has_dmabuf_import) {
gr->base.import_dmabuf = gl_renderer_import_dmabuf;
-@@ -3862,15 +4114,19 @@ gl_renderer_get_drm_device_file(EGLDeviceEXT device,
+@@ -4077,10 +4329,12 @@ 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,
@@ -412,6 +412,7 @@ index b681668b..27794b60 100644
.output_destroy = gl_renderer_output_destroy,
.output_surface = gl_renderer_output_surface,
.output_set_border = gl_renderer_output_set_border,
+@@ -4088,5 +4342,7 @@ WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
.print_egl_error_state = gl_renderer_print_egl_error_state,
.get_devices = gl_renderer_get_devices,
@@ -421,7 +422,7 @@ index b681668b..27794b60 100644
+ .output_stream_flip = gl_renderer_output_stream_flip
};
diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
-index 9ff4e21e..39ea3b42 100644
+index 151879da..973097bf 100644
--- a/libweston/gl-renderer.h
+++ b/libweston/gl-renderer.h
@@ -60,6 +60,7 @@ enum gl_renderer_border_side {
@@ -442,7 +443,7 @@ index 9ff4e21e..39ea3b42 100644
void (*output_destroy)(struct weston_output *output);
EGLSurface (*output_surface)(struct weston_output *output);
-@@ -122,5 +126,17 @@ struct gl_renderer_interface {
+@@ -129,5 +133,17 @@ struct gl_renderer_interface {
int (*get_drm_device_file)(EGLDeviceEXT device,
const char **drm_device_file);
@@ -518,5 +519,5 @@ index 0784ea2d..f39990ed 100644
#endif /* ENABLE_EGL */
--
-2.18.0
+2.21.0
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 6d815d1c15a..2f2a7a9c537 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 1ec5af6e4f51004856d7aee2184d7e4fe11ef086 Mon Sep 17 00:00:00 2001
+From 1c422fb24eadccabd3ed07de15923acc982aa6a1 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/9] gl-renderer: Add EGL client support for EGLStream frame
+Subject: [PATCH 4/8] gl-renderer: Add EGL client support for EGLStream frame
presentation
X-NVConfidentiality: public
@@ -29,10 +29,10 @@ 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 27794b60..39e33350 100644
+index f3fb2c65..5e594535 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
-@@ -188,6 +188,9 @@ struct gl_surface_state {
+@@ -189,6 +189,9 @@ struct gl_surface_state {
int hsub[3]; /* horizontal subsampling per plane */
int vsub[3]; /* vertical subsampling per plane */
@@ -41,8 +41,8 @@ index 27794b60..39e33350 100644
+
struct weston_surface *surface;
- struct wl_listener surface_destroy_listener;
-@@ -243,6 +246,7 @@ struct gl_renderer {
+ /* Whether this surface was used in the current output repaint.
+@@ -248,6 +251,7 @@ struct gl_renderer {
PFNEGLCREATESTREAMKHRPROC create_stream;
PFNEGLDESTROYSTREAMKHRPROC destroy_stream;
@@ -50,7 +50,7 @@ index 27794b60..39e33350 100644
int has_egl_stream;
PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC create_stream_producer_surface;
-@@ -252,11 +256,16 @@ struct gl_renderer {
+@@ -257,11 +261,16 @@ struct gl_renderer {
int has_egl_stream_consumer_egloutput;
#ifdef EGL_NV_stream_attrib
@@ -67,8 +67,8 @@ index 27794b60..39e33350 100644
int has_dmabuf_import;
struct wl_list dmabuf_images;
-@@ -2362,6 +2371,145 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
- gs->y_inverted = buffer->y_inverted;
+@@ -2528,6 +2537,145 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
+ surface->is_opaque = dmabuf_is_opaque(dmabuf);
}
+/*
@@ -213,10 +213,10 @@ index 27794b60..39e33350 100644
static void
gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
{
-@@ -2385,6 +2533,12 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
- gs->num_textures = 0;
+@@ -2554,6 +2702,12 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
gs->buffer_type = BUFFER_TYPE_NULL;
gs->y_inverted = 1;
+ es->is_opaque = false;
+
+ if (gs->egl_stream != EGL_NO_STREAM_KHR) {
+ gr->destroy_stream(gr->egl_display, gs->egl_stream);
@@ -226,18 +226,18 @@ index 27794b60..39e33350 100644
return;
}
-@@ -2398,7 +2552,7 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
+@@ -2567,7 +2721,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);
- else {
+ else if (!gl_renderer_attach_stream_texture(es, buffer)) {
weston_log("unhandled buffer type!\n");
- weston_buffer_reference(&gs->buffer_ref, NULL);
- gs->buffer_type = BUFFER_TYPE_NULL;
-@@ -2586,6 +2740,10 @@ surface_state_destroy(struct gl_surface_state *gs, struct gl_renderer *gr)
-
+ if (gr->has_bind_display) {
+ weston_log("eglQueryWaylandBufferWL failed\n");
+@@ -2764,6 +2918,10 @@ surface_state_destroy(struct gl_surface_state *gs, struct gl_renderer *gr)
weston_buffer_reference(&gs->buffer_ref, NULL);
+ weston_buffer_release_reference(&gs->buffer_release_ref, NULL);
pixman_region32_fini(&gs->texture_damage);
+
+ if (gs->egl_stream != EGL_NO_STREAM_KHR)
@@ -246,7 +246,7 @@ index 27794b60..39e33350 100644
free(gs);
}
-@@ -2636,6 +2794,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
+@@ -2814,6 +2972,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
gs->surface = surface;
@@ -255,7 +255,7 @@ index 27794b60..39e33350 100644
pixman_region32_init(&gs->texture_damage);
surface->renderer_state = gs;
-@@ -3361,14 +3521,19 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3570,14 +3730,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 27794b60..39e33350 100644
extensions =
(const char *) eglQueryString(gr->egl_display, EGL_EXTENSIONS);
-@@ -3466,6 +3631,12 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
+@@ -3676,6 +3841,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 27794b60..39e33350 100644
renderer_setup_egl_client_extensions(gr);
return 0;
-@@ -3738,6 +3909,16 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -3953,6 +4124,16 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
goto fail_terminate;
}
@@ -322,5 +322,5 @@ index f39990ed..96982e2d 100644
/* EGL platform definition are keept to allow compositor-xx.c to build */
--
-2.18.0
+2.21.0
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 06be3432166..83c26ca11f0 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 51f88599bea32521399f572e02da6f7ff1557172 Mon Sep 17 00:00:00 2001
+From 85e804380738537bbc9afeb658c1218040c68cfa 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/9] compositor-drm: Gracefully handle vblank and flip invalid
+Subject: [PATCH 5/8] compositor-drm: Gracefully handle vblank and flip invalid
timestamps
X-NVConfidentiality: public
@@ -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 38911763..577d2e2f 100644
+index c1101105..77dbb077 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -3,6 +3,7 @@
- * Copyright © 2011 Intel Corporation
+@@ -4,6 +4,7 @@
* Copyright © 2017, 2018 Collabora, Ltd.
* Copyright © 2017, 2018 General Electric Company
-+ * Copyright © 2016-2018 NVIDIA Corporation
+ * Copyright (c) 2018 DisplayLink (UK) Ltd.
++ * Copyright © 2016-2019 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -1860,6 +1861,19 @@ drm_output_update_complete(struct drm_output *output, uint32_t flags,
+@@ -1937,6 +1938,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 38911763..577d2e2f 100644
weston_output_finish_frame(&output->base, &ts, flags);
/* We can't call this from frame_notify, because the output's
-@@ -2849,8 +2863,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -3010,8 +3024,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 38911763..577d2e2f 100644
ts.tv_sec = vbl.reply.tval_sec;
ts.tv_nsec = vbl.reply.tval_usec * 1000;
-@@ -2871,7 +2893,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
+@@ -3032,7 +3054,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
}
}
@@ -82,5 +82,5 @@ index 38911763..577d2e2f 100644
*/
--
-2.18.0
+2.21.0
diff --git a/0005-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch b/0006-compositor-drm-Add-support-for-EGLDevice-EGLOutput.patch
index 5c17f3c834d..84680572627 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 a2a230463cf0bbbf452d40019f7e2aa31f6c7f1d Mon Sep 17 00:00:00 2001
+From 73bc85fbde7c65d3a667982301877238d3c02bf8 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/9] compositor-drm: Add support for EGLDevice+EGLOutput
+Subject: [PATCH 6/8] compositor-drm: Add support for EGLDevice+EGLOutput
X-NVConfidentiality: public
As previously stated, EGLDevice and EGLOutput will provide means
@@ -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 | 319 +++++++++++++++++++++++++------------
+ libweston/compositor-drm.c | 336 +++++++++++++++++++++++++------------
libweston/compositor-drm.h | 4 +
libweston/gl-renderer.h | 1 +
- shared/weston-egl-ext.h | 9 ++
- 5 files changed, 236 insertions(+), 99 deletions(-)
+ shared/weston-egl-ext.h | 9 +
+ 5 files changed, 245 insertions(+), 107 deletions(-)
diff --git a/compositor/main.c b/compositor/main.c
-index b5b4fc59..73b6fce1 100644
+index c3206783..103305e3 100644
--- a/compositor/main.c
+++ b/compositor/main.c
-@@ -517,6 +517,7 @@ usage(int error_code)
+@@ -664,6 +664,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,19 +44,19 @@ index b5b4fc59..73b6fce1 100644
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n");
#endif
-@@ -1845,6 +1846,7 @@ load_drm_backend(struct weston_compositor *c,
+@@ -2341,6 +2342,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 },
+ { WESTON_OPTION_BOOLEAN, "use-pixman", 0, &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 577d2e2f..1352a38e 100644
+index 77dbb077..100b3050 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
-@@ -263,7 +263,10 @@ struct drm_backend {
+@@ -310,7 +310,10 @@ struct drm_backend {
int fd;
char *filename;
} drm;
@@ -67,8 +67,8 @@ index 577d2e2f..1352a38e 100644
struct wl_listener session_listener;
uint32_t gbm_format;
-@@ -293,6 +296,8 @@ struct drm_backend {
- int use_pixman;
+@@ -340,6 +343,8 @@ struct drm_backend {
+ bool use_pixman;
bool use_pixman_shadow;
+ int use_egldevice;
@@ -76,7 +76,7 @@ index 577d2e2f..1352a38e 100644
struct udev_input input;
int32_t cursor_width;
-@@ -2027,20 +2032,24 @@ drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage)
+@@ -2109,20 +2114,24 @@ drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage)
output->base.compositor->renderer->repaint_output(&output->base,
damage);
@@ -113,7 +113,7 @@ index 577d2e2f..1352a38e 100644
return ret;
}
-@@ -2083,7 +2092,9 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
+@@ -2165,7 +2174,9 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
if (scanout_state->fb)
return;
@@ -124,9 +124,9 @@ index 577d2e2f..1352a38e 100644
scanout_plane->state_cur->fb &&
(scanout_plane->state_cur->fb->type == BUFFER_GBM_SURFACE ||
scanout_plane->state_cur->fb->type == BUFFER_PIXMAN_DUMB) &&
-@@ -2267,9 +2278,14 @@ drm_output_apply_state_legacy(struct drm_output_state *state)
- }
- }
+@@ -2358,9 +2369,14 @@ drm_output_apply_state_legacy(struct drm_output_state *state)
+ output->crtc_id, scanout_state->plane->plane_id,
+ pinfo ? pinfo->drm_format_name : "UNKNOWN");
- if (drmModePageFlip(backend->drm.fd, output->crtc_id,
- scanout_state->fb->fb_id,
@@ -142,7 +142,7 @@ index 577d2e2f..1352a38e 100644
weston_log("queueing pageflip failed: %m\n");
goto err;
}
-@@ -3833,7 +3849,8 @@ init_kms_caps(struct drm_backend *b)
+@@ -4174,7 +4190,8 @@ init_kms_caps(struct drm_backend *b)
b->universal_planes ? "supports" : "does not support");
#ifdef HAVE_DRM_ATOMIC
@@ -152,7 +152,7 @@ index 577d2e2f..1352a38e 100644
ret = drmGetCap(b->drm.fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &cap);
if (ret != 0)
cap = 0;
-@@ -3868,11 +3885,6 @@ create_gbm_device(int fd)
+@@ -4217,11 +4234,6 @@ create_gbm_device(int fd)
{
struct gbm_device *gbm;
@@ -164,7 +164,7 @@ index 577d2e2f..1352a38e 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
-@@ -3885,6 +3897,40 @@ create_gbm_device(int fd)
+@@ -4234,6 +4246,40 @@ create_gbm_device(int fd)
return gbm;
}
@@ -205,7 +205,7 @@ index 577d2e2f..1352a38e 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.
*
-@@ -3911,38 +3957,62 @@ fallback_format_for(uint32_t format)
+@@ -4260,38 +4306,62 @@ fallback_format_for(uint32_t format)
static int
drm_backend_create_gl_renderer(struct drm_backend *b)
{
@@ -289,7 +289,7 @@ index 577d2e2f..1352a38e 100644
return -1;
}
-@@ -4653,63 +4723,90 @@ err:
+@@ -5058,71 +5128,98 @@ err:
static int
drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
{
@@ -305,10 +305,7 @@ index 577d2e2f..1352a38e 100644
+ int w = output->base.current_mode->width;
+ int h = output->base.current_mode->height;
-- for (i = 0; i < plane->count_formats; i++) {
-- if (plane->formats[i].format == output->gbm_format)
-- break;
-- }
+- assert(output->gbm_surface == NULL);
+ /* Create a black dumb fb for modesetting */
+ output->dumb[0] = drm_fb_create_dumb(b, w, h,
+ DRM_FORMAT_XRGB8888);
@@ -327,10 +324,9 @@ index 577d2e2f..1352a38e 100644
+ 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;
+- for (i = 0; i < plane->count_formats; i++) {
+- if (plane->formats[i].format == output->gbm_format)
+- break;
- }
+ /* FIXME: Add hw planes and cursors for EGL device when supported */
+ b->sprites_are_broken = 1;
@@ -344,6 +340,13 @@ index 577d2e2f..1352a38e 100644
+ struct weston_mode *mode = output->base.current_mode;
+ struct drm_plane *plane = output->scanout_plane;
+ unsigned int i;
+
+- if (i == plane->count_formats) {
+- weston_log("format 0x%x not supported by output %s\n",
+- output->gbm_format, output->base.name);
+- return -1;
+- }
++ assert(output->gbm_surface == NULL);
+
+ for (i = 0; i < plane->count_formats; i++) {
+ if (plane->formats[i].format == output->gbm_format)
@@ -365,7 +368,12 @@ index 577d2e2f..1352a38e 100644
- output->gbm_format,
- plane->formats[i].modifiers,
- plane->formats[i].count_modifiers);
-- } else
+- }
+-
+- /* If allocating with modifiers fails, try again without. This can
+- * happen when the KMS display device supports modifiers but the
+- * GBM driver does not, e.g. the old i915 Mesa driver. */
+- if (!output->gbm_surface)
+ if (plane->formats[i].count_modifiers > 0) {
+ output->gbm_surface =
+ gbm_surface_create_with_modifiers(b->gbm,
@@ -374,19 +382,24 @@ index 577d2e2f..1352a38e 100644
+ output->gbm_format,
+ plane->formats[i].modifiers,
+ plane->formats[i].count_modifiers);
-+ } else
++ }
++
++ /* If allocating with modifiers fails, try again without. This can
++ * happen when the KMS display device supports modifiers but the
++ * GBM driver does not, e.g. the old i915 Mesa driver. */
++ if (!output->gbm_surface)
#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_bo_flags);
- }
+ {
+ 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_bo_flags);
+ }
- if (!output->gbm_surface) {
@@ -408,6 +421,7 @@ index 577d2e2f..1352a38e 100644
- n_formats) < 0) {
- weston_log("failed to create gl renderer output state\n");
- gbm_surface_destroy(output->gbm_surface);
+- output->gbm_surface = NULL;
- return -1;
- }
+ if (format[1])
@@ -420,6 +434,7 @@ index 577d2e2f..1352a38e 100644
+ n_formats) < 0) {
+ weston_log("failed to create gl renderer output state\n");
+ gbm_surface_destroy(output->gbm_surface);
++ output->gbm_surface = NULL;
+ return -1;
+ }
@@ -429,24 +444,27 @@ index 577d2e2f..1352a38e 100644
return 0;
}
-@@ -4731,7 +4828,15 @@ drm_output_fini_egl(struct drm_output *output)
+@@ -5144,8 +5241,17 @@ drm_output_fini_egl(struct drm_output *output)
}
gl_renderer->output_destroy(&output->base);
- gbm_surface_destroy(output->gbm_surface);
+- output->gbm_surface = NULL;
+
+ if (output->dumb[0]) {
+ drm_fb_unref(output->dumb[0]);
+ output->dumb[0] = NULL;
+ }
+
-+ if (output->gbm_surface)
++ if (output->gbm_surface) {
+ gbm_surface_destroy(output->gbm_surface);
++ output->gbm_surface = NULL;
++ }
+
drm_output_fini_cursor_egl(output);
}
-@@ -6608,6 +6713,11 @@ recorder_binding(struct weston_keyboard *keyboard, const struct timespec *time,
+@@ -7050,6 +7156,11 @@ recorder_binding(struct weston_keyboard *keyboard, const struct timespec *time,
struct drm_output *output;
int width, height;
@@ -458,7 +476,7 @@ index 577d2e2f..1352a38e 100644
output = container_of(b->compositor->output_list.next,
struct drm_output, base.link);
-@@ -6663,11 +6773,20 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -7108,11 +7219,20 @@ switch_to_gl_renderer(struct drm_backend *b)
weston_log("Switching to GL renderer\n");
@@ -484,7 +502,7 @@ index 577d2e2f..1352a38e 100644
}
wl_list_for_each(output, &b->compositor->output_list, base.link)
-@@ -6676,7 +6795,8 @@ switch_to_gl_renderer(struct drm_backend *b)
+@@ -7121,7 +7241,8 @@ switch_to_gl_renderer(struct drm_backend *b)
b->compositor->renderer->destroy(b->compositor);
if (drm_backend_create_gl_renderer(b) < 0) {
@@ -494,19 +512,19 @@ index 577d2e2f..1352a38e 100644
weston_log("Failed to create GL renderer. Quitting.\n");
/* FIXME: we need a function to shutdown cleanly */
assert(0);
-@@ -6742,6 +6862,7 @@ drm_backend_create(struct weston_compositor *compositor,
+@@ -7451,6 +7572,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;
-
+ b->debug = weston_compositor_add_debug_scope(compositor, "drm-backend",
+ "Debug messages from DRM/KMS backend\n",
diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h
-index 9c37c153..a9d69e5e 100644
+index 71a306fd..435581d9 100644
--- a/libweston/compositor-drm.h
+++ b/libweston/compositor-drm.h
-@@ -104,6 +104,10 @@ struct weston_drm_backend_config {
+@@ -177,6 +177,10 @@ struct weston_drm_backend_config {
/** Whether to use the pixman renderer instead of the OpenGL ES renderer. */
bool use_pixman;
@@ -518,7 +536,7 @@ index 9c37c153..a9d69e5e 100644
*
* 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
+index 973097bf..233c9282 100644
--- a/libweston/gl-renderer.h
+++ b/libweston/gl-renderer.h
@@ -45,6 +45,7 @@ typedef void *EGLConfig;
@@ -557,5 +575,5 @@ index 96982e2d..e4e10ef9 100644
#endif
--
-2.18.0
+2.21.0
diff --git a/0006-compositor-Process-stream-attach-requests-with-wl_eg.patch b/0007-compositor-Process-stream-attach-requests-with-wl_eg.patch
index a05dc4b75a5..247fd1c1160 100644
--- a/0006-compositor-Process-stream-attach-requests-with-wl_eg.patch
+++ b/0007-compositor-Process-stream-attach-requests-with-wl_eg.patch
@@ -1,7 +1,7 @@
-From 9036a214efffea4c2eb13e1d275c59621ee17a52 Mon Sep 17 00:00:00 2001
+From 5076208fd90be98deff790f0f4429cfe54f1457a 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 6/9] compositor: Process stream attach requests with
+Subject: [PATCH 7/8] compositor: Process stream attach requests with
wl_eglstream_controller
X-NVConfidentiality: public
@@ -25,37 +25,39 @@ requests.
[mvicomoya: - Dynamically load libnvidia-egl-wayland.so.1 instead linking
against it
- - add a copy of wayland-eglstream-controller protocol, and
- generate the server header at build time]
+ - Add wayland-eglstream-protocols package dependency and
+ generate server header for wayland-eglstream-controller at
+ build time]
Signed-off-by: Ashutosh Agarwal <asagarwal@nvidia.com>
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
---
- Makefile.am | 15 ++++
+ Makefile.am | 14 ++++
+ compositor/meson.build | 1 +
configure.ac | 4 ++
libweston/compositor.c | 78 +++++++++++++++++++++
libweston/compositor.h | 4 ++
libweston/gl-renderer.c | 147 +++++++++++++++++++++++++---------------
- 5 files changed, 194 insertions(+), 54 deletions(-)
+ protocol/meson.build | 7 ++
+ 7 files changed, 201 insertions(+), 54 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index 83bb2533..c15bca01 100644
+index 5407b593..0bad6976 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -173,6 +173,12 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
+@@ -192,6 +192,11 @@ nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES)
-+libweston_eglstreams_@LIBWESTON_MAJOR@dir = $(top_builddir)/protocol
-+nodist_libweston_eglstreams_@LIBWESTON_MAJOR@_HEADERS = \
++nodist_libweston_eglstreams_@LIBWESTON_MAJOR@_la_SOURCES = \
+ protocol/wayland-eglstream-controller-server-protocol.h
+
-+BUILT_SOURCES += $(nodist_libweston_eglstreams_@LIBWESTON_MAJOR@_HEADERS)
++BUILT_SOURCES += $(nodist_libweston_eglstreams_@LIBWESTON_MAJOR@_la_SOURCES)
+
bin_PROGRAMS += weston
weston_LDFLAGS = -export-dynamic
-@@ -1658,6 +1664,15 @@ protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostabili
+@@ -1736,6 +1741,15 @@ protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostabili
protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
@@ -71,11 +73,23 @@ index 83bb2533..c15bca01 100644
protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
+diff --git a/compositor/meson.build b/compositor/meson.build
+index d5d7282f..7655ef5a 100644
+--- a/compositor/meson.build
++++ b/compositor/meson.build
+@@ -9,6 +9,7 @@ srcs_weston = [
+ input_method_unstable_v1_protocol_c,
+ weston_screenshooter_server_protocol_h,
+ weston_screenshooter_protocol_c,
++ wayland_eglstream_controller_server_protocol_h,
+ ]
+ deps_weston = [
+ dep_libshared,
diff --git a/configure.ac b/configure.ac
-index 50f8e013..b219d2e2 100644
+index 425ba238..5c1932bc 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -231,6 +231,10 @@ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.13],
+@@ -261,6 +261,10 @@ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.17],
[ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
@@ -87,7 +101,7 @@ index 50f8e013..b219d2e2 100644
enable_wayland_compositor=yes)
AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
diff --git a/libweston/compositor.c b/libweston/compositor.c
-index 9deb7817..a2941788 100644
+index d87522e7..947739f8 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -3,6 +3,7 @@
@@ -98,15 +112,15 @@ index 9deb7817..a2941788 100644
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -64,6 +65,7 @@
- #include "git-version.h"
+@@ -71,6 +72,7 @@
#include "version.h"
#include "plugin-registry.h"
+ #include "pixel-formats.h"
+#include "wayland-eglstream-controller-server-protocol.h"
#define DEFAULT_REPAINT_WINDOW 7 /* milliseconds */
-@@ -6246,6 +6248,80 @@ bind_presentation(struct wl_client *client,
+@@ -6473,6 +6475,80 @@ bind_presentation(struct wl_client *client,
wp_presentation_send_clock_id(resource, compositor->presentation_clock);
}
@@ -187,20 +201,20 @@ index 9deb7817..a2941788 100644
static void
compositor_bind(struct wl_client *client,
void *data, uint32_t version, uint32_t id)
-@@ -6361,6 +6437,8 @@ weston_compositor_create(struct wl_display *display, void *user_data)
+@@ -6836,6 +6912,8 @@ weston_compositor_create(struct wl_display *display, void *user_data)
ec, bind_presentation))
goto fail;
+ init_eglstream_controller(ec->wl_display);
+
- if (weston_input_init(ec) != 0)
+ if (weston_debug_compositor_create(ec) < 0)
goto fail;
diff --git a/libweston/compositor.h b/libweston/compositor.h
-index 8b7a1020..2edce664 100644
+index a5223c28..1c39c50c 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
-@@ -924,6 +924,10 @@ struct weston_renderer {
+@@ -925,6 +925,10 @@ struct weston_renderer {
void (*query_dmabuf_modifiers)(struct weston_compositor *ec,
int format, uint64_t **modifiers,
int *num_modifiers);
@@ -212,7 +226,7 @@ index 8b7a1020..2edce664 100644
enum weston_capability {
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index 39e33350..c89c7965 100644
+index 5e594535..8265a712 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -1,7 +1,7 @@
@@ -224,8 +238,8 @@ index 39e33350..c89c7965 100644
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
-@@ -2371,18 +2371,9 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
- gs->y_inverted = buffer->y_inverted;
+@@ -2537,18 +2537,9 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
+ surface->is_opaque = dmabuf_is_opaque(dmabuf);
}
-/*
@@ -246,7 +260,7 @@ index 39e33350..c89c7965 100644
{
#ifdef EGL_NV_stream_attrib
struct weston_compositor *ec = es->compositor;
-@@ -2391,65 +2382,111 @@ gl_renderer_attach_stream_texture(struct weston_surface *es,
+@@ -2557,65 +2548,111 @@ gl_renderer_attach_stream_texture(struct weston_surface *es,
EGLStreamKHR stream = EGL_NO_STREAM_KHR;
EGLAttrib stream_attribs[] = {
#ifdef EGL_WL_wayland_eglstream
@@ -399,7 +413,7 @@ index 39e33350..c89c7965 100644
}
/* At this point we should have a valid stream handle */
-@@ -3831,6 +3868,8 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
+@@ -4041,6 +4078,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;
@@ -408,6 +422,38 @@ index 39e33350..c89c7965 100644
gr->egl_display = NULL;
/* extension_suffix is supported */
+diff --git a/protocol/meson.build b/protocol/meson.build
+index 34026ff9..37642298 100644
+--- a/protocol/meson.build
++++ b/protocol/meson.build
+@@ -7,6 +7,9 @@ prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'
+ dep_wp = dependency('wayland-protocols', version: '>= 1.17')
+ dir_wp_base = dep_wp.get_pkgconfig_variable('pkgdatadir')
+
++dep_wep = dependency('wayland-eglstream-protocols')
++dir_wep_base = dep_wep.get_pkgconfig_variable('pkgdatadir')
++
+ install_data(
+ [
+ 'weston-debug.xml',
+@@ -37,6 +40,7 @@ generated_protocols = [
+ [ 'xdg-output', 'v1' ],
+ [ 'xdg-shell', 'v6' ],
+ [ 'xdg-shell', 'stable' ],
++ [ 'wayland-eglstream-controller', '3rdparty', dir_wep_base ],
+ ]
+
+ foreach proto: generated_protocols
+@@ -44,6 +48,9 @@ foreach proto: generated_protocols
+ if proto[1] == 'internal'
+ base_file = proto_name
+ xml_path = '@0@.xml'.format(proto_name)
++ elif proto[1] == '3rdparty'
++ base_file = proto_name
++ xml_path = '@0@/@1@.xml'.format(proto[2], base_file)
+ elif proto[1] == 'stable'
+ base_file = proto_name
+ xml_path = '@0@/stable/@1@/@1@.xml'.format(dir_wp_base, base_file)
--
-2.18.0
+2.21.0
diff --git a/0008-gl-renderer-Use-mailbox-streams-for-scanout.patch b/0008-gl-renderer-Use-mailbox-streams-for-scanout.patch
deleted file mode 100644
index aa31348a82b..00000000000
--- a/0008-gl-renderer-Use-mailbox-streams-for-scanout.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From db3147b5446334d69d1ffdb07234babc292dec2e Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Wed, 16 Jan 2019 14:16:30 -0800
-Subject: [PATCH 8/9] gl-renderer: Use mailbox streams for scanout
-X-NVConfidentiality: public
-
-Ever since flip-event-based output repaints have been used, FIFO mode
-for EGLOutput streams was not necessary.
-
-Make the streams operate in mailbox mode. This also fixes certain
-interaction issues when recovering from power-saving mode or
-vt-switches.
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@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 c89c7965..95690108 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -3272,7 +3272,7 @@ gl_renderer_create_stream_surface(struct gl_renderer *gr,
- EGLStreamKHR *egl_stream)
- {
- EGLint stream_attribs[] = {
-- EGL_STREAM_FIFO_LENGTH_KHR, 1,
-+ EGL_STREAM_FIFO_LENGTH_KHR, 0, /* Mailbox mode */
- #ifdef EGL_EXT_stream_acquire_mode
- EGL_CONSUMER_AUTO_ACQUIRE_EXT, EGL_FALSE,
- #endif
---
-2.18.0
-
diff --git a/0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch b/0008-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
index 474ff386712..e0bd3cc828d 100644
--- a/0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
+++ b/0008-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch
@@ -1,7 +1,7 @@
-From 27266e389b238f023f8789fec40ae661541372e4 Mon Sep 17 00:00:00 2001
+From a49fdfc86296f3e6a05388c7bc7ea806be49d919 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 7/9] simple-egl: Do not set EGL up until XDG setup is complete
+Subject: [PATCH 8/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,14 +18,14 @@ Related bug:
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
---
- clients/simple-egl.c | 67 +++++++++++++++++++++++---------------------
- 1 file changed, 35 insertions(+), 32 deletions(-)
+ clients/simple-egl.c | 64 +++++++++++++++++++++++---------------------
+ 1 file changed, 33 insertions(+), 31 deletions(-)
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
-index a1e57aef..0ca66415 100644
+index 8a086ef0..2d409c70 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
-@@ -221,11 +221,32 @@ init_egl(struct display *display, struct window *window)
+@@ -217,11 +217,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);
@@ -59,17 +59,7 @@ index a1e57aef..0ca66415 100644
eglTerminate(display->egl.dpy);
eglReleaseThread();
}
-@@ -364,7 +385,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;
-@@ -417,7 +439,6 @@ static void
+@@ -358,7 +379,6 @@ static void
create_surface(struct window *window)
{
struct display *display = window->display;
@@ -77,7 +67,7 @@ index a1e57aef..0ca66415 100644
window->surface = wl_compositor_create_surface(display->compositor);
-@@ -425,10 +446,6 @@ create_surface(struct window *window)
+@@ -366,10 +386,6 @@ create_surface(struct window *window)
wl_egl_window_create(window->surface,
window->geometry.width,
window->geometry.height);
@@ -86,11 +76,11 @@ index a1e57aef..0ca66415 100644
- display->egl.conf,
- window->native, NULL);
-
- if (display->shell) {
-@@ -439,13 +456,6 @@ create_surface(struct window *window)
- assert(0);
- }
+ window->xdg_surface = xdg_wm_base_get_xdg_surface(display->wm_base,
+ window->surface);
+@@ -386,13 +402,6 @@ create_surface(struct window *window)
+ window->wait_for_configure = true;
+ wl_surface_commit(window->surface);
- ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
- window->egl_surface, window->display->egl.ctx);
@@ -99,10 +89,10 @@ index a1e57aef..0ca66415 100644
- if (!window->frame_sync)
- eglSwapInterval(display->egl.dpy, 0);
-
- if (!display->shell)
+ if (!display->wm_base)
return;
-@@ -456,15 +466,6 @@ create_surface(struct window *window)
+@@ -403,15 +412,6 @@ create_surface(struct window *window)
static void
destroy_surface(struct window *window)
{
@@ -116,9 +106,9 @@ index a1e57aef..0ca66415 100644
- wl_egl_window_destroy(window->native);
-
if (window->xdg_toplevel)
- zxdg_toplevel_v6_destroy(window->xdg_toplevel);
+ xdg_toplevel_destroy(window->xdg_toplevel);
if (window->xdg_surface)
-@@ -906,9 +907,7 @@ main(int argc, char **argv)
+@@ -846,9 +846,7 @@ main(int argc, char **argv)
wl_display_roundtrip(display.display);
@@ -128,7 +118,7 @@ index a1e57aef..0ca66415 100644
display.cursor_surface =
wl_compositor_create_surface(display.compositor);
-@@ -918,23 +917,27 @@ main(int argc, char **argv)
+@@ -858,23 +856,27 @@ main(int argc, char **argv)
sigint.sa_flags = SA_RESETHAND;
sigaction(SIGINT, &sigint, NULL);
@@ -164,5 +154,5 @@ index a1e57aef..0ca66415 100644
wl_surface_destroy(display.cursor_surface);
if (display.cursor_theme)
--
-2.18.0
+2.21.0
diff --git a/0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch b/0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch
deleted file mode 100644
index 15990c07a35..00000000000
--- a/0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c5c8d75dd72b44076af00fa4f0dcfbdb5b9c9f2f Mon Sep 17 00:00:00 2001
-From: "Miguel A. Vico" <mvicomoya@nvidia.com>
-Date: Tue, 26 Mar 2019 15:44:26 -0700
-Subject: [PATCH 9/9] configure: Temporary fix for gobject-2.0 libs missing in
- pango pkgconfig
-X-NVConfidentiality: public
-
-This fixes the following build error, until the pango pkgconfig is
-restored to also include the corresponding flags to link against
-gobject-2.0:
-
- /usr/bin/ld: clients/weston_editor-editor.o: undefined reference to symbol 'g_object_unref'
- /usr/bin/ld: /usr/lib/libgobject-2.0.so.0: error adding symbols: DSO missing from command line
- collect2: error: ld returned 1 exit status
-
-Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index b219d2e2..18cdfecb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -462,7 +462,7 @@ if test x$enable_clients = xyes; then
- [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
- [have_cairo_egl=no])
-
-- PKG_CHECK_MODULES(PANGO, [pangocairo pango glib-2.0 >= 2.36], [have_pango=yes], [have_pango=no])
-+ PKG_CHECK_MODULES(PANGO, [pangocairo pango glib-2.0 >= 2.36 gobject-2.0 >= 2.36], [have_pango=yes], [have_pango=no])
- fi
-
- AC_ARG_ENABLE(resize-optimization,
---
-2.18.0
-
diff --git a/PKGBUILD b/PKGBUILD
index de4d532bfc4..e0d23ba1703 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,72 +1,61 @@
# Maintainer: Aaron Plattner <aplattner@nvidia.com>
# Maintainer: Miguel A. Vico <mvicomoya@nvidia.com>
-# Contributor: Sébastien Luttringer
+# Contributor: Eric Toombs
# Contributor: Joel Teichroeb <joel@teichroeb.net>
+# Contributor: Sébastien Luttringer
+# Contributor: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
pkgname=weston-eglstream
-pkgver=5.0.0
-pkgrel=5
+pkgver=6.0.0
+pkgrel=1
pkgdesc='Reference implementation of a Wayland compositor with EGLStream support'
-arch=('i686' 'x86_64')
+arch=('x86_64')
url='https://wayland.freedesktop.org/'
license=('MIT')
-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' 'egl-wayland' 'autoconf')
-makedepends=('wayland-protocols')
+depends=('wayland' 'libxkbcommon' 'libinput' 'libjpeg-turbo' 'libwebp'
+ 'libegl' 'libgles' 'pango' 'libva' 'libxcursor' 'colord' 'egl-wayland')
+makedepends=('meson' '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-compositor-Process-stream-attach-requests-with-wl_eg.patch'
- '0007-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch'
- '0008-gl-renderer-Use-mailbox-streams-for-scanout.patch'
- '0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch')
-sha256sums=('15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf'
- '270c2f68bb84a0f1f670eddb44b3f77729cf29ceecddbe4e62a5ced80fb1d1df'
- 'f4f79611d00847c722e476469f74dc8fce812afdf2fed58ca91235b04bfe0107'
- '17c8d59665ad33d3dbfea39d8c32634dac660cf528313b51c7064ce27b93ddec'
- 'f5c7ae1142b2cb0dcf28c4b217c7cac42ab98fb1bb5ee14a2978fa8cc9bc6ea7'
- '59287416cf0a57b76f7e77b7eadf0cf9c91afe480b0c400998abafe2deeb3126'
- '5917fe7b0b49a1d66c3262958c004ffe22de7bb5026856f92cf5be46e81f9b1e'
- '9b910c9b7176a4caea796a11ffd5086a54fe7b3c02336d494b8ea050933cfcbe'
- '840166cc83641e6502c119ea1ff060be3afc1c99c0da792e7e43364ad29e799d'
- 'd84cea4d89f79215adb148e5ed2afe7e94f3ef66df10e2bbecfddf9f04bd13e4')
+ '0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.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-compositor-Process-stream-attach-requests-with-wl_eg.patch'
+ '0008-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch')
+sha256sums=('546323a90607b3bd7f48809ea9d76e64cd09718102f2deca6d95aa59a882e612'
+ 'd6e78c5bfc2118f1955f8c3eb30aedf7dc01cab9e21271b135dc32be1b895607'
+ 'f4b5222e0a8ee1c895f0e60e34d9d7c0a371012c5aab4d7e896e4c6f0df514b7'
+ '8e778e55a2268cf932d57e4a6bbedcc7e24b1e223583cb238091dd426217198b'
+ '01ecdb0363d36e11365ffe77056e9ec282d1928b007023ac7450aa2812a5018f'
+ 'f14e27d58b7b0ec72b5aa722db95bd62e9b316e91907070cfeed236e65fe5c17'
+ '77b1633c0162ac0b6f8126a1e614b8fa54a672927c04c1cacc5486b534ebd4ec'
+ '36f05125a0be58d2ce840c8de2b8d42cfeeae8362e5b95861669b85d0f876816'
+ 'a2acbc92962d2ae2c1690398af67eac35c5bbe06f0ff03a94f1aa1f12385ea12')
prepare() {
- cd weston-$pkgver
+ 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-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-gl-renderer-Use-mailbox-streams-for-scanout.patch"
- patch -Np1 -i "${srcdir}/0009-configure-Temporary-fix-for-gobject-2.0-libs-missing.patch"
+ patch -Np1 -i "${srcdir}/0001-configure-meson-Tmp-fix-for-gobject-2.0-libs-missing.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-compositor-Process-stream-attach-requests-with-wl_eg.patch"
+ patch -Np1 -i "${srcdir}/0008-simple-egl-Do-not-set-EGL-up-until-XDG-setup-is-comp.patch"
}
build() {
- cd weston-$pkgver
- autoreconf --force -v --install
- ./configure \
- --prefix=/usr \
- --libexecdir=/usr/lib/weston \
- --enable-systemd-login \
- --enable-systemd-notify \
- --enable-xwayland \
- --enable-demo-clients-install
- make
+ arch-meson "build" "weston-$pkgver" -Dbackend-drm-screencast-vaapi=false \
+ -Dscreenshare=false -Dbackend-rdp=false -Dshell-ivi=false \
+ -Dsimple-dmabuf-drm= -Dremoting=false
+ ninja -C "build"
}
package() {
- cd weston-$pkgver
- make DESTDIR="$pkgdir" install
- # license
- install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+ DESTDIR="$pkgdir" ninja -C "build" install
+ install -Dm644 weston-$pkgver/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}