All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 1/3] wayland : Bump to version 1.14.0
@ 2017-10-17 17:38 Fabien Lahoudere
  2017-10-17 17:38 ` [PATCH v6 2/3] wayland: Fix installation patch issue Fabien Lahoudere
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Fabien Lahoudere @ 2017-10-17 17:38 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 .../recipes-graphics/wayland/{wayland_1.13.0.bb => wayland_1.14.0.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-graphics/wayland/{wayland_1.13.0.bb => wayland_1.14.0.bb} (92%)

diff --git a/meta/recipes-graphics/wayland/wayland_1.13.0.bb b/meta/recipes-graphics/wayland/wayland_1.14.0.bb
similarity index 92%
rename from meta/recipes-graphics/wayland/wayland_1.13.0.bb
rename to meta/recipes-graphics/wayland/wayland_1.14.0.bb
index b9396b6c75..2a2489d658 100644
--- a/meta/recipes-graphics/wayland/wayland_1.13.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.14.0.bb
@@ -14,8 +14,8 @@ DEPENDS = "expat libxml2 libffi wayland-native"
 
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            "
-SRC_URI[md5sum] = "cae152ed956da6de53f9727bc1c45039"
-SRC_URI[sha256sum] = "69b052c031a61e89af7cc8780893d0da1e301492352aa449dee9345043e6fe51"
+SRC_URI[md5sum] = "0235f6075c32c3be61cff94fa0b9f108"
+SRC_URI[sha256sum] = "ed80cabc0961a759a42092e2c39aabfc1ec9a13c86c98bbe2b812f008da27ab8"
 
 inherit autotools pkgconfig
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v6 2/3] wayland: Fix installation patch issue
  2017-10-17 17:38 [PATCH v6 1/3] wayland : Bump to version 1.14.0 Fabien Lahoudere
@ 2017-10-17 17:38 ` Fabien Lahoudere
  2017-10-17 17:38 ` [PATCH v6 3/3] weston: Bump version to 3.0.0 Fabien Lahoudere
  2017-10-17 18:00 ` ✗ patchtest: failure for "[v6] wayland : Bump to version..." and 2 more Patchwork
  2 siblings, 0 replies; 9+ messages in thread
From: Fabien Lahoudere @ 2017-10-17 17:38 UTC (permalink / raw)
  To: openembedded-core

This patch modify the way we manage wayland path issues.
Instead of patching each recipe to make it work with wayland and its protocols,
it is better to patch wayland to fix its path issues.

So wayland-scanner.pc, wayland-client.pc and wayland-protocols.pc are patched to change paths.

Then we can drop the following workaround:

WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}

in:

- gtk+3
- libsdl2
- xserver-xorg
- gstreamer1.0-plugins-bad
- weston-2.0.0

We also dropped libsdl2 patches which fix wayland paths.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 meta/recipes-gnome/gtk+/gtk+3.inc                  |  1 -
 ...-sysroot-path-so-that-make-finds-our-wayl.patch | 34 ----------------------
 ...void-finding-build-host-s-wayland-scanner.patch | 31 --------------------
 meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb     |  4 +--
 .../usesysrootprefixforpkgdatadirvariable.patch    | 27 +++++++++++++++++
 .../wayland/wayland-protocols_1.10.bb              |  1 +
 .../wayland/wayland/fixpathinpcfiles.patch         | 33 +++++++++++++++++++++
 meta/recipes-graphics/wayland/wayland_1.14.0.bb    |  1 +
 meta/recipes-graphics/wayland/weston_2.0.0.bb      |  1 -
 .../recipes-graphics/xorg-xserver/xserver-xorg.inc |  1 -
 .../gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb   |  1 -
 11 files changed, 63 insertions(+), 72 deletions(-)
 delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
 delete mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
 create mode 100644 meta/recipes-graphics/wayland/wayland-protocols/usesysrootprefixforpkgdatadirvariable.patch
 create mode 100644 meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch

diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 0a357db049..420ead2ca2 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -35,7 +35,6 @@ EXTRA_OECONF += " \
                  --enable-modules \
                  --disable-cups \
                  --disable-colord \
-                 WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
                  ${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \
                  "
 
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
deleted file mode 100644
index efc84188f3..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b44808e43130dcd13b43e5b978b9b24aeb4c134c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Thu, 20 Oct 2016 14:57:51 +0200
-Subject: [PATCH] prepend our sysroot path so that make finds our
- wayland-protocol files
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 4 +-
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 726ded3..3376600 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1206,7 +1206,7 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
-                 WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
-                 WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
-                 WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
--                WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
--                WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-+                WAYLAND_CORE_PROTOCOL_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-client`
-+                WAYLAND_PROTOCOLS_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-                 video_wayland=yes
-             fi
-         fi
--- 
-2.5.5
-
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch b/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
deleted file mode 100644
index 7837315f1c..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ae879091cf65cb70293b375ec7e61ed12a96d8a7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 2 Dec 2016 09:39:25 +0100
-Subject: [PATCH] Avoid finding build host's wayland-scanner
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 3376600..2aa6ed4 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1204,7 +1204,7 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
-             if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
-                 WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
-                 WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
--                WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
-+                AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
-                 WAYLAND_CORE_PROTOCOL_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-client`
-                 WAYLAND_PROTOCOLS_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-                 video_wayland=yes
--- 
-2.7.4
-
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
index 12d3aaf6f0..032f45bb20 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
@@ -17,8 +17,6 @@ DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtu
 SRC_URI = " \
     http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
     file://linkage.patch \
-    file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
-    file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
     file://fix-build-failure-on-ppc.patch \
 "
 
@@ -35,7 +33,7 @@ EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
                 --enable-pthreads \
                 --enable-sdl-dlopen \
                 --disable-rpath \
-                WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
+                "
 
 # opengl packageconfig factored out to make it easy for distros
 # and BSP layers to pick either (desktop) opengl, gles2, or no GL
diff --git a/meta/recipes-graphics/wayland/wayland-protocols/usesysrootprefixforpkgdatadirvariable.patch b/meta/recipes-graphics/wayland/wayland-protocols/usesysrootprefixforpkgdatadirvariable.patch
new file mode 100644
index 0000000000..0922a4d2c2
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland-protocols/usesysrootprefixforpkgdatadirvariable.patch
@@ -0,0 +1,27 @@
+From 875130ee3cbcf62266901ef4b91b9a0fb6adad43 Mon Sep 17 00:00:00 2001
+From: Tomek Bury <tomek.bury@broadcom.com>
+Date: Fri, 4 Aug 2017 16:16:38 +0100
+Subject: Use sysroot prefix for pkgdatadir variable
+
+The pc_sysroot is automatically added to cflags and libs but not
+to 'pkg-config --variable'
+
+Upstream-Status: Backport [https://cgit.freedesktop.org/wayland/wayland-protocols/commit/?id=875130ee3cbcf62266901ef4b91b9a0fb6adad43]
+
+Reviewed-by: Daniel Stone <daniels@collabora.com>
+
+diff --git a/wayland-protocols.pc.in b/wayland-protocols.pc.in
+index a26744c..379be06 100644
+--- a/wayland-protocols.pc.in
++++ b/wayland-protocols.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@prefix@
+ datarootdir=@datarootdir@
+-pkgdatadir=@datadir@/@PACKAGE@
++pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
+ 
+ Name: Wayland Protocols
+ Description: Wayland protocol files
+-- 
+cgit v0.10.2
+
diff --git a/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb b/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
index 4f9e9f32bf..1ff12c607b 100644
--- a/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
+++ b/meta/recipes-graphics/wayland/wayland-protocols_1.10.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
                     file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
 
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+	   file://usesysrootprefixforpkgdatadirvariable.patch \
            "
 SRC_URI[md5sum] = "84a7846c2b6a6a3e265fc9be36453e60"
 SRC_URI[sha256sum] = "5719c51d7354864983171c5083e93a72ac99229e2b460c4bb10513de08839c0a"
diff --git a/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch b/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
new file mode 100644
index 0000000000..9fb1252284
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch
@@ -0,0 +1,33 @@
+Fix wayland-client and wayland-scanner pc files
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+
+Index: wayland-1.14.0/src/wayland-client.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-client.pc.in
++++ wayland-1.14.0/src/wayland-client.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+-pkgdatadir=@datadir@/@PACKAGE@
++pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
+ libdir=@libdir@
+ includedir=@includedir@
+ 
+Index: wayland-1.14.0/src/wayland-scanner.pc.in
+===================================================================
+--- wayland-1.14.0.orig/src/wayland-scanner.pc.in
++++ wayland-1.14.0/src/wayland-scanner.pc.in
+@@ -1,8 +1,8 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+ pkgdatadir=@datadir@/@PACKAGE@
+-wayland_scanner=@bindir@/wayland-scanner
++wayland_scanner=wayland-scanner
+ 
+ Name: Wayland Scanner
+ Description: Wayland scanner
diff --git a/meta/recipes-graphics/wayland/wayland_1.14.0.bb b/meta/recipes-graphics/wayland/wayland_1.14.0.bb
index 2a2489d658..1a9ff9807b 100644
--- a/meta/recipes-graphics/wayland/wayland_1.14.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.14.0.bb
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
 DEPENDS = "expat libxml2 libffi wayland-native"
 
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+	   file://fixpathinpcfiles.patch \
            "
 SRC_URI[md5sum] = "0235f6075c32c3be61cff94fa0b9f108"
 SRC_URI[sha256sum] = "ed80cabc0961a759a42092e2c39aabfc1ec9a13c86c98bbe2b812f008da27ab8"
diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-graphics/wayland/weston_2.0.0.bb
index 54b07bd6b9..8160f5556d 100644
--- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_2.0.0.bb
@@ -25,7 +25,6 @@ DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
 
 EXTRA_OECONF = "--enable-setuid-install \
                 --disable-rdp-compositor \
-                WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
                 "
 EXTRA_OECONF_append_qemux86 = "\
 		WESTON_NATIVE_BACKEND=fbdev-backend.so \
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 863d80ce43..e8025de55f 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -117,7 +117,6 @@ EXTRA_OECONF += "--with-fop=no \
                  --sysconfdir=/etc/X11 \
                  --localstatedir=/var \
                  --with-xkb-output=/var/lib/xkb \
-                 WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
 "
 
 OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
index 8321da0c27..a83a5bab21 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb
@@ -22,5 +22,4 @@ SRC_URI[sha256sum] = "9c2c7edde4f59d74eb414e0701c55131f562e5c605a3ce9b091754f106
 
 S = "${WORKDIR}/gst-plugins-bad-${PV}"
 
-EXTRA_OECONF += "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v6 3/3] weston: Bump version to 3.0.0
  2017-10-17 17:38 [PATCH v6 1/3] wayland : Bump to version 1.14.0 Fabien Lahoudere
  2017-10-17 17:38 ` [PATCH v6 2/3] wayland: Fix installation patch issue Fabien Lahoudere
@ 2017-10-17 17:38 ` Fabien Lahoudere
  2017-10-17 19:00   ` Denys Dmytriyenko
  2017-10-17 18:00 ` ✗ patchtest: failure for "[v6] wayland : Bump to version..." and 2 more Patchwork
  2 siblings, 1 reply; 9+ messages in thread
From: Fabien Lahoudere @ 2017-10-17 17:38 UTC (permalink / raw)
  To: openembedded-core

Update weston release to 3.0.0.
Two patches added:
- fix-missing-header.patch:
        fix a build issue when musl is used as libc.
- weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch:
        fix display issue with YUV420/I420 format.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 .../wayland/weston/fix-missing-header.patch        | 30 ++++++++++++
 ...t-pitch-correctly-for-subsampled-textures.patch | 55 ++++++++++++++++++++++
 .../wayland/{weston_2.0.0.bb => weston_3.0.0.bb}   | 17 +++----
 3 files changed, 94 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston/fix-missing-header.patch
 create mode 100644 meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
 rename meta/recipes-graphics/wayland/{weston_2.0.0.bb => weston_3.0.0.bb} (89%)

diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
new file mode 100644
index 0000000000..55c0d4fd0f
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
@@ -0,0 +1,30 @@
+On the musl C library, tests/timespec-text.c does not build, with the
+following error:
+
+    In file included from tests/timespec-test.c:36:0:
+    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
+    inside parameter list will not be visible outside of this definition
+    or declaration
+     timespec_sub(struct timespec *r,
+                         ^~~~~~~~
+   [...]
+
+Indeed, struct timespec is defined in time.h, so we must include it.
+
+Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+
+Index: weston-3.0.0/shared/timespec-util.h
+===================================================================
+--- weston-3.0.0.orig/shared/timespec-util.h
++++ weston-3.0.0/shared/timespec-util.h
+@@ -28,6 +28,7 @@
+ 
+ #include <stdint.h>
+ #include <assert.h>
++#include <time.h>
+ 
+ #define NSEC_PER_SEC 1000000000
+ 
diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
new file mode 100644
index 0000000000..69284a9616
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
@@ -0,0 +1,55 @@
+Multi-plane sub-sampled textures have partial width/height, e.g.
+YUV420/I420 has a full-size Y plane, followed by a half-width/height U
+plane, and a half-width/height V plane.
+
+zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
+plane, but for wl_shm this must be inferred. gl-renderer was correctly
+accounting for the width and height when subsampling, but the pitch was
+being taken as the pitch for the first plane.
+
+This does not match the requirements for GStreamer's waylandsink, in
+particular, as well as other clients. Fix the SHM upload path to
+correctly set the pitch for each plane, according to subsampling.
+
+Tested with:
+  $ gst-launch-1.0 videotestsrc ! waylandsink
+
+Upstream-status: Backport [https://patchwork.freedesktop.org/patch/180767/]
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
+Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
+
+---
+ libweston/gl-renderer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
+index 244ce309..40bf0bb6 100644
+--- a/libweston/gl-renderer.c
++++ b/libweston/gl-renderer.c
+@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ 		goto done;
+ 	}
+ 
+-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
+-
+ 	if (gs->needs_full_upload) {
+ 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
+ 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
+ 		wl_shm_buffer_begin_access(buffer->shm_buffer);
+ 		for (j = 0; j < gs->num_textures; j++) {
+ 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ 			glTexImage2D(GL_TEXTURE_2D, 0,
+ 				     gs->gl_format[j],
+ 				     gs->pitch / gs->hsub[j],
+@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
+ 		for (j = 0; j < gs->num_textures; j++) {
+ 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ 			glTexSubImage2D(GL_TEXTURE_2D, 0,
+ 					r.x1 / gs->hsub[j],
+ 					r.y1 / gs->vsub[j],
diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-graphics/wayland/weston_3.0.0.bb
similarity index 89%
rename from meta/recipes-graphics/wayland/weston_2.0.0.bb
rename to meta/recipes-graphics/wayland/weston_3.0.0.bb
index 8160f5556d..ad0cdc2b0f 100644
--- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
@@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://weston.png \
            file://weston.desktop \
            file://0001-make-error-portable.patch \
-           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
            file://xwayland.weston-start \
            file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
+	   file://fix-missing-header.patch \
 "
-SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
-SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
+SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
+SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
 
 inherit autotools pkgconfig useradd distro_features_check
 # depends on virtual/egl
@@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
 
 do_install_append() {
 	# Weston doesn't need the .la files to load modules, so wipe them
-	rm -f ${D}/${libdir}/libweston-2/*.la
+	rm -f ${D}/${libdir}/libweston-3/*.la
 
 	# If X11, ship a desktop file to launch it
 	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
@@ -93,16 +94,16 @@ do_install_append() {
 }
 
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
-             libweston-2 ${PN}-examples"
+             libweston-3 ${PN}-examples"
 
 FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
 
-FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
-SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
+FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
+SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
 
 FILES_${PN}-examples = "${bindir}/*"
 
-FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
+FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
 RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
 
 RDEPENDS_${PN} += "xkeyboard-config"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✗ patchtest: failure for "[v6] wayland : Bump to version..." and 2 more
  2017-10-17 17:38 [PATCH v6 1/3] wayland : Bump to version 1.14.0 Fabien Lahoudere
  2017-10-17 17:38 ` [PATCH v6 2/3] wayland: Fix installation patch issue Fabien Lahoudere
  2017-10-17 17:38 ` [PATCH v6 3/3] weston: Bump version to 3.0.0 Fabien Lahoudere
@ 2017-10-17 18:00 ` Patchwork
  2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-10-17 18:00 UTC (permalink / raw)
  To: Fabien Lahoudere; +Cc: openembedded-core

== Series Details ==

Series: "[v6] wayland : Bump to version..." and 2 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/9387/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence] 
  Suggested fix    Add Upstream-Status: <status> to the header of meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch (possible values: Pending, Submitted, Accepted, Backport, Denied, Inappropriate)

* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta/recipes-graphics/wayland/wayland-protocols/usesysrootprefixforpkgdatadirvariable.patch)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v6 3/3] weston: Bump version to 3.0.0
  2017-10-17 17:38 ` [PATCH v6 3/3] weston: Bump version to 3.0.0 Fabien Lahoudere
@ 2017-10-17 19:00   ` Denys Dmytriyenko
  2017-10-30 13:30     ` Fabien Lahoudere
  0 siblings, 1 reply; 9+ messages in thread
From: Denys Dmytriyenko @ 2017-10-17 19:00 UTC (permalink / raw)
  To: Fabien Lahoudere; +Cc: openembedded-core

I don't believe we reached an agreement on the pitch patch belonging here...


On Tue, Oct 17, 2017 at 07:38:07PM +0200, Fabien Lahoudere wrote:
> Update weston release to 3.0.0.
> Two patches added:
> - fix-missing-header.patch:
>         fix a build issue when musl is used as libc.
> - weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch:
>         fix display issue with YUV420/I420 format.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  .../wayland/weston/fix-missing-header.patch        | 30 ++++++++++++
>  ...t-pitch-correctly-for-subsampled-textures.patch | 55 ++++++++++++++++++++++
>  .../wayland/{weston_2.0.0.bb => weston_3.0.0.bb}   | 17 +++----
>  3 files changed, 94 insertions(+), 8 deletions(-)
>  create mode 100644 meta/recipes-graphics/wayland/weston/fix-missing-header.patch
>  create mode 100644 meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
>  rename meta/recipes-graphics/wayland/{weston_2.0.0.bb => weston_3.0.0.bb} (89%)
> 
> diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> new file mode 100644
> index 0000000000..55c0d4fd0f
> --- /dev/null
> +++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> @@ -0,0 +1,30 @@
> +On the musl C library, tests/timespec-text.c does not build, with the
> +following error:
> +
> +    In file included from tests/timespec-test.c:36:0:
> +    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
> +    inside parameter list will not be visible outside of this definition
> +    or declaration
> +     timespec_sub(struct timespec *r,
> +                         ^~~~~~~~
> +   [...]
> +
> +Indeed, struct timespec is defined in time.h, so we must include it.
> +
> +Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> +
> +Index: weston-3.0.0/shared/timespec-util.h
> +===================================================================
> +--- weston-3.0.0.orig/shared/timespec-util.h
> ++++ weston-3.0.0/shared/timespec-util.h
> +@@ -28,6 +28,7 @@
> + 
> + #include <stdint.h>
> + #include <assert.h>
> ++#include <time.h>
> + 
> + #define NSEC_PER_SEC 1000000000
> + 
> diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
> new file mode 100644
> index 0000000000..69284a9616
> --- /dev/null
> +++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
> @@ -0,0 +1,55 @@
> +Multi-plane sub-sampled textures have partial width/height, e.g.
> +YUV420/I420 has a full-size Y plane, followed by a half-width/height U
> +plane, and a half-width/height V plane.
> +
> +zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
> +plane, but for wl_shm this must be inferred. gl-renderer was correctly
> +accounting for the width and height when subsampling, but the pitch was
> +being taken as the pitch for the first plane.
> +
> +This does not match the requirements for GStreamer's waylandsink, in
> +particular, as well as other clients. Fix the SHM upload path to
> +correctly set the pitch for each plane, according to subsampling.
> +
> +Tested with:
> +  $ gst-launch-1.0 videotestsrc ! waylandsink
> +
> +Upstream-status: Backport [https://patchwork.freedesktop.org/patch/180767/]
> +
> +Signed-off-by: Daniel Stone <daniels@collabora.com>
> +Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
> +Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
> +
> +---
> + libweston/gl-renderer.c | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> +index 244ce309..40bf0bb6 100644
> +--- a/libweston/gl-renderer.c
> ++++ b/libweston/gl-renderer.c
> +@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> + 		goto done;
> + 	}
> + 
> +-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
> +-
> + 	if (gs->needs_full_upload) {
> + 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
> + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
> + 		wl_shm_buffer_begin_access(buffer->shm_buffer);
> + 		for (j = 0; j < gs->num_textures; j++) {
> + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> + 			glTexImage2D(GL_TEXTURE_2D, 0,
> + 				     gs->gl_format[j],
> + 				     gs->pitch / gs->hsub[j],
> +@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
> + 		for (j = 0; j < gs->num_textures; j++) {
> + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> + 			glTexSubImage2D(GL_TEXTURE_2D, 0,
> + 					r.x1 / gs->hsub[j],
> + 					r.y1 / gs->vsub[j],
> diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-graphics/wayland/weston_3.0.0.bb
> similarity index 89%
> rename from meta/recipes-graphics/wayland/weston_2.0.0.bb
> rename to meta/recipes-graphics/wayland/weston_3.0.0.bb
> index 8160f5556d..ad0cdc2b0f 100644
> --- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
> +++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
> @@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
>             file://weston.png \
>             file://weston.desktop \
>             file://0001-make-error-portable.patch \
> -           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
>             file://xwayland.weston-start \
>             file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
> +	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
> +	   file://fix-missing-header.patch \
>  "
> -SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
> -SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
> +SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
> +SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
>  
>  inherit autotools pkgconfig useradd distro_features_check
>  # depends on virtual/egl
> @@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
>  
>  do_install_append() {
>  	# Weston doesn't need the .la files to load modules, so wipe them
> -	rm -f ${D}/${libdir}/libweston-2/*.la
> +	rm -f ${D}/${libdir}/libweston-3/*.la
>  
>  	# If X11, ship a desktop file to launch it
>  	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
> @@ -93,16 +94,16 @@ do_install_append() {
>  }
>  
>  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
> -             libweston-2 ${PN}-examples"
> +             libweston-3 ${PN}-examples"
>  
>  FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
>  
> -FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
> -SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
> +FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
> +SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
>  
>  FILES_${PN}-examples = "${bindir}/*"
>  
> -FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
> +FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
>  RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
>  
>  RDEPENDS_${PN} += "xkeyboard-config"
> -- 
> 2.11.0
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v6 3/3] weston: Bump version to 3.0.0
  2017-10-17 19:00   ` Denys Dmytriyenko
@ 2017-10-30 13:30     ` Fabien Lahoudere
  2017-10-31 19:29       ` Denys Dmytriyenko
  0 siblings, 1 reply; 9+ messages in thread
From: Fabien Lahoudere @ 2017-10-30 13:30 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: openembedded-core

On Tue, 2017-10-17 at 15:00 -0400, Denys Dmytriyenko wrote:
> I don't believe we reached an agreement on the pitch patch belonging here...
> 

This patch fixes a display issue and also possible random crash because how
the buffer is accessed is not consistent.

If you think the patch is not useful, I can remove it in v7?

Thanks

Fabien

> 
> On Tue, Oct 17, 2017 at 07:38:07PM +0200, Fabien Lahoudere wrote:
> > Update weston release to 3.0.0.
> > Two patches added:
> > - fix-missing-header.patch:
> >         fix a build issue when musl is used as libc.
> > - weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch:
> >         fix display issue with YUV420/I420 format.
> > 
> > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > ---
> >  .../wayland/weston/fix-missing-header.patch        | 30 ++++++++++++
> >  ...t-pitch-correctly-for-subsampled-textures.patch | 55 ++++++++++++++++++++++
> >  .../wayland/{weston_2.0.0.bb => weston_3.0.0.bb}   | 17 +++----
> >  3 files changed, 94 insertions(+), 8 deletions(-)
> >  create mode 100644 meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> >  create mode 100644 meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-
> > for-subsampled-textures.patch
> >  rename meta/recipes-graphics/wayland/{weston_2.0.0.bb => weston_3.0.0.bb} (89%)
> > 
> > diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-
> > graphics/wayland/weston/fix-missing-header.patch
> > new file mode 100644
> > index 0000000000..55c0d4fd0f
> > --- /dev/null
> > +++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > @@ -0,0 +1,30 @@
> > +On the musl C library, tests/timespec-text.c does not build, with the
> > +following error:
> > +
> > +    In file included from tests/timespec-test.c:36:0:
> > +    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
> > +    inside parameter list will not be visible outside of this definition
> > +    or declaration
> > +     timespec_sub(struct timespec *r,
> > +                         ^~~~~~~~
> > +   [...]
> > +
> > +Indeed, struct timespec is defined in time.h, so we must include it.
> > +
> > +Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
> > +
> > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > +Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> > +
> > +Index: weston-3.0.0/shared/timespec-util.h
> > +===================================================================
> > +--- weston-3.0.0.orig/shared/timespec-util.h
> > ++++ weston-3.0.0/shared/timespec-util.h
> > +@@ -28,6 +28,7 @@
> > + 
> > + #include <stdint.h>
> > + #include <assert.h>
> > ++#include <time.h>
> > + 
> > + #define NSEC_PER_SEC 1000000000
> > + 
> > diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-
> > subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-
> > correctly-for-subsampled-textures.patch
> > new file mode 100644
> > index 0000000000..69284a9616
> > --- /dev/null
> > +++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-
> > subsampled-textures.patch
> > @@ -0,0 +1,55 @@
> > +Multi-plane sub-sampled textures have partial width/height, e.g.
> > +YUV420/I420 has a full-size Y plane, followed by a half-width/height U
> > +plane, and a half-width/height V plane.
> > +
> > +zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
> > +plane, but for wl_shm this must be inferred. gl-renderer was correctly
> > +accounting for the width and height when subsampling, but the pitch was
> > +being taken as the pitch for the first plane.
> > +
> > +This does not match the requirements for GStreamer's waylandsink, in
> > +particular, as well as other clients. Fix the SHM upload path to
> > +correctly set the pitch for each plane, according to subsampling.
> > +
> > +Tested with:
> > +  $ gst-launch-1.0 videotestsrc ! waylandsink
> > +
> > +Upstream-status: Backport [https://patchwork.freedesktop.org/patch/180767/]
> > +
> > +Signed-off-by: Daniel Stone <daniels@collabora.com>
> > +Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
> > +Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
> > +
> > +---
> > + libweston/gl-renderer.c | 4 ++--
> > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> > +index 244ce309..40bf0bb6 100644
> > +--- a/libweston/gl-renderer.c
> > ++++ b/libweston/gl-renderer.c
> > +@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > + 		goto done;
> > + 	}
> > + 
> > +-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
> > +-
> > + 	if (gs->needs_full_upload) {
> > + 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
> > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
> > + 		wl_shm_buffer_begin_access(buffer->shm_buffer);
> > + 		for (j = 0; j < gs->num_textures; j++) {
> > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > + 			glTexImage2D(GL_TEXTURE_2D, 0,
> > + 				     gs->gl_format[j],
> > + 				     gs->pitch / gs->hsub[j],
> > +@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
> > + 		for (j = 0; j < gs->num_textures; j++) {
> > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > + 			glTexSubImage2D(GL_TEXTURE_2D, 0,
> > + 					r.x1 / gs->hsub[j],
> > + 					r.y1 / gs->vsub[j],
> > diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-
> > graphics/wayland/weston_3.0.0.bb
> > similarity index 89%
> > rename from meta/recipes-graphics/wayland/weston_2.0.0.bb
> > rename to meta/recipes-graphics/wayland/weston_3.0.0.bb
> > index 8160f5556d..ad0cdc2b0f 100644
> > --- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
> > +++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
> > @@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
> >             file://weston.png \
> >             file://weston.desktop \
> >             file://0001-make-error-portable.patch \
> > -           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
> >             file://xwayland.weston-start \
> >             file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
> > +	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
> > +	   file://fix-missing-header.patch \
> >  "
> > -SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
> > -SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
> > +SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
> > +SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
> >  
> >  inherit autotools pkgconfig useradd distro_features_check
> >  # depends on virtual/egl
> > @@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
> >  
> >  do_install_append() {
> >  	# Weston doesn't need the .la files to load modules, so wipe them
> > -	rm -f ${D}/${libdir}/libweston-2/*.la
> > +	rm -f ${D}/${libdir}/libweston-3/*.la
> >  
> >  	# If X11, ship a desktop file to launch it
> >  	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
> > @@ -93,16 +94,16 @@ do_install_append() {
> >  }
> >  
> >  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
> > -             libweston-2 ${PN}-examples"
> > +             libweston-3 ${PN}-examples"
> >  
> >  FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info
> > ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
> >  
> > -FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
> > -SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
> > +FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
> > +SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
> >  
> >  FILES_${PN}-examples = "${bindir}/*"
> >  
> > -FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
> > +FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
> >  RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
> >  
> >  RDEPENDS_${PN} += "xkeyboard-config"
> > -- 
> > 2.11.0
> > 
> > -- 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
Fabien


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v6 3/3] weston: Bump version to 3.0.0
  2017-10-30 13:30     ` Fabien Lahoudere
@ 2017-10-31 19:29       ` Denys Dmytriyenko
  2017-11-01 14:08         ` Fabien Lahoudere
  0 siblings, 1 reply; 9+ messages in thread
From: Denys Dmytriyenko @ 2017-10-31 19:29 UTC (permalink / raw)
  To: Fabien Lahoudere; +Cc: openembedded-core

On Mon, Oct 30, 2017 at 02:30:08PM +0100, Fabien Lahoudere wrote:
> On Tue, 2017-10-17 at 15:00 -0400, Denys Dmytriyenko wrote:
> > I don't believe we reached an agreement on the pitch patch belonging here...
> > 
> 
> This patch fixes a display issue and also possible random crash because how
> the buffer is accessed is not consistent.

Hmm, if it could potentially result in a crash of weston, this changes things. 
We should include the patch, but may need to mention it in the changelog... 
Maybe you need to add this - "fix display issue with YUV420/I420 format, that 
could result in a crash"?


> If you think the patch is not useful, I can remove it in v7?
> 
> Thanks
> 
> Fabien
> 
> > 
> > On Tue, Oct 17, 2017 at 07:38:07PM +0200, Fabien Lahoudere wrote:
> > > Update weston release to 3.0.0.
> > > Two patches added:
> > > - fix-missing-header.patch:
> > >         fix a build issue when musl is used as libc.
> > > - weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch:
> > >         fix display issue with YUV420/I420 format.
> > > 
> > > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > > ---
> > >  .../wayland/weston/fix-missing-header.patch        | 30 ++++++++++++
> > >  ...t-pitch-correctly-for-subsampled-textures.patch | 55 ++++++++++++++++++++++
> > >  .../wayland/{weston_2.0.0.bb => weston_3.0.0.bb}   | 17 +++----
> > >  3 files changed, 94 insertions(+), 8 deletions(-)
> > >  create mode 100644 meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > >  create mode 100644 meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-
> > > for-subsampled-textures.patch
> > >  rename meta/recipes-graphics/wayland/{weston_2.0.0.bb => weston_3.0.0.bb} (89%)
> > > 
> > > diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-
> > > graphics/wayland/weston/fix-missing-header.patch
> > > new file mode 100644
> > > index 0000000000..55c0d4fd0f
> > > --- /dev/null
> > > +++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > > @@ -0,0 +1,30 @@
> > > +On the musl C library, tests/timespec-text.c does not build, with the
> > > +following error:
> > > +
> > > +    In file included from tests/timespec-test.c:36:0:
> > > +    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
> > > +    inside parameter list will not be visible outside of this definition
> > > +    or declaration
> > > +     timespec_sub(struct timespec *r,
> > > +                         ^~~~~~~~
> > > +   [...]
> > > +
> > > +Indeed, struct timespec is defined in time.h, so we must include it.
> > > +
> > > +Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
> > > +
> > > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > > +Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> > > +
> > > +Index: weston-3.0.0/shared/timespec-util.h
> > > +===================================================================
> > > +--- weston-3.0.0.orig/shared/timespec-util.h
> > > ++++ weston-3.0.0/shared/timespec-util.h
> > > +@@ -28,6 +28,7 @@
> > > + 
> > > + #include <stdint.h>
> > > + #include <assert.h>
> > > ++#include <time.h>
> > > + 
> > > + #define NSEC_PER_SEC 1000000000
> > > + 
> > > diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-
> > > subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-
> > > correctly-for-subsampled-textures.patch
> > > new file mode 100644
> > > index 0000000000..69284a9616
> > > --- /dev/null
> > > +++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-
> > > subsampled-textures.patch
> > > @@ -0,0 +1,55 @@
> > > +Multi-plane sub-sampled textures have partial width/height, e.g.
> > > +YUV420/I420 has a full-size Y plane, followed by a half-width/height U
> > > +plane, and a half-width/height V plane.
> > > +
> > > +zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
> > > +plane, but for wl_shm this must be inferred. gl-renderer was correctly
> > > +accounting for the width and height when subsampling, but the pitch was
> > > +being taken as the pitch for the first plane.
> > > +
> > > +This does not match the requirements for GStreamer's waylandsink, in
> > > +particular, as well as other clients. Fix the SHM upload path to
> > > +correctly set the pitch for each plane, according to subsampling.
> > > +
> > > +Tested with:
> > > +  $ gst-launch-1.0 videotestsrc ! waylandsink
> > > +
> > > +Upstream-status: Backport [https://patchwork.freedesktop.org/patch/180767/]
> > > +
> > > +Signed-off-by: Daniel Stone <daniels@collabora.com>
> > > +Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
> > > +Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > > +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
> > > +
> > > +---
> > > + libweston/gl-renderer.c | 4 ++--
> > > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > > +
> > > +diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> > > +index 244ce309..40bf0bb6 100644
> > > +--- a/libweston/gl-renderer.c
> > > ++++ b/libweston/gl-renderer.c
> > > +@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > > + 		goto done;
> > > + 	}
> > > + 
> > > +-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
> > > +-
> > > + 	if (gs->needs_full_upload) {
> > > + 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
> > > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
> > > + 		wl_shm_buffer_begin_access(buffer->shm_buffer);
> > > + 		for (j = 0; j < gs->num_textures; j++) {
> > > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > > + 			glTexImage2D(GL_TEXTURE_2D, 0,
> > > + 				     gs->gl_format[j],
> > > + 				     gs->pitch / gs->hsub[j],
> > > +@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
> > > + 		for (j = 0; j < gs->num_textures; j++) {
> > > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > > + 			glTexSubImage2D(GL_TEXTURE_2D, 0,
> > > + 					r.x1 / gs->hsub[j],
> > > + 					r.y1 / gs->vsub[j],
> > > diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-
> > > graphics/wayland/weston_3.0.0.bb
> > > similarity index 89%
> > > rename from meta/recipes-graphics/wayland/weston_2.0.0.bb
> > > rename to meta/recipes-graphics/wayland/weston_3.0.0.bb
> > > index 8160f5556d..ad0cdc2b0f 100644
> > > --- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
> > > +++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
> > > @@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
> > >             file://weston.png \
> > >             file://weston.desktop \
> > >             file://0001-make-error-portable.patch \
> > > -           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
> > >             file://xwayland.weston-start \
> > >             file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
> > > +	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
> > > +	   file://fix-missing-header.patch \
> > >  "
> > > -SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
> > > -SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
> > > +SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
> > > +SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
> > >  
> > >  inherit autotools pkgconfig useradd distro_features_check
> > >  # depends on virtual/egl
> > > @@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
> > >  
> > >  do_install_append() {
> > >  	# Weston doesn't need the .la files to load modules, so wipe them
> > > -	rm -f ${D}/${libdir}/libweston-2/*.la
> > > +	rm -f ${D}/${libdir}/libweston-3/*.la
> > >  
> > >  	# If X11, ship a desktop file to launch it
> > >  	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
> > > @@ -93,16 +94,16 @@ do_install_append() {
> > >  }
> > >  
> > >  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
> > > -             libweston-2 ${PN}-examples"
> > > +             libweston-3 ${PN}-examples"
> > >  
> > >  FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info
> > > ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
> > >  
> > > -FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
> > > -SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
> > > +FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
> > > +SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
> > >  
> > >  FILES_${PN}-examples = "${bindir}/*"
> > >  
> > > -FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
> > > +FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
> > >  RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
> > >  
> > >  RDEPENDS_${PN} += "xkeyboard-config"
> > > -- 
> > > 2.11.0
> > > 
> > > -- 
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> -- 
> Fabien
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v6 3/3] weston: Bump version to 3.0.0
  2017-10-31 19:29       ` Denys Dmytriyenko
@ 2017-11-01 14:08         ` Fabien Lahoudere
  2017-11-01 17:01           ` Denys Dmytriyenko
  0 siblings, 1 reply; 9+ messages in thread
From: Fabien Lahoudere @ 2017-11-01 14:08 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: openembedded-core

On Tue, 2017-10-31 at 15:29 -0400, Denys Dmytriyenko wrote:
> On Mon, Oct 30, 2017 at 02:30:08PM +0100, Fabien Lahoudere wrote:
> > On Tue, 2017-10-17 at 15:00 -0400, Denys Dmytriyenko wrote:
> > > I don't believe we reached an agreement on the pitch patch belonging here...
> > > 
> > 
> > This patch fixes a display issue and also possible random crash because how
> > the buffer is accessed is not consistent.
> 
> Hmm, if it could potentially result in a crash of weston, this changes things. 
> We should include the patch, but may need to mention it in the changelog... 
> Maybe you need to add this - "fix display issue with YUV420/I420 format, that 
> could result in a crash"?
> 

Ok I will add this message.
You want me to add it in the weston patch commit message or in the oe-core patch?

Thanks
> 
> > If you think the patch is not useful, I can remove it in v7?
> > 
> > Thanks
> > 
> > Fabien
> > 
> > > 
> > > On Tue, Oct 17, 2017 at 07:38:07PM +0200, Fabien Lahoudere wrote:
> > > > Update weston release to 3.0.0.
> > > > Two patches added:
> > > > - fix-missing-header.patch:
> > > >         fix a build issue when musl is used as libc.
> > > > - weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch:
> > > >         fix display issue with YUV420/I420 format.
> > > > 
> > > > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > > > ---
> > > >  .../wayland/weston/fix-missing-header.patch        | 30 ++++++++++++
> > > >  ...t-pitch-correctly-for-subsampled-textures.patch | 55 ++++++++++++++++++++++
> > > >  .../wayland/{weston_2.0.0.bb => weston_3.0.0.bb}   | 17 +++----
> > > >  3 files changed, 94 insertions(+), 8 deletions(-)
> > > >  create mode 100644 meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > > >  create mode 100644 meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-
> > > > correctly-
> > > > for-subsampled-textures.patch
> > > >  rename meta/recipes-graphics/wayland/{weston_2.0.0.bb => weston_3.0.0.bb} (89%)
> > > > 
> > > > diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-
> > > > graphics/wayland/weston/fix-missing-header.patch
> > > > new file mode 100644
> > > > index 0000000000..55c0d4fd0f
> > > > --- /dev/null
> > > > +++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > > > @@ -0,0 +1,30 @@
> > > > +On the musl C library, tests/timespec-text.c does not build, with the
> > > > +following error:
> > > > +
> > > > +    In file included from tests/timespec-test.c:36:0:
> > > > +    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
> > > > +    inside parameter list will not be visible outside of this definition
> > > > +    or declaration
> > > > +     timespec_sub(struct timespec *r,
> > > > +                         ^~~~~~~~
> > > > +   [...]
> > > > +
> > > > +Indeed, struct timespec is defined in time.h, so we must include it.
> > > > +
> > > > +Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
> > > > +
> > > > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > > > +Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> > > > +
> > > > +Index: weston-3.0.0/shared/timespec-util.h
> > > > +===================================================================
> > > > +--- weston-3.0.0.orig/shared/timespec-util.h
> > > > ++++ weston-3.0.0/shared/timespec-util.h
> > > > +@@ -28,6 +28,7 @@
> > > > + 
> > > > + #include <stdint.h>
> > > > + #include <assert.h>
> > > > ++#include <time.h>
> > > > + 
> > > > + #define NSEC_PER_SEC 1000000000
> > > > + 
> > > > diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-
> > > > for-
> > > > subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-
> > > > pitch-
> > > > correctly-for-subsampled-textures.patch
> > > > new file mode 100644
> > > > index 0000000000..69284a9616
> > > > --- /dev/null
> > > > +++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-
> > > > subsampled-textures.patch
> > > > @@ -0,0 +1,55 @@
> > > > +Multi-plane sub-sampled textures have partial width/height, e.g.
> > > > +YUV420/I420 has a full-size Y plane, followed by a half-width/height U
> > > > +plane, and a half-width/height V plane.
> > > > +
> > > > +zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
> > > > +plane, but for wl_shm this must be inferred. gl-renderer was correctly
> > > > +accounting for the width and height when subsampling, but the pitch was
> > > > +being taken as the pitch for the first plane.
> > > > +
> > > > +This does not match the requirements for GStreamer's waylandsink, in
> > > > +particular, as well as other clients. Fix the SHM upload path to
> > > > +correctly set the pitch for each plane, according to subsampling.
> > > > +
> > > > +Tested with:
> > > > +  $ gst-launch-1.0 videotestsrc ! waylandsink
> > > > +
> > > > +Upstream-status: Backport [https://patchwork.freedesktop.org/patch/180767/]
> > > > +
> > > > +Signed-off-by: Daniel Stone <daniels@collabora.com>
> > > > +Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
> > > > +Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > > > +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
> > > > +
> > > > +---
> > > > + libweston/gl-renderer.c | 4 ++--
> > > > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > +
> > > > +diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> > > > +index 244ce309..40bf0bb6 100644
> > > > +--- a/libweston/gl-renderer.c
> > > > ++++ b/libweston/gl-renderer.c
> > > > +@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > > > + 		goto done;
> > > > + 	}
> > > > + 
> > > > +-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
> > > > +-
> > > > + 	if (gs->needs_full_upload) {
> > > > + 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
> > > > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
> > > > + 		wl_shm_buffer_begin_access(buffer->shm_buffer);
> > > > + 		for (j = 0; j < gs->num_textures; j++) {
> > > > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > > > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > > > + 			glTexImage2D(GL_TEXTURE_2D, 0,
> > > > + 				     gs->gl_format[j],
> > > > + 				     gs->pitch / gs->hsub[j],
> > > > +@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > > > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
> > > > + 		for (j = 0; j < gs->num_textures; j++) {
> > > > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > > > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > > > + 			glTexSubImage2D(GL_TEXTURE_2D, 0,
> > > > + 					r.x1 / gs->hsub[j],
> > > > + 					r.y1 / gs->vsub[j],
> > > > diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-
> > > > graphics/wayland/weston_3.0.0.bb
> > > > similarity index 89%
> > > > rename from meta/recipes-graphics/wayland/weston_2.0.0.bb
> > > > rename to meta/recipes-graphics/wayland/weston_3.0.0.bb
> > > > index 8160f5556d..ad0cdc2b0f 100644
> > > > --- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
> > > > +++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
> > > > @@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
> > > >             file://weston.png \
> > > >             file://weston.desktop \
> > > >             file://0001-make-error-portable.patch \
> > > > -           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
> > > >             file://xwayland.weston-start \
> > > >             file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
> > > > +	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
> > > > +	   file://fix-missing-header.patch \
> > > >  "
> > > > -SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
> > > > -SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
> > > > +SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
> > > > +SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
> > > >  
> > > >  inherit autotools pkgconfig useradd distro_features_check
> > > >  # depends on virtual/egl
> > > > @@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
> > > >  
> > > >  do_install_append() {
> > > >  	# Weston doesn't need the .la files to load modules, so wipe them
> > > > -	rm -f ${D}/${libdir}/libweston-2/*.la
> > > > +	rm -f ${D}/${libdir}/libweston-3/*.la
> > > >  
> > > >  	# If X11, ship a desktop file to launch it
> > > >  	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
> > > > @@ -93,16 +94,16 @@ do_install_append() {
> > > >  }
> > > >  
> > > >  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
> > > > -             libweston-2 ${PN}-examples"
> > > > +             libweston-3 ${PN}-examples"
> > > >  
> > > >  FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info
> > > > ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so
> > > > ${datadir}"
> > > >  
> > > > -FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
> > > > -SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
> > > > +FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
> > > > +SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
> > > >  
> > > >  FILES_${PN}-examples = "${bindir}/*"
> > > >  
> > > > -FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
> > > > +FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
> > > >  RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
> > > >  
> > > >  RDEPENDS_${PN} += "xkeyboard-config"
> > > > -- 
> > > > 2.11.0
> > > > 
> > > > -- 
> > > > _______________________________________________
> > > > Openembedded-core mailing list
> > > > Openembedded-core@lists.openembedded.org
> > > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> > 
> > -- 
> > Fabien
> > 
-- 
Fabien


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v6 3/3] weston: Bump version to 3.0.0
  2017-11-01 14:08         ` Fabien Lahoudere
@ 2017-11-01 17:01           ` Denys Dmytriyenko
  0 siblings, 0 replies; 9+ messages in thread
From: Denys Dmytriyenko @ 2017-11-01 17:01 UTC (permalink / raw)
  To: Fabien Lahoudere; +Cc: openembedded-core

On Wed, Nov 01, 2017 at 03:08:10PM +0100, Fabien Lahoudere wrote:
> On Tue, 2017-10-31 at 15:29 -0400, Denys Dmytriyenko wrote:
> > On Mon, Oct 30, 2017 at 02:30:08PM +0100, Fabien Lahoudere wrote:
> > > On Tue, 2017-10-17 at 15:00 -0400, Denys Dmytriyenko wrote:
> > > > I don't believe we reached an agreement on the pitch patch belonging here...
> > > > 
> > > 
> > > This patch fixes a display issue and also possible random crash because how
> > > the buffer is accessed is not consistent.
> > 
> > Hmm, if it could potentially result in a crash of weston, this changes things. 
> > We should include the patch, but may need to mention it in the changelog... 
> > Maybe you need to add this - "fix display issue with YUV420/I420 format, that 
> > could result in a crash"?
> > 
> 
> Ok I will add this message.
> You want me to add it in the weston patch commit message or in the oe-core patch?

Thanks. I don't think you should modify the existing weston patch, even if it 
doesn't mention about the crash in the commit message. Probably clarifying 
this in the OE patch should be enough...


> > > If you think the patch is not useful, I can remove it in v7?
> > > 
> > > Thanks
> > > 
> > > Fabien
> > > 
> > > > 
> > > > On Tue, Oct 17, 2017 at 07:38:07PM +0200, Fabien Lahoudere wrote:
> > > > > Update weston release to 3.0.0.
> > > > > Two patches added:
> > > > > - fix-missing-header.patch:
> > > > >         fix a build issue when musl is used as libc.
> > > > > - weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch:
> > > > >         fix display issue with YUV420/I420 format.
> > > > > 
> > > > > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > > > > ---
> > > > >  .../wayland/weston/fix-missing-header.patch        | 30 ++++++++++++
> > > > >  ...t-pitch-correctly-for-subsampled-textures.patch | 55 ++++++++++++++++++++++
> > > > >  .../wayland/{weston_2.0.0.bb => weston_3.0.0.bb}   | 17 +++----
> > > > >  3 files changed, 94 insertions(+), 8 deletions(-)
> > > > >  create mode 100644 meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > > > >  create mode 100644 meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-
> > > > > correctly-
> > > > > for-subsampled-textures.patch
> > > > >  rename meta/recipes-graphics/wayland/{weston_2.0.0.bb => weston_3.0.0.bb} (89%)
> > > > > 
> > > > > diff --git a/meta/recipes-graphics/wayland/weston/fix-missing-header.patch b/meta/recipes-
> > > > > graphics/wayland/weston/fix-missing-header.patch
> > > > > new file mode 100644
> > > > > index 0000000000..55c0d4fd0f
> > > > > --- /dev/null
> > > > > +++ b/meta/recipes-graphics/wayland/weston/fix-missing-header.patch
> > > > > @@ -0,0 +1,30 @@
> > > > > +On the musl C library, tests/timespec-text.c does not build, with the
> > > > > +following error:
> > > > > +
> > > > > +    In file included from tests/timespec-test.c:36:0:
> > > > > +    ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared
> > > > > +    inside parameter list will not be visible outside of this definition
> > > > > +    or declaration
> > > > > +     timespec_sub(struct timespec *r,
> > > > > +                         ^~~~~~~~
> > > > > +   [...]
> > > > > +
> > > > > +Indeed, struct timespec is defined in time.h, so we must include it.
> > > > > +
> > > > > +Upstream-Status: Backport [fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb]
> > > > > +
> > > > > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > > > > +Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> > > > > +
> > > > > +Index: weston-3.0.0/shared/timespec-util.h
> > > > > +===================================================================
> > > > > +--- weston-3.0.0.orig/shared/timespec-util.h
> > > > > ++++ weston-3.0.0/shared/timespec-util.h
> > > > > +@@ -28,6 +28,7 @@
> > > > > + 
> > > > > + #include <stdint.h>
> > > > > + #include <assert.h>
> > > > > ++#include <time.h>
> > > > > + 
> > > > > + #define NSEC_PER_SEC 1000000000
> > > > > + 
> > > > > diff --git a/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-
> > > > > for-
> > > > > subsampled-textures.patch b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-
> > > > > pitch-
> > > > > correctly-for-subsampled-textures.patch
> > > > > new file mode 100644
> > > > > index 0000000000..69284a9616
> > > > > --- /dev/null
> > > > > +++ b/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-
> > > > > subsampled-textures.patch
> > > > > @@ -0,0 +1,55 @@
> > > > > +Multi-plane sub-sampled textures have partial width/height, e.g.
> > > > > +YUV420/I420 has a full-size Y plane, followed by a half-width/height U
> > > > > +plane, and a half-width/height V plane.
> > > > > +
> > > > > +zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
> > > > > +plane, but for wl_shm this must be inferred. gl-renderer was correctly
> > > > > +accounting for the width and height when subsampling, but the pitch was
> > > > > +being taken as the pitch for the first plane.
> > > > > +
> > > > > +This does not match the requirements for GStreamer's waylandsink, in
> > > > > +particular, as well as other clients. Fix the SHM upload path to
> > > > > +correctly set the pitch for each plane, according to subsampling.
> > > > > +
> > > > > +Tested with:
> > > > > +  $ gst-launch-1.0 videotestsrc ! waylandsink
> > > > > +
> > > > > +Upstream-status: Backport [https://patchwork.freedesktop.org/patch/180767/]
> > > > > +
> > > > > +Signed-off-by: Daniel Stone <daniels@collabora.com>
> > > > > +Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
> > > > > +Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> > > > > +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
> > > > > +
> > > > > +---
> > > > > + libweston/gl-renderer.c | 4 ++--
> > > > > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > +
> > > > > +diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> > > > > +index 244ce309..40bf0bb6 100644
> > > > > +--- a/libweston/gl-renderer.c
> > > > > ++++ b/libweston/gl-renderer.c
> > > > > +@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > > > > + 		goto done;
> > > > > + 	}
> > > > > + 
> > > > > +-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
> > > > > +-
> > > > > + 	if (gs->needs_full_upload) {
> > > > > + 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
> > > > > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
> > > > > + 		wl_shm_buffer_begin_access(buffer->shm_buffer);
> > > > > + 		for (j = 0; j < gs->num_textures; j++) {
> > > > > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > > > > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > > > > + 			glTexImage2D(GL_TEXTURE_2D, 0,
> > > > > + 				     gs->gl_format[j],
> > > > > + 				     gs->pitch / gs->hsub[j],
> > > > > +@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> > > > > + 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
> > > > > + 		for (j = 0; j < gs->num_textures; j++) {
> > > > > + 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> > > > > ++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
> > > > > + 			glTexSubImage2D(GL_TEXTURE_2D, 0,
> > > > > + 					r.x1 / gs->hsub[j],
> > > > > + 					r.y1 / gs->vsub[j],
> > > > > diff --git a/meta/recipes-graphics/wayland/weston_2.0.0.bb b/meta/recipes-
> > > > > graphics/wayland/weston_3.0.0.bb
> > > > > similarity index 89%
> > > > > rename from meta/recipes-graphics/wayland/weston_2.0.0.bb
> > > > > rename to meta/recipes-graphics/wayland/weston_3.0.0.bb
> > > > > index 8160f5556d..ad0cdc2b0f 100644
> > > > > --- a/meta/recipes-graphics/wayland/weston_2.0.0.bb
> > > > > +++ b/meta/recipes-graphics/wayland/weston_3.0.0.bb
> > > > > @@ -9,12 +9,13 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
> > > > >             file://weston.png \
> > > > >             file://weston.desktop \
> > > > >             file://0001-make-error-portable.patch \
> > > > > -           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
> > > > >             file://xwayland.weston-start \
> > > > >             file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
> > > > > +	   file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
> > > > > +	   file://fix-missing-header.patch \
> > > > >  "
> > > > > -SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
> > > > > -SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
> > > > > +SRC_URI[md5sum] = "9c42a4c51a1b9f35d040fa9d45ada36d"
> > > > > +SRC_URI[sha256sum] = "cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5"
> > > > >  
> > > > >  inherit autotools pkgconfig useradd distro_features_check
> > > > >  # depends on virtual/egl
> > > > > @@ -76,7 +77,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
> > > > >  
> > > > >  do_install_append() {
> > > > >  	# Weston doesn't need the .la files to load modules, so wipe them
> > > > > -	rm -f ${D}/${libdir}/libweston-2/*.la
> > > > > +	rm -f ${D}/${libdir}/libweston-3/*.la
> > > > >  
> > > > >  	# If X11, ship a desktop file to launch it
> > > > >  	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
> > > > > @@ -93,16 +94,16 @@ do_install_append() {
> > > > >  }
> > > > >  
> > > > >  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
> > > > > -             libweston-2 ${PN}-examples"
> > > > > +             libweston-3 ${PN}-examples"
> > > > >  
> > > > >  FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info
> > > > > ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so
> > > > > ${datadir}"
> > > > >  
> > > > > -FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
> > > > > -SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
> > > > > +FILES_libweston-3 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-3/*.so"
> > > > > +SUMMARY_libweston-3 = "Helper library for implementing 'wayland window managers'."
> > > > >  
> > > > >  FILES_${PN}-examples = "${bindir}/*"
> > > > >  
> > > > > -FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
> > > > > +FILES_${PN}-xwayland = "${libdir}/libweston-3/xwayland.so"
> > > > >  RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
> > > > >  
> > > > >  RDEPENDS_${PN} += "xkeyboard-config"
> > > > > -- 
> > > > > 2.11.0
> > > > > 
> > > > > -- 
> > > > > _______________________________________________
> > > > > Openembedded-core mailing list
> > > > > Openembedded-core@lists.openembedded.org
> > > > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> > > 
> > > -- 
> > > Fabien
> > > 
> -- 
> Fabien
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-01 17:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 17:38 [PATCH v6 1/3] wayland : Bump to version 1.14.0 Fabien Lahoudere
2017-10-17 17:38 ` [PATCH v6 2/3] wayland: Fix installation patch issue Fabien Lahoudere
2017-10-17 17:38 ` [PATCH v6 3/3] weston: Bump version to 3.0.0 Fabien Lahoudere
2017-10-17 19:00   ` Denys Dmytriyenko
2017-10-30 13:30     ` Fabien Lahoudere
2017-10-31 19:29       ` Denys Dmytriyenko
2017-11-01 14:08         ` Fabien Lahoudere
2017-11-01 17:01           ` Denys Dmytriyenko
2017-10-17 18:00 ` ✗ patchtest: failure for "[v6] wayland : Bump to version..." and 2 more Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.