git: 6a391a807ce8 - main - multimedia/libva: fix default LIBVA_DRIVER_NAME with nvidia-drm.ko
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 05 Jul 2025 10:32:58 UTC
The branch main has been updated by jbeich:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6a391a807ce892476d15888de7494dc9768829a1
commit 6a391a807ce892476d15888de7494dc9768829a1
Author: Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2025-07-05 10:19:21 +0000
Commit: Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2025-07-05 10:32:41 +0000
multimedia/libva: fix default LIBVA_DRIVER_NAME with nvidia-drm.ko
In order to support both libva-vdpau-driver and libva-nvidia-driver
on NVIDIA GPUs let libva-drm get driver name from kernel DRM driver.
libva-nvidia-driver uses DRI2 instead of DRM, so not affected.
libva info: Trying to open /usr/local/lib/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
Reported by: rhurlin
Regressed by: https://github.com/intel/libva/commit/5dae76daad3f
---
multimedia/libva/Makefile | 1 +
multimedia/libva/files/patch-nvidia-drm | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/multimedia/libva/Makefile b/multimedia/libva/Makefile
index 8d089702416b..ee83c8fc4727 100644
--- a/multimedia/libva/Makefile
+++ b/multimedia/libva/Makefile
@@ -1,5 +1,6 @@
PORTNAME= libva
DISTVERSION= 2.22.0
+PORTREVISION= 1
CATEGORIES= multimedia
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
diff --git a/multimedia/libva/files/patch-nvidia-drm b/multimedia/libva/files/patch-nvidia-drm
new file mode 100644
index 000000000000..da6a5acf0e03
--- /dev/null
+++ b/multimedia/libva/files/patch-nvidia-drm
@@ -0,0 +1,12 @@
+- Avoid conflict between libva-nvidia-driver and libva-vdpau-driver
+
+--- va/drm/va_drm_utils.c.orig 2024-06-20 06:49:27 UTC
++++ va/drm/va_drm_utils.c
+@@ -65,7 +65,6 @@ VA_DRM_GetDriverNames(VADriverContextP ctx, char **dri
+ { "radeon", { "r600", "radeonsi" } }, // Mesa Gallium
+ { "amdgpu", { "radeonsi" } }, // Mesa Gallium
+ { "WSL", { "d3d12" } }, // Mesa Gallium
+- { "nvidia-drm", { "nvidia" } }, // Unofficial NVIDIA
+ };
+
+ const struct drm_state * const drm_state = ctx->drm_state;