aboutsummaryrefslogtreecommitdiff
path: root/system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2021-06-17 17:39:07 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-06-23 01:14:05 +0700
commit7956ae7b8861d37dfa9856b786a8c5bc5ded5223 (patch)
treeecfda97b6deb799e0ce37f6c776debfd3784db8f /system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch
parentc251ff3cbfce7fa49f6216b157f83e3b43fdb12e (diff)
system/nvidia-legacy340-kernel: Patch for the newer kernels.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch')
-rw-r--r--system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch b/system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch
new file mode 100644
index 0000000000000..8bc213c21ca31
--- /dev/null
+++ b/system/nvidia-legacy340-kernel/patches/0004-kernel-5.10.patch
@@ -0,0 +1,18 @@
+https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
+
+diff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c
+--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c 2020-12-13 19:10:56.759999937 +0100
++++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c 2020-12-13 19:09:02.039999925 +0100
+@@ -322,8 +322,11 @@
+ {
+ struct nv_gem_object *nv_obj = container_of(obj, struct nv_gem_object, base);
+ int page_count = obj->size >> PAGE_SHIFT;
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
++ return drm_prime_pages_to_sg(obj->dev, nv_obj->pages, page_count);
++#else
+ return drm_prime_pages_to_sg(nv_obj->pages, page_count);
++#endif
+ }
+
+ static void* nv_gem_prime_vmap(