From f17f79df5402e887a739b3413d842e7595168b0f Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 10 Nov 2019 04:09:43 -0300 Subject: main/libva-intel-driver: fix usage with wayland --- main/libva-intel-driver/APKBUILD | 9 +++-- main/libva-intel-driver/wayland.patch | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 main/libva-intel-driver/wayland.patch diff --git a/main/libva-intel-driver/APKBUILD b/main/libva-intel-driver/APKBUILD index 6713d770a1..fd196ea6b0 100644 --- a/main/libva-intel-driver/APKBUILD +++ b/main/libva-intel-driver/APKBUILD @@ -2,14 +2,16 @@ # Maintainer: Natanael Copa pkgname=libva-intel-driver pkgver=2.3.0 -pkgrel=0 +pkgrel=1 pkgdesc="VA-API implementation for Intel GMA chipsets and Intel HD Graphics" url="https://freedesktop.org/wiki/Software/vaapi" arch="x86 x86_64" license="MIT" makedepends="libdrm-dev libva-dev wayland-dev meson" install_if="libva xf86-video-intel" -source="${pkgname}-${pkgver}.tar.gz::https://github.com/intel/intel-vaapi-driver/archive/${pkgver}.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/intel/intel-vaapi-driver/archive/$pkgver.tar.gz + wayland.patch + " builddir="$srcdir"/intel-vaapi-driver-$pkgver @@ -32,4 +34,5 @@ package() { DESTDIR="$pkgdir" ninja -C builddir install } -sha512sums="98cb6e6bdc22eefa0c7f245d3a2f1fc586d5066e9273c9031e76c30d96fc5902859119ddd4ef2ba39cd044aff57edae3a90ab2e5478c47e118132f8b2c28f1dc libva-intel-driver-2.3.0.tar.gz" +sha512sums="98cb6e6bdc22eefa0c7f245d3a2f1fc586d5066e9273c9031e76c30d96fc5902859119ddd4ef2ba39cd044aff57edae3a90ab2e5478c47e118132f8b2c28f1dc libva-intel-driver-2.3.0.tar.gz +dd5ac03413f8c2daca4a2c4a11ba5b74eecf5051a487ede7afba4b71feb9001aac8f0b47d65dc0c436e8222b34daa3ed8144dfa550cfd4f18f2b3c34f885cdec wayland.patch" diff --git a/main/libva-intel-driver/wayland.patch b/main/libva-intel-driver/wayland.patch new file mode 100644 index 0000000000..9ae565e054 --- /dev/null +++ b/main/libva-intel-driver/wayland.patch @@ -0,0 +1,66 @@ +From 0abb7a1c938437000bfca1a9b3706884467c681e Mon Sep 17 00:00:00 2001 +From: Haihao Xiang +Date: Fri, 7 Dec 2018 13:31:43 +0800 +Subject: [PATCH] Check the interface from libva first + +This fixes https://github.com/intel/intel-vaapi-driver/issues/419 + +Signed-off-by: Haihao Xiang +--- + 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 122db953..a637552e 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; + -- cgit v1.2.3