- fix building with kernel 5.14, rel 2 master auto/th/xorg-driver-video-nvidia-legacy-390xx-390.144-2
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 7 Sep 2021 20:08:59 +0000 (22:08 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 7 Sep 2021 20:08:59 +0000 (22:08 +0200)
kernel-5.14.patch [new file with mode: 0644]
xorg-driver-video-nvidia-legacy-390xx.spec

diff --git a/kernel-5.14.patch b/kernel-5.14.patch
new file mode 100644 (file)
index 0000000..c2683b3
--- /dev/null
@@ -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 */
index 9418111a43fb03f1512ccc769338ba67cc28b6dd..bbb98998100165b0aa0286e9c12f02839c7e6a5b 100644 (file)
@@ -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
This page took 0.725074 seconds and 4 git commands to generate.