commit 321d8fd1bf3290f7525c2f86961b1fcd0f1cc7c1
Author: Dominik 'Rathann' Mierzejewski <dominik(a)greysector.net>
Date: Tue Oct 1 22:43:43 2024 +0200
Add pull requests 514 and 566.
Fixes glitches and makes the deprecated wl_drm Wayland protocol optional.
Based on PR by Robert Mader:
https://github.com/rpmfusion/libva-intel-driver/pull/3
514.patch | 41 +++++++++++++++++++++++++++++++++++++++++
566.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
libva-intel-driver.spec | 4 ++++
3 files changed, 91 insertions(+)
---
diff --git a/514.patch b/514.patch
new file mode 100644
index 0000000..f63e32a
--- /dev/null
+++ b/514.patch
@@ -0,0 +1,41 @@
+From 3aa8fbe690e33e2026002f7af713d52faf1bd617 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich(a)pengutronix.de>
+Date: Sun, 5 Jul 2020 19:27:11 +0200
+Subject: [PATCH] fix exporting buffers with 3 planes and
+ VA_EXPORT_SURFACE_SEPARATE_LAYERS
+
+To get the plane offset, y_cb_offset or y_cr_offset must be multiplied with
+the pitch for the 'Y' plane. See for example i965_DeriveImage().
+
+Without this, exporting formats with 3 planes where cb_cr_pitch == width/2
+is broken, because the offset of the third plane is calculated incorrectly.
+---
+ src/i965_drv_video.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
+index ff163887e..2202b8494 100644
+--- a/src/i965_drv_video.c
++++ b/src/i965_drv_video.c
+@@ -6904,16 +6904,17 @@ i965_ExportSurfaceHandle(VADriverContextP ctx, VASurfaceID
surface_id,
+ else
+ y_offset = obj_surface->y_cr_offset;
+ } else {
+- y_offset = obj_surface->y_cr_offset - obj_surface->y_cb_offset;
+- if (y_offset < 0)
+- y_offset = -y_offset;
++ if (obj_surface->y_cb_offset < obj_surface->y_cr_offset)
++ y_offset = obj_surface->y_cr_offset;
++ else
++ y_offset = obj_surface->y_cb_offset;
+ pitch = obj_surface->cb_cr_pitch;
+ height = obj_surface->cb_cr_height;
+ }
+
+ desc->layers[p].offset[0] = offset;
+ desc->layers[p].pitch[0] = pitch;
+- offset += pitch * y_offset;
++ offset = obj_surface->width * y_offset;
+ }
+ }
+
diff --git a/566.patch b/566.patch
new file mode 100644
index 0000000..788dfd2
--- /dev/null
+++ b/566.patch
@@ -0,0 +1,46 @@
+From 4206d0e15363d188f30f2f3dbcc212fef206fc1d Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact(a)emersion.fr>
+Date: Mon, 11 Mar 2024 23:48:17 +0100
+Subject: [PATCH] Make wl_drm optional
+
+Don't error out when vtable->wl_interface is NULL.
+
+Fetching wl_drm_interface from libEGL used to work but doesn't
+anymore: it's now a private symbol (wayland-scanner private-code).
+---
+ src/i965_output_wayland.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+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/libva-intel-driver.spec b/libva-intel-driver.spec
index 3d709ed..499a394 100644
--- a/libva-intel-driver.spec
+++ b/libva-intel-driver.spec
@@ -18,6 +18,8 @@ Source1: intel-vaapi-driver.metainfo.xml
Source9: parse-intel-vaapi-driver.py
Patch0:
https://github.com/digetx/intel-vaapi-driver/commit/d03fd1f86a9aeee0b3344...
Patch1:
https://github.com/intel/intel-vaapi-driver/pull/548.patch
+Patch2:
https://github.com/intel/intel-vaapi-driver/pull/514.patch
+Patch3:
https://github.com/intel/intel-vaapi-driver/pull/566.patch
ExclusiveArch: %{ix86} x86_64
@@ -98,6 +100,8 @@ fn=%{buildroot}%{_datadir}/appdata/intel-vaapi-driver.metainfo.xml
- switched to modern post-release versioning scheme
- use tabs consistently
- drop unnecessary Obsoletes
+- Add pull requests 514, fixing glitches, and 566, making the deprecated wl_drm
+ Wayland protocol optional. (rmader)
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
2.4.1-15.20221130gitab755cb
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild