summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers
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 /x11-drivers/nvidia-drivers
parentd362090620ee2c812ad94af0a94e9f335ee8ed62 (diff)
x11-drivers/nvidia && sys-kernel/nvidia-drivers-dkms : unbreak older kernels
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/files/390.87-ipmi_user.patch31
-rw-r--r--x11-drivers/nvidia-drivers/files/390.87-vmf_insert_pfn.patch22
-rw-r--r--x11-drivers/nvidia-drivers/files/kernel-4.19.patch2
3 files changed, 42 insertions, 13 deletions
diff --git a/x11-drivers/nvidia-drivers/files/390.87-ipmi_user.patch b/x11-drivers/nvidia-drivers/files/390.87-ipmi_user.patch
index 03aa4287..36228bc4 100644
--- a/x11-drivers/nvidia-drivers/files/390.87-ipmi_user.patch
+++ b/x11-drivers/nvidia-drivers/files/390.87-ipmi_user.patch
@@ -1,20 +1,37 @@
---- a/kernel/nvidia/os-interface.c 2018-12-27 11:57:21.788109696 +1100
-+++ b/kernel/nvidia/os-interface.c 2018-12-27 11:59:45.300394369 +1100
-@@ -1697,7 +1697,7 @@
+diff -Nur a/kernel/nvidia/os-interface.c b/kernel/nvidia/os-interface.c
+--- a/kernel/nvidia/os-interface.c 2018-08-22 01:55:22.000000000 +0100
++++ b/kernel/nvidia/os-interface.c 2019-02-10 03:28:33.359055441 +0000
+@@ -16,6 +16,8 @@
+
+ #include "nv-gpu-numa.h"
+
++#include <linux/version.h>
++
+ #define MAX_ERROR_STRING 512
+ static char nv_error_string[MAX_ERROR_STRING];
+ nv_spinlock_t nv_error_string_lock;
+@@ -1697,7 +1699,12 @@
struct nv_ipmi_softc
{
-- ipmi_user_t p_user; // ptr to ipmi_msghandler user structure
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+ struct ipmi_user *p_user; // ptr to ipmi_msghandler user structure
++#else
+ ipmi_user_t p_user; // ptr to ipmi_msghandler user structure
++#endif
++
spinlock_t msg_lock;
struct list_head msgs;
NvU32 seqNum; //request sequence number
-@@ -1706,7 +1706,7 @@
+@@ -1706,7 +1713,11 @@
static inline int
nv_ipmi_set_my_address
(
-- ipmi_user_t user,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+ struct ipmi_user *user,
++#else
+ ipmi_user_t user,
++#endif
unsigned char address
)
- { \ No newline at end of file
+ {
diff --git a/x11-drivers/nvidia-drivers/files/390.87-vmf_insert_pfn.patch b/x11-drivers/nvidia-drivers/files/390.87-vmf_insert_pfn.patch
index b78bff28..63052b57 100644
--- a/x11-drivers/nvidia-drivers/files/390.87-vmf_insert_pfn.patch
+++ b/x11-drivers/nvidia-drivers/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:
diff --git a/x11-drivers/nvidia-drivers/files/kernel-4.19.patch b/x11-drivers/nvidia-drivers/files/kernel-4.19.patch
index 7ddae3b9..4abcba4a 100644
--- a/x11-drivers/nvidia-drivers/files/kernel-4.19.patch
+++ b/x11-drivers/nvidia-drivers/files/kernel-4.19.patch
@@ -46,4 +46,4 @@ diff -Naru kernel.orig/nvidia-drm/nvidia-drm-encoder.c kernel/nvidia-drm/nvidia-
+#endif
if (ret != 0) {
- NV_DRM_DEV_LOG_ERR( \ No newline at end of file
+ NV_DRM_DEV_LOG_ERR(