[packages/xorg-driver-video-nvidia-legacy-390xx] - fix building with kernel 5.14, rel 2
baggins
baggins at pld-linux.org
Tue Sep 7 22:09:16 CEST 2021
commit 87ecec0fa42f417d6059091cff7e148370703034
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Sep 7 22:08:59 2021 +0200
- fix building with kernel 5.14, rel 2
kernel-5.14.patch | 48 ++++++++++++++++++++++++++++++
xorg-driver-video-nvidia-legacy-390xx.spec | 4 ++-
2 files changed, 51 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index 9418111..bbb9899 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -29,7 +29,7 @@ exit 1
%define no_install_post_check_so 1
-%define rel 1
+%define rel 2
%define pname xorg-driver-video-nvidia-legacy-390xx
Summary: Linux Drivers for nVidia GeForce/Quadro Chips
Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -51,6 +51,7 @@ Source4: 10-nvidia.conf
Source5: 10-nvidia-modules.conf
Patch0: X11-driver-nvidia-GL.patch
Patch1: X11-driver-nvidia-desktop.patch
+Patch2: kernel-5.14.patch
URL: https://www.nvidia.com/en-us/drivers/unix/
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.752
@@ -311,6 +312,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%endif
%patch0 -p1
%patch1 -p1
+%patch2 -p1
echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
diff --git a/kernel-5.14.patch b/kernel-5.14.patch
new file mode 100644
index 0000000..c2683b3
--- /dev/null
+++ b/kernel-5.14.patch
@@ -0,0 +1,48 @@
+--- NVIDIA-Linux-x86_64-390.144-no-compat32/kernel/nvidia/os-interface.c~ 2021-06-03 01:09:57.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.144-no-compat32/kernel/nvidia/os-interface.c 2021-09-07 21:53:39.925501620 +0200
+@@ -580,7 +580,11 @@
+ // the requested timeout has expired, loop until less
+ // than a jiffie of the desired delay remains.
+ //
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0))
++ set_current_state(TASK_INTERRUPTIBLE);
++#else
+ current->state = TASK_INTERRUPTIBLE;
++#endif
+ do
+ {
+ schedule_timeout(jiffies);
+--- NVIDIA-Linux-x86_64-390.144-no-compat32/kernel/nvidia/nvlink_linux.c~ 2021-06-03 01:10:01.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.144-no-compat32/kernel/nvidia/nvlink_linux.c 2021-09-07 21:56:33.935565412 +0200
+@@ -597,7 +597,11 @@
+ // the requested timeout has expired, loop until less
+ // than a jiffie of the desired delay remains.
+ //
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0))
++ set_current_state(TASK_INTERRUPTIBLE);
++#else
+ current->state = TASK_INTERRUPTIBLE;
++#endif
+ do
+ {
+ schedule_timeout(jiffies);
+--- NVIDIA-Linux-x86_64-390.144-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c~ 2021-06-03 01:10:01.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.144-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c 2021-09-07 22:06:07.148309829 +0200
+@@ -20,6 +20,7 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include "linux/version.h"
+ #include "nvidia-drm-conftest.h" /* NV_DRM_AVAILABLE and NV_DRM_DRM_GEM_H_PRESENT */
+
+ #include "nvidia-drm-priv.h"
+@@ -811,7 +811,9 @@
+
+ dev->dev_private = nv_dev;
+ nv_dev->dev = dev;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
+ dev->pdev = pdev;
++#endif
+
+ /* Register DRM device to DRM sub-system */
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/87ecec0fa42f417d6059091cff7e148370703034
More information about the pld-cvs-commit
mailing list