commit e65c072b3f1aee47cdf0e877a3171c466440c51e
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Apr 21 00:48:21 2022 +0100
Try to fix linux-5.17 based on patch provided on
https://bugzilla.rpmfusion.org/6263
nvidia-390xx-kmod.spec | 7 ++++++-
nvidia-470xx-fix-linux-5.17.patch | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 4b25ca9..9e1550b 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -18,7 +18,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.147
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -39,6 +39,7 @@ Patch12: do-div-cast.patch
Patch13: kernel-5.7.0-set-memory-array.patch
Patch14: kernel-5.12.patch
Patch15:
https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/herecura/ker...
+Patch16: nvidia-470xx-fix-linux-5.17.patch
# build system updates
Patch30: use-kbuild-compiler.patch
@@ -87,6 +88,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch13 -p1 -b 13 -d kernel
%patch14 -p2 -b 14 -d kernel
%patch15 -p2 -b 15 -d kernel
+%patch16 -p2 -b 15 -d kernel
%patch30 -p1 -b 30 -d kernel
%patch31 -p1 -b 31 -d kernel
%patch32 -p1 -b 32 -d kernel
@@ -123,6 +125,9 @@ done
%changelog
+* Wed Apr 20 2022 Sérgio Basto <sergio(a)serjux.com> - 3:390.147-3
+- Try to fix linux-5.17 based on patch provided on
https://bugzilla.rpmfusion.org/6263
+
* Thu Feb 10 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
3:390.147-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/nvidia-470xx-fix-linux-5.17.patch b/nvidia-470xx-fix-linux-5.17.patch
new file mode 100644
index 0000000..606a9eb
--- /dev/null
+++ b/nvidia-470xx-fix-linux-5.17.patch
@@ -0,0 +1,37 @@
+adaptation to 39xx
+
+From 026a2a54a234cdb7bf78c17be7ea29d8dcf9f390 Mon Sep 17 00:00:00 2001
+From: Joan Bruguera <joanbrugueram(a)gmail.com>
+Date: Sun, 23 Jan 2022 16:28:18 +0100
+Subject: [PATCH] Tentative fix for NVIDIA 470.94 driver for Linux 5.17-rc1
+
+See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
+
+---
+ common/inc/nv-procfs-utils.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/kernel/common/inc/nv-procfs.h b/kernel/common/inc/nv-procfs.h
+index 7c3e1a3..462eac1 100644
+--- a/kernel/common/inc/nv-procfs.h
++++ b/kernel/common/inc/nv-procfs.h
+@@ -10,6 +10,7 @@
+ #ifndef _NV_PROCFS_H
+ #define _NV_PROCFS_H
+
++#include <linux/version.h>
+ #include "conftest.h"
+
+ #ifdef CONFIG_PROC_FS
+@@ -87,6 +88,8 @@ typedef struct file_operations nv_proc_ops_t;
+
+ #if defined(NV_PDE_DATA_PRESENT)
+ # define NV_PDE_DATA(inode) PDE_DATA(inode)
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
++# define NV_PDE_DATA(inode) pde_data(inode)
+ #else
+ # define NV_PDE_DATA(inode) PDE(inode)->data
+ #endif
+--
+2.34.1
+