commit e2a7d7dd7b53a754b70375684667b8aa806402f7
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Sat Apr 6 14:55:04 2024 +0200
Add patch for kernel >= 6.8
nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch | 18 ++++++++++++++++++
nvidia-390xx-kmod.spec | 7 ++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch
b/nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch
new file mode 100644
index 0000000..334e1dd
--- /dev/null
+++ b/nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch
@@ -0,0 +1,18 @@
+diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
+index 132d4d4..1291893 100644
+--- a/nvidia-drm/nvidia-drm-drv.c
++++ b/nvidia-drm/nvidia-drm-drv.c
+@@ -654,6 +654,13 @@ static const struct file_operations nv_drm_fops = {
+ .llseek = noop_llseek,
+ };
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
++// Rel. commit. "drm: Remove locking for legacy ioctls and DRM_UNLOCKED"
(Thomas Zimmermann, 22 Nov 2023)
++// Mock this flag, which was already useless on any recent kernel, since it
++// only did something if the driver set DRIVER_LEGACY in driver_features.
++static const enum drm_ioctl_flags DRM_UNLOCKED = 0;
++#endif
++
+ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY,
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 9dca389..a443a0e 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -18,7 +18,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.157
# Taken over by kmodtool
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -44,6 +44,7 @@ Patch23:
nvidia-390xx-kmod-0027-kernel-6.5-garbage-collect-all-references-to-get
Patch24:
nvidia-390xx-kmod-0028-kernel-6.5-handle-get_user_pages-vmas-argument-remova.patch
Patch25:
nvidia-390xx-kmod-0029-kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
Patch26:
nvidia-390xx-kmod-0030-kernel-6.6-refuse-to-load-legacy-module-if-IBT-is-enabled.patch
+Patch27: nvidia-390xx-kmod-0031-kernel-6.8-adaptation.patch
# build system updates
Patch30: use-kbuild-compiler.patch
@@ -89,6 +90,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch -P 24 -p1 -b 24 -d kernel
%patch -P 25 -p1 -b 25 -d kernel
%patch -P 26 -p1 -b 26 -d kernel
+%patch -P 27 -p1 -b 27 -d kernel
%patch -P 30 -p1 -b 30 -d kernel
%patch -P 31 -p1 -b 31 -d kernel
@@ -126,6 +128,9 @@ done
%changelog
+* Sat Apr 06 2024 Nicolas Viéville <nicolas.vieville(a)uphf.fr> - 3:390.157-8
+- Add patch for kernel >= 6.8
+
* Sun Feb 04 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
3:390.157-7
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild