]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff
- fix building with kernel 5.17, rel 3 auto/th/xorg-driver-video-nvidia-legacy-390xx-390.147-3
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Apr 2022 19:51:22 +0000 (21:51 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Apr 2022 19:51:22 +0000 (21:51 +0200)
kernel-5.17.patch [new file with mode: 0644]
xorg-driver-video-nvidia-legacy-390xx.spec

diff --git a/kernel-5.17.patch b/kernel-5.17.patch
new file mode 100644 (file)
index 0000000..14f44fb
--- /dev/null
@@ -0,0 +1,67 @@
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/conftest.sh~        2021-12-13 07:06:52.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/conftest.sh 2022-04-02 21:42:45.218675048 +0200
+@@ -1806,6 +1806,19 @@
+             compile_check_conftest "$CODE" "NV_PDE_DATA_PRESENT" "" "functions"
+         ;;
++        pde_data_func)
++            #
++            # Determine if the PDE_DATA() function is present.
++            #
++            CODE="
++            #include <linux/proc_fs.h>
++            void conftest_pde_data(void) {
++                pde_data();
++            }"
++
++            compile_check_conftest "$CODE" "NV_PDE_DATA_FUNC_PRESENT" "" "functions"
++        ;;
++
+         get_num_physpages)
+             #
+             # Determine if the get_num_physpages() function is
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/common/inc/nv-procfs.h~     2021-12-13 15:04:59.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/common/inc/nv-procfs.h      2022-04-02 21:44:19.777574273 +0200
+@@ -115,8 +115,12 @@
+ #if defined(NV_PDE_DATA_PRESENT)
+ # define NV_PDE_DATA(inode) PDE_DATA(inode)
+ #else
++#if defined(NV_PDE_DATA_FUNC_PRESENT)
++# define NV_PDE_DATA(inode) pde_data(inode)
++#else
+ # define NV_PDE_DATA(inode) PDE(inode)->data
+ #endif
++#endif
+ #if defined(NV_PROC_REMOVE_PRESENT)
+ # define NV_REMOVE_PROC_ENTRY(entry)                           \
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia/nvidia.Kbuild~       2021-12-13 15:04:30.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia/nvidia.Kbuild        2022-04-02 21:48:22.121422416 +0200
+@@ -133,6 +133,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += efi_enabled
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data_func
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pm_vt_switch_required
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += xen_ioemu_inject_msi
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-modeset/nvidia-modeset.Kbuild~       2021-11-02 14:29:40.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-modeset/nvidia-modeset.Kbuild        2022-04-02 21:49:08.364218278 +0200
+@@ -90,6 +90,7 @@
+ NV_CONFTEST_TYPE_COMPILE_TESTS += proc_dir_entry
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data_func
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += timer_setup
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += do_gettimeofday
+--- NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-uvm/nvidia-uvm.Kbuild~       2021-12-13 15:04:30.000000000 +0100
++++ NVIDIA-Linux-x86_64-390.147-no-compat32/kernel/nvidia-uvm/nvidia-uvm.Kbuild        2022-04-02 21:49:28.303986549 +0200
+@@ -103,6 +103,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += wait_on_bit_lock_argument_count
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_create_data
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
++NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data_func
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += proc_remove
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += bitmap_clear
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += usleep_range
index bf84c2d34fd1000f6817f5c203ee08293822d4a6..b3d3162685395bc5c56bd329dab6118de58f958b 100644 (file)
@@ -29,7 +29,7 @@ exit 1
 
 %define                no_install_post_check_so 1
 
-%define                rel     2
+%define                rel     3
 %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.17.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 2.09218 seconds and 4 git commands to generate.