* [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use
@ 2019-01-12 13:22 james.hilliard1 at gmail.com
2019-01-12 13:22 ` [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 james.hilliard1 at gmail.com
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: james.hilliard1 at gmail.com @ 2019-01-12 13:22 UTC (permalink / raw)
To: buildroot
From: James Hilliard <james.hilliard1@gmail.com>
This is needed by libva-intel-driver when using wayland.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
...-to-struct-wl_interface-for-driver-to-use.patch | 73 ++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 package/libva/0001-Add-pointer-to-struct-wl_interface-for-driver-to-use.patch
diff --git a/package/libva/0001-Add-pointer-to-struct-wl_interface-for-driver-to-use.patch b/package/libva/0001-Add-pointer-to-struct-wl_interface-for-driver-to-use.patch
new file mode 100644
index 0000000..21f419b
--- /dev/null
+++ b/package/libva/0001-Add-pointer-to-struct-wl_interface-for-driver-to-use.patch
@@ -0,0 +1,73 @@
+From 62bad1239d8ea1bb269ca69d3469aa267f57cdec Mon Sep 17 00:00:00 2001
+From: Haihao Xiang <haihao.xiang@intel.com>
+Date: Fri, 7 Dec 2018 13:25:41 +0800
+Subject: [PATCH 1/1] Add pointer to struct wl_interface for driver to use
+
+See https://github.com/intel/intel-vaapi-driver/issues/419 for the
+information
+
+Note: don't export the interface symbol in case others may reuse it.
+
+Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
+[james.hilliard1 at gmail.com: backport from upstream commit
+62bad1239d8ea1bb269ca69d3469aa267f57cdec]
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+---
+ va/wayland/va_backend_wayland.h | 10 +++++++++-
+ va/wayland/va_wayland_drm.c | 4 ++++
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/va/wayland/va_backend_wayland.h b/va/wayland/va_backend_wayland.h
+index 9e5740a..906d4bf 100644
+--- a/va/wayland/va_backend_wayland.h
++++ b/va/wayland/va_backend_wayland.h
+@@ -64,8 +64,16 @@ struct VADriverVTableWayland {
+ /** \brief Indicate whether buffer sharing with prime fd is supported. */
+ unsigned int has_prime_sharing;
+
++ /**
++ * Pointer to an implementation of struct wl_interface
++ *
++ * It is set by libva-wayland when a context is created, then the backend
++ * driver may reuse it.
++ */
++ const void *wl_interface;
++
+ /** \brief Reserved bytes for future use, must be zero */
+- unsigned long reserved[8];
++ unsigned long reserved[7];
+ };
+
+ #endif /* VA_BACKEND_WAYLAND_H */
+diff --git a/va/wayland/va_wayland_drm.c b/va/wayland/va_wayland_drm.c
+index 8e22695..4cd3f6c 100644
+--- a/va/wayland/va_wayland_drm.c
++++ b/va/wayland/va_wayland_drm.c
+@@ -136,6 +136,7 @@ va_wayland_drm_destroy(VADisplayContextP pDisplayContext)
+ struct VADriverVTableWayland *vtable = ctx->vtable_wayland;
+
+ vtable->has_prime_sharing = 0;
++ vtable->wl_interface = NULL;
+
+ wl_drm_ctx->is_authenticated = 0;
+
+@@ -222,6 +223,8 @@ va_wayland_drm_create(VADisplayContextP pDisplayContext)
+ struct VADriverVTableWayland *vtable = ctx->vtable_wayland;
+ struct wl_display *wrapped_display = NULL;
+
++ vtable->wl_interface = NULL;
++
+ wl_drm_ctx = malloc(sizeof(*wl_drm_ctx));
+ if (!wl_drm_ctx) {
+ va_wayland_error("could not allocate wl_drm_ctx");
+@@ -300,6 +303,7 @@ va_wayland_drm_create(VADisplayContextP pDisplayContext)
+ goto end;
+ }
+
++ vtable->wl_interface = &wl_drm_interface;
+ result = true;
+
+ end:
+--
+2.7.4
+
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 2019-01-12 13:22 [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use james.hilliard1 at gmail.com @ 2019-01-12 13:22 ` james.hilliard1 at gmail.com 2019-01-16 20:07 ` Peter Korsgaard 2019-01-12 13:22 ` [Buildroot] [PATCH 3/3] package/libva-utils: " james.hilliard1 at gmail.com 2019-01-16 20:07 ` [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use Peter Korsgaard 2 siblings, 1 reply; 6+ messages in thread From: james.hilliard1 at gmail.com @ 2019-01-12 13:22 UTC (permalink / raw) To: buildroot From: James Hilliard <james.hilliard1@gmail.com> Remove patch to fix build without stack-protector support which is upstream. Add backported patch to fix libva-intel-driver when using wayland. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- ...0001-Check-the-interface-from-libva-first.patch | 71 ++++++++++++++++++++++ package/libva-intel-driver/0001-check-ssp.patch | 65 -------------------- package/libva-intel-driver/libva-intel-driver.hash | 4 +- package/libva-intel-driver/libva-intel-driver.mk | 4 +- 4 files changed, 74 insertions(+), 70 deletions(-) create mode 100644 package/libva-intel-driver/0001-Check-the-interface-from-libva-first.patch delete mode 100644 package/libva-intel-driver/0001-check-ssp.patch diff --git a/package/libva-intel-driver/0001-Check-the-interface-from-libva-first.patch b/package/libva-intel-driver/0001-Check-the-interface-from-libva-first.patch new file mode 100644 index 0000000..81591fb --- /dev/null +++ b/package/libva-intel-driver/0001-Check-the-interface-from-libva-first.patch @@ -0,0 +1,71 @@ +From 3db0c4838fe30fcee5beb8b31ca67d5cf7d77fb3 Mon Sep 17 00:00:00 2001 +From: Haihao Xiang <haihao.xiang@intel.com> +Date: Fri, 7 Dec 2018 13:31:43 +0800 +Subject: [PATCH 1/1] Check the interface from libva first + +This fixes https://github.com/intel/intel-vaapi-driver/issues/419 + +Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> +[james.hilliard1 at gmail.com: backport from upstream commit +f139dafa59172d40543f2ec469a035d3de9fdc6a] +Signed-off-by: James Hilliard <james.hilliard1@gmail.com> +--- + src/i965_output_wayland.c | 27 ++++++++++++++++----------- + 1 file changed, 16 insertions(+), 11 deletions(-) + +diff --git a/src/i965_output_wayland.c b/src/i965_output_wayland.c +index 122db95..a637552 100644 +--- a/src/i965_output_wayland.c ++++ b/src/i965_output_wayland.c +@@ -397,6 +397,7 @@ i965_output_wayland_init(VADriverContextP ctx) + struct i965_driver_data * const i965 = i965_driver_data(ctx); + struct dso_handle *dso_handle; + struct wl_vtable *wl_vtable; ++ struct VADriverVTableWayland * const vtable = ctx->vtable_wayland; + + static const struct dso_symbol libegl_symbols[] = { + { +@@ -465,25 +466,29 @@ i965_output_wayland_init(VADriverContextP ctx) + if (!i965->wl_output) + goto error; + +- i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME); +- if (!i965->wl_output->libegl_handle) { +- i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK); +- if (!i965->wl_output->libegl_handle) ++ wl_vtable = &i965->wl_output->vtable; ++ ++ if (vtable->wl_interface) ++ wl_vtable->drm_interface = vtable->wl_interface; ++ else { ++ i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME); ++ if (!i965->wl_output->libegl_handle) { ++ i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK); ++ if (!i965->wl_output->libegl_handle) ++ goto error; ++ } ++ ++ dso_handle = i965->wl_output->libegl_handle; ++ if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), ++ libegl_symbols)) + goto error; + } + +- dso_handle = i965->wl_output->libegl_handle; +- wl_vtable = &i965->wl_output->vtable; +- if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), +- libegl_symbols)) +- goto error; +- + i965->wl_output->libwl_client_handle = dso_open(LIBWAYLAND_CLIENT_NAME); + if (!i965->wl_output->libwl_client_handle) + goto error; + + dso_handle = i965->wl_output->libwl_client_handle; +- wl_vtable = &i965->wl_output->vtable; + if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), + libwl_client_symbols)) + goto error; +-- +2.7.4 + diff --git a/package/libva-intel-driver/0001-check-ssp.patch b/package/libva-intel-driver/0001-check-ssp.patch deleted file mode 100644 index c801ed3..0000000 --- a/package/libva-intel-driver/0001-check-ssp.patch +++ /dev/null @@ -1,65 +0,0 @@ -From bf08643583520b763150af9ed20166b7fe272fd5 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls <bernd.kuhls@t-online.de> -Date: Sun, 29 Jul 2018 20:55:23 +0200 -Subject: [PATCH] Check for -fstack-protector - -Not all toolchains provide support for -fstack-protector. This patch -provides a configure check to avoid build errors like - -/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared -/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp - -Patch sent upstream as PR 408. - -Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> ---- - configure.ac | 17 +++++++++++++++++ - src/Makefile.am | 5 ++++- - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index c76060c7..5471aee7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -86,6 +86,23 @@ AC_SEARCH_LIBS([dlopen], [dl], [], [ - AC_MSG_ERROR([unable to find the dlopen() function]) - ]) - -+ -+# Check for -fstack-protector -+ssp_cc=yes -+if test "X$CC-cc" != "X"; then -+ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector]) -+ ssp_old_cflags="$CFLAGS" -+ CFLAGS="$CFLAGS -fstack-protector" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no]) -+ AC_MSG_RESULT([$ssp_cc]) -+ if test "X$ssp_cc" = "Xno"; then -+ CFLAGS="$ssp_old_cflags" -+ else -+ AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) -+ fi -+fi -+AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes") -+ - dnl Check for recent enough DRM - LIBDRM_VERSION=libdrm_version - PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION libdrm_intel]) -diff --git a/src/Makefile.am b/src/Makefile.am -index c26293dd..5c52658a 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -35,9 +35,12 @@ AM_CPPFLAGS = \ - driver_cflags = \ - -Wall \ - -fvisibility=hidden \ -- -fstack-protector \ - $(NULL) - -+if USE_SSP -+driver_cflags += -fstack-protector -+endif -+ - driver_ldflags = \ - -avoid-version \ - -no-undefined \ diff --git a/package/libva-intel-driver/libva-intel-driver.hash b/package/libva-intel-driver/libva-intel-driver.hash index 0509ff8..8c01271 100644 --- a/package/libva-intel-driver/libva-intel-driver.hash +++ b/package/libva-intel-driver/libva-intel-driver.hash @@ -1,5 +1,5 @@ # From https://github.com/intel/intel-vaapi-driver/releases -sha1 0934f97ddcaf4e633f59d049226723239b645b33 intel-vaapi-driver-2.2.0.tar.bz2 +sha1 89096f99da753ac5858304e6c17f5dd9e7581d5b intel-vaapi-driver-2.3.0.tar.bz2 # Locally computed -sha256 e8a5f54694eb76aad42653b591030b8a53b1513144c09a80defb3d8d8c875c18 intel-vaapi-driver-2.2.0.tar.bz2 +sha256 5c2e5deab024a0a6ae81dfe77ef455542a88d824eda7bfd07684337407ecdfe3 intel-vaapi-driver-2.3.0.tar.bz2 sha256 c86a782ee845b52472dae9b9d79fb915d333628ac0efe49cdce63644814931de COPYING diff --git a/package/libva-intel-driver/libva-intel-driver.mk b/package/libva-intel-driver/libva-intel-driver.mk index 48564ca..76cdfee 100644 --- a/package/libva-intel-driver/libva-intel-driver.mk +++ b/package/libva-intel-driver/libva-intel-driver.mk @@ -4,14 +4,12 @@ # ################################################################################ -LIBVA_INTEL_DRIVER_VERSION = 2.2.0 +LIBVA_INTEL_DRIVER_VERSION = 2.3.0 LIBVA_INTEL_DRIVER_SOURCE = intel-vaapi-driver-$(LIBVA_INTEL_DRIVER_VERSION).tar.bz2 LIBVA_INTEL_DRIVER_SITE = \ https://github.com/intel/intel-vaapi-driver/releases/download/$(LIBVA_INTEL_DRIVER_VERSION) LIBVA_INTEL_DRIVER_LICENSE = MIT LIBVA_INTEL_DRIVER_LICENSE_FILES = COPYING -# 0001-check-ssp.patch -LIBVA_INTEL_DRIVER_AUTORECONF = YES LIBVA_INTEL_DRIVER_DEPENDENCIES = host-pkgconf libdrm libva ifeq ($(BR2_PACKAGE_XORG7),y) -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 2019-01-12 13:22 ` [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 james.hilliard1 at gmail.com @ 2019-01-16 20:07 ` Peter Korsgaard 0 siblings, 0 replies; 6+ messages in thread From: Peter Korsgaard @ 2019-01-16 20:07 UTC (permalink / raw) To: buildroot >>>>> "james" == james hilliard1 <james.hilliard1@gmail.com> writes: > From: James Hilliard <james.hilliard1@gmail.com> > Remove patch to fix build without stack-protector support which is upstream. > Add backported patch to fix libva-intel-driver when using wayland. > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] package/libva-utils: bump to version 2.3.0 2019-01-12 13:22 [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use james.hilliard1 at gmail.com 2019-01-12 13:22 ` [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 james.hilliard1 at gmail.com @ 2019-01-12 13:22 ` james.hilliard1 at gmail.com 2019-01-16 20:09 ` Peter Korsgaard 2019-01-16 20:07 ` [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use Peter Korsgaard 2 siblings, 1 reply; 6+ messages in thread From: james.hilliard1 at gmail.com @ 2019-01-12 13:22 UTC (permalink / raw) To: buildroot From: James Hilliard <james.hilliard1@gmail.com> Have to add a workaround since upstream didn't package this release properly. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- package/libva-utils/libva-utils.hash | 4 ++-- package/libva-utils/libva-utils.mk | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package/libva-utils/libva-utils.hash b/package/libva-utils/libva-utils.hash index e86cb6e..1c2dc5d 100644 --- a/package/libva-utils/libva-utils.hash +++ b/package/libva-utils/libva-utils.hash @@ -1,5 +1,5 @@ # From https://github.com/intel/libva-utils/releases -sha1 ef15d40d6bec847c74f21ee3431b7e7b06fec3b4 libva-utils-2.2.0.tar.bz2 +sha1 91e470d0755ec7a102a4e4ce694190e5e95b9c7f libva-utils-2.3.0.tar.gz # Locally computed -sha256 ed7a6ed1fab657df4e83ea11f90310efcf31c27828f32d65351a28ca3c404dc0 libva-utils-2.2.0.tar.bz2 +sha256 f338497b867bbc9bf008e4892eaebda08955785dc7eb2005855bba5f1a20b037 libva-utils-2.3.0.tar.gz sha256 c6220c9f87832c27abcb8a32eafdd2823e13ce146b3ea63d5deae2a76798ef50 COPYING diff --git a/package/libva-utils/libva-utils.mk b/package/libva-utils/libva-utils.mk index 348d419..f08ffeb 100644 --- a/package/libva-utils/libva-utils.mk +++ b/package/libva-utils/libva-utils.mk @@ -4,13 +4,19 @@ # ################################################################################ -LIBVA_UTILS_VERSION = 2.2.0 -LIBVA_UTILS_SOURCE = libva-utils-$(LIBVA_UTILS_VERSION).tar.bz2 -LIBVA_UTILS_SITE = https://github.com/intel/libva-utils/releases/download/$(LIBVA_UTILS_VERSION) +LIBVA_UTILS_VERSION = 2.3.0 +LIBVA_UTILS_SOURCE = libva-utils-$(LIBVA_UTILS_VERSION).tar.gz +LIBVA_UTILS_SITE = https://github.com/intel/libva-utils/archive/$(LIBVA_UTILS_VERSION) LIBVA_UTILS_LICENSE = MIT LIBVA_UTILS_LICENSE_FILES = COPYING # 0001-check-ssp.patch LIBVA_UTILS_AUTORECONF = YES LIBVA_UTILS_DEPENDENCIES = host-pkgconf libva +define LIBVA_UTILS_CREATE_M4_DIR + @mkdir -p $(@D)/m4 +endef + +LIBVA_UTILS_POST_EXTRACT_HOOKS += LIBVA_UTILS_CREATE_M4_DIR + $(eval $(autotools-package)) -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] package/libva-utils: bump to version 2.3.0 2019-01-12 13:22 ` [Buildroot] [PATCH 3/3] package/libva-utils: " james.hilliard1 at gmail.com @ 2019-01-16 20:09 ` Peter Korsgaard 0 siblings, 0 replies; 6+ messages in thread From: Peter Korsgaard @ 2019-01-16 20:09 UTC (permalink / raw) To: buildroot >>>>> "james" == james hilliard1 <james.hilliard1@gmail.com> writes: > From: James Hilliard <james.hilliard1@gmail.com> > Have to add a workaround since upstream didn't package this release properly. > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use 2019-01-12 13:22 [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use james.hilliard1 at gmail.com 2019-01-12 13:22 ` [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 james.hilliard1 at gmail.com 2019-01-12 13:22 ` [Buildroot] [PATCH 3/3] package/libva-utils: " james.hilliard1 at gmail.com @ 2019-01-16 20:07 ` Peter Korsgaard 2 siblings, 0 replies; 6+ messages in thread From: Peter Korsgaard @ 2019-01-16 20:07 UTC (permalink / raw) To: buildroot >>>>> "james" == james hilliard1 <james.hilliard1@gmail.com> writes: > From: James Hilliard <james.hilliard1@gmail.com> > This is needed by libva-intel-driver when using wayland. > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Committed after fixing the check-package warning, thanks: package/libva/0001-Add-pointer-to-struct-wl_interface-for-driver-to-use.patch:4: generate your patches with 'git format-patch -N' -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-16 20:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-12 13:22 [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use james.hilliard1 at gmail.com 2019-01-12 13:22 ` [Buildroot] [PATCH 2/3] package/libva-intel-driver: bump to version 2.3.0 james.hilliard1 at gmail.com 2019-01-16 20:07 ` Peter Korsgaard 2019-01-12 13:22 ` [Buildroot] [PATCH 3/3] package/libva-utils: " james.hilliard1 at gmail.com 2019-01-16 20:09 ` Peter Korsgaard 2019-01-16 20:07 ` [Buildroot] [PATCH 1/3] package/libva: backport Add pointer to struct wl_interface for driver to use Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox