package/libva: backport Add pointer to struct wl_interface for driver to use
PATCH 1/3 package/libva: backport Add pointer to struct wl_interface for driver to use
From: James Hilliard <[email protected]>
This is needed by libva-intel-driver when using wayland.
--- ...-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
package/libva/0001-Add-pointer-to-struct-wl_interface-for-driver-to-use.patch new file +73 -0
@@ -0,0 +1,73 @@ +From 62bad1239d8ea1bb269ca69d3469aa267f57cdec Mon Sep 17 00:00:00 2001 +From: Haihao Xiang <[email protected]> +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 <[email protected]> +[james.hilliard1 at gmail.com: backport from upstream commit +62bad1239d8ea1bb269ca69d3469aa267f57cdec] +Signed-off-by: James Hilliard <[email protected]> +--- + 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 +
Signature · 1 line
2.7.4
PATCH 2/3 package/libva-intel-driver: bump to version 2.3.0
From: James Hilliard <[email protected]>
Remove patch to fix build without stack-protector support which is upstream. Add backported patch to fix libva-intel-driver when using wayland.
--- ...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
package/libva-intel-driver/0001-Check-the-interface-from-libva-first.patch new file +71 -0
@@ -0,0 +1,71 @@ +From 3db0c4838fe30fcee5beb8b31ca67d5cf7d77fb3 Mon Sep 17 00:00:00 2001 +From: Haihao Xiang <[email protected]> +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 <[email protected]> +[james.hilliard1 at gmail.com: backport from upstream commit +f139dafa59172d40543f2ec469a035d3de9fdc6a] +Signed-off-by: James Hilliard <[email protected]> +--- + 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 +
package/libva-intel-driver/0001-check-ssp.patch deleted +0 -65
65 lines not on this page · raw message
package/libva-intel-driver/libva-intel-driver.hash +2 -2
@@ -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
package/libva-intel-driver/libva-intel-driver.mk +1 -3
@@ -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)
Signature · 1 line
2.7.4
PATCH 2/3 package/libva-intel-driver: bump to version 2.3.0
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"james" == james hilliard1 <[email protected]> writes:
From: James Hilliard <[email protected]>
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 <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/3 package/libva-utils: bump to version 2.3.0
In reply to james.hilliard1 at gmail.comFrom: James Hilliard <[email protected]>
Have to add a workaround since upstream didn't package this release properly.
--- package/libva-utils/libva-utils.hash | 4 ++-- package/libva-utils/libva-utils.mk | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-)
package/libva-utils/libva-utils.hash +2 -2
@@ -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
package/libva-utils/libva-utils.mk +9 -3
@@ -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))
Signature · 1 line
2.7.4
PATCH 3/3 package/libva-utils: bump to version 2.3.0
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"james" == james hilliard1 <[email protected]> writes:
From: James Hilliard <[email protected]>
Have to add a workaround since upstream didn't package this release properly.Signed-off-by James Hilliard <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/3 package/libva: backport Add pointer to struct wl_interface for driver to use
In reply to james.hilliard1 at gmail.comQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"james" == james hilliard1 <[email protected]> writes:
From: James Hilliard <[email protected]> This is needed by libva-intel-driver when using wayland.
Signed-off-by James Hilliard <[email protected]>
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'
Signature · 1 line
Bye, Peter Korsgaard