[packages/xorg-driver-video-nvidia] - up to 495.46

baggins baggins at pld-linux.org
Sat Jan 15 14:33:11 CET 2022


commit 69433317fa7d6af076c42d8cb59047b3084f304e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Jan 15 14:32:28 2022 +0100

    - up to 495.46

 kernel-5.16.patch             | 35 +++++++++++++++++++++++++++++++++++
 xorg-driver-video-nvidia.spec |  8 +++++---
 2 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/xorg-driver-video-nvidia.spec b/xorg-driver-video-nvidia.spec
index 75cd04b..d9735cc 100644
--- a/xorg-driver-video-nvidia.spec
+++ b/xorg-driver-video-nvidia.spec
@@ -20,25 +20,26 @@ exit 1
 
 %define		no_install_post_check_so 1
 
-%define		rel	2
+%define		rel	1
 %define		pname	xorg-driver-video-nvidia
 Summary:	Linux Drivers for nVidia GeForce/Quadro Chips
 Summary(hu.UTF-8):	Linux meghajtók nVidia GeForce/Quadro chipekhez
 Summary(pl.UTF-8):	Sterowniki do kart graficznych nVidia GeForce/Quadro
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
 # when updating version here, keep nvidia-settings.spec in sync as well
-Version:	495.44
+Version:	495.46
 Release:	%{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 Epoch:		1
 License:	nVidia Binary
 Group:		X11
 Source0:	https://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run
-# Source0-md5:	3730580acbd0d2145e870f7896d4db83
+# Source0-md5:	db1d6b0f9e590249bbf940a99825f000
 Source2:	%{pname}-xinitrc.sh
 Source3:	gl.pc.in
 Source4:	10-nvidia.conf
 Source5:	10-nvidia-modules.conf
 Patch0:		X11-driver-nvidia-desktop.patch
+Patch1:		kernel-5.16.patch
 URL:		https://www.nvidia.com/en-us/drivers/unix/
 BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 1.752
@@ -310,6 +311,7 @@ rm -rf NVIDIA-Linux-x86_64-%{version}
 /bin/sh %{SOURCE0} --extract-only
 %setup -qDT -n NVIDIA-Linux-x86_64-%{version}
 %patch0 -p1
+%patch1 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
diff --git a/kernel-5.16.patch b/kernel-5.16.patch
new file mode 100644
index 0000000..12cdb49
--- /dev/null
+++ b/kernel-5.16.patch
@@ -0,0 +1,35 @@
+--- NVIDIA-Linux-x86_64-495.46/kernel/nvidia-uvm/uvm_migrate_pageable.c~	2021-10-27 19:14:51.000000000 +0200
++++ NVIDIA-Linux-x86_64-495.46/kernel/nvidia-uvm/uvm_migrate_pageable.c	2022-01-15 14:28:56.947610124 +0100
+@@ -34,6 +34,8 @@
+ #include "uvm_migrate_pageable.h"
+ #include "uvm_populate_pageable.h"
+ 
++#include <linux/version.h>
++
+ #ifdef UVM_MIGRATE_VMA_SUPPORTED
+ 
+ static struct kmem_cache *g_uvm_migrate_vma_state_cache __read_mostly;
+@@ -406,7 +408,11 @@
+         uvm_push_set_flag(&push, UVM_PUSH_FLAG_CE_NEXT_MEMBAR_NONE);
+         copying_gpu->parent->ce_hal->memset_8(&push, dst_address, 0, PAGE_SIZE);
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
+         dst[i] = migrate_pfn(page_to_pfn(dst_page)) | MIGRATE_PFN_LOCKED;
++#else
++        dst[i] = migrate_pfn(page_to_pfn(dst_page));
++#endif
+     }
+ 
+     if (copying_gpu) {
+@@ -490,7 +496,11 @@
+         uvm_push_set_flag(&push, UVM_PUSH_FLAG_CE_NEXT_MEMBAR_NONE);
+         copying_gpu->parent->ce_hal->memcopy(&push, dst_address, src_address, PAGE_SIZE);
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
+         dst[i] = migrate_pfn(page_to_pfn(dst_page)) | MIGRATE_PFN_LOCKED;
++#else
++        dst[i] = migrate_pfn(page_to_pfn(dst_page));
++#endif
+     }
+ 
+     // TODO: Bug 1766424: If the destination is a GPU and the copy was done by
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia.git/commitdiff/69433317fa7d6af076c42d8cb59047b3084f304e



More information about the pld-cvs-commit mailing list