From 0fe8bb9c5cfe67811c1f599ccb587dc0fe139625 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Sun, 8 Dec 2024 16:44:43 -0600 Subject: [PATCH] intel-vaapi-driver: make call to wl_drm optional per #200 --- extra/intel-vaapi-driver/build | 2 ++ extra/intel-vaapi-driver/checksums | 1 + .../patches/wl_drm-optional.patch | 33 +++++++++++++++++++ extra/intel-vaapi-driver/sources | 1 + 4 files changed, 37 insertions(+) create mode 100644 extra/intel-vaapi-driver/patches/wl_drm-optional.patch diff --git a/extra/intel-vaapi-driver/build b/extra/intel-vaapi-driver/build index b5164b4f..951d3d25 100755 --- a/extra/intel-vaapi-driver/build +++ b/extra/intel-vaapi-driver/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < wl_drm-optional.patch + export DESTDIR="$1" meson setup \ diff --git a/extra/intel-vaapi-driver/checksums b/extra/intel-vaapi-driver/checksums index cb64cc29..9d2c37d9 100644 --- a/extra/intel-vaapi-driver/checksums +++ b/extra/intel-vaapi-driver/checksums @@ -1 +1,2 @@ 0cae7a2d39fe72ec01461d49133e2660d34fe43aaba904b679b1f12664d07a852b +66dbb0a67dede66d0ce91c5456b05ca7655031c43a86ed70c504268462ed2ef300 diff --git a/extra/intel-vaapi-driver/patches/wl_drm-optional.patch b/extra/intel-vaapi-driver/patches/wl_drm-optional.patch new file mode 100644 index 00000000..e2dbe032 --- /dev/null +++ b/extra/intel-vaapi-driver/patches/wl_drm-optional.patch @@ -0,0 +1,33 @@ +diff --git a/src/i965_output_wayland.c b/src/i965_output_wayland.c +index a6120b7b2..a002cae5b 100644 +--- a/src/i965_output_wayland.c ++++ b/src/i965_output_wayland.c +@@ -154,7 +154,7 @@ registry_handle_global( + struct va_wl_output * const wl_output = i965->wl_output; + struct wl_vtable * const wl_vtable = &wl_output->vtable; + +- if (strcmp(interface, "wl_drm") == 0) { ++ if (strcmp(interface, "wl_drm") == 0 && wl_vtable->drm_interface) { + wl_output->wl_drm_name = name; + wl_output->wl_drm = registry_bind(wl_vtable, wl_output->wl_registry, + name, wl_vtable->drm_interface, +@@ -472,6 +472,7 @@ i965_output_wayland_init(VADriverContextP ctx) + + wl_vtable = &i965->wl_output->vtable; + ++ /* drm_interface is optional */ + if (vtable->wl_interface) + wl_vtable->drm_interface = vtable->wl_interface; + else { +@@ -483,9 +484,8 @@ i965_output_wayland_init(VADriverContextP ctx) + } + + dso_handle = i965->wl_output->libegl_handle; +- if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), +- libegl_symbols)) +- goto error; ++ dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), ++ libegl_symbols); + } + + i965->wl_output->libwl_client_handle = dso_open(LIBWAYLAND_CLIENT_NAME); diff --git a/extra/intel-vaapi-driver/sources b/extra/intel-vaapi-driver/sources index edf4829d..5a8d7ed2 100644 --- a/extra/intel-vaapi-driver/sources +++ b/extra/intel-vaapi-driver/sources @@ -1 +1,2 @@ https://github.com/intel/intel-vaapi-driver/archive/2.4.1.tar.gz +patches/wl_drm-optional.patch