summaryrefslogtreecommitdiff
path: root/sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-02-10 03:31:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-02-10 03:31:32 +0000
commita8a04adef04fe2637b2cdf42b2101334ffeea9ca (patch)
tree8ffed7adcb58929bc2333ad420573d941565c499 /sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch
parentd362090620ee2c812ad94af0a94e9f335ee8ed62 (diff)
x11-drivers/nvidia && sys-kernel/nvidia-drivers-dkms : unbreak older kernels
Diffstat (limited to 'sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch')
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch22
1 files changed, 17 insertions, 5 deletions
diff --git a/sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch b/sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch
index b78bff28..63052b57 100644
--- a/sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch
+++ b/sys-kernel/nvidia-drivers-dkms/files/390.87-vmf_insert_pfn.patch
@@ -1,11 +1,23 @@
---- a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c 2018-12-27 12:02:01.534608650 +1100
-+++ b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c 2018-12-27 12:04:31.541940558 +1100
-@@ -237,7 +237,7 @@
+diff -Nur a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
+--- a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c 2018-08-22 01:55:29.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c 2019-02-10 03:22:49.318034507 +0000
+@@ -29,6 +29,7 @@
+
+ #include "nv-mm.h"
+
++#include <linux/version.h>
+ static void __nv_drm_gem_nvkms_memory_free(struct nv_drm_gem_object *nv_gem)
+ {
+ struct nv_drm_device *nv_dev = nv_gem->nv_dev;
+@@ -237,7 +238,11 @@
page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
-- ret = vm_insert_pfn(vma, address, pfn + page_offset);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+ ret = vmf_insert_pfn(vma, address, pfn + page_offset);
++#else
+ ret = vm_insert_pfn(vma, address, pfn + page_offset);
++#endif
switch (ret) {
- case 0: \ No newline at end of file
+ case 0: