summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2019-01-09 20:35:59 +0100
committer Matteo Bernardini2019-01-19 08:33:44 +0100
commitfbe4d9e2e6b86fce6f49ba7d10fee48213f43c3c (patch)
treef3c1607d3518d031b90df8ac6ab44b66ddd036c6
parentddaeb7cce28e9a9eb05c4beb21b2f0438fc261f6 (diff)
downloadslackbuilds-nvidia-legacy390-kernel.tar.gz
system/nvidia-legacy390-kernel: Patch for the newer kernels.nvidia-legacy390-kernel
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/nvidia-legacy390-kernel/4.18.patch24
-rw-r--r--system/nvidia-legacy390-kernel/4.19.patch23
-rw-r--r--system/nvidia-legacy390-kernel/4.20.patch20
-rw-r--r--system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild5
4 files changed, 72 insertions, 0 deletions
diff --git a/system/nvidia-legacy390-kernel/4.18.patch b/system/nvidia-legacy390-kernel/4.18.patch
new file mode 100644
index 0000000000..af32c6b3a2
--- /dev/null
+++ b/system/nvidia-legacy390-kernel/4.18.patch
@@ -0,0 +1,24 @@
+diff -ur NVIDIA-Linux-x86_64-396.24/kernel/nvidia-drm/nvidia-drm-connector.c NVIDIA-Linux-x86_64-396.24.patched2/kernel/nvidia-drm/nvidia-drm-connector.c
+--- NVIDIA-Linux-x86_64-396.24/kernel/nvidia-drm/nvidia-drm-connector.c 2018-04-26 10:34:46.000000000 +0200
++++ NVIDIA-Linux-x86_64-396.24.patched2/kernel/nvidia-drm/nvidia-drm-connector.c 2018-08-22 15:42:15.327407716 +0200
+@@ -226,7 +226,7 @@
+
+
+ if (nv_connector->edid != NULL) {
+- drm_mode_connector_update_edid_property(
++ drm_connector_update_edid_property(
+ connector, nv_connector->edid);
+ }
+
+diff -ur NVIDIA-Linux-x86_64-396.24/kernel/nvidia-drm/nvidia-drm-encoder.c NVIDIA-Linux-x86_64-396.24.patched2/kernel/nvidia-drm/nvidia-drm-encoder.c
+--- NVIDIA-Linux-x86_64-396.24/kernel/nvidia-drm/nvidia-drm-encoder.c 2018-04-26 10:34:46.000000000 +0200
++++ NVIDIA-Linux-x86_64-396.24.patched2/kernel/nvidia-drm/nvidia-drm-encoder.c 2018-08-22 15:41:25.356410694 +0200
+@@ -216,7 +216,7 @@
+
+ /* Attach encoder and connector */
+
+- ret = drm_mode_connector_attach_encoder(connector, encoder);
++ ret = drm_connector_attach_encoder(connector, encoder);
+
+ if (ret != 0) {
+ NV_DRM_DEV_LOG_ERR(
diff --git a/system/nvidia-legacy390-kernel/4.19.patch b/system/nvidia-legacy390-kernel/4.19.patch
new file mode 100644
index 0000000000..c3a3c5bde6
--- /dev/null
+++ b/system/nvidia-legacy390-kernel/4.19.patch
@@ -0,0 +1,23 @@
+--- a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
++++ b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
+@@ -20,6 +20,8 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
++
+ #include "nvidia-drm-conftest.h"
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+@@ -345,7 +347,11 @@ static int __nv_drm_vma_fault(struct vm_area_struct *vma,
+
+ page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+ ret = vm_insert_pfn(vma, address, pfn + page_offset);
++#else
++ ret = vmf_insert_pfn(vma, address, pfn + page_offset);
++#endif
+
+ switch (ret) {
+ case 0:
diff --git a/system/nvidia-legacy390-kernel/4.20.patch b/system/nvidia-legacy390-kernel/4.20.patch
new file mode 100644
index 0000000000..21bea152f1
--- /dev/null
+++ b/system/nvidia-legacy390-kernel/4.20.patch
@@ -0,0 +1,20 @@
+--- a/kernel/nvidia/os-interface.c 2018-11-15 21:56:59.000000000 -0600
++++ b/kernel/nvidia/os-interface.c 2018-11-26 21:53:39.970635906 -0600
+@@ -1670,7 +1670,7 @@
+
+ struct nv_ipmi_softc
+ {
+- ipmi_user_t p_user; // ptr to ipmi_msghandler user structure
++ struct ipmi_user *p_user;
+ spinlock_t msg_lock;
+ struct list_head msgs;
+ NvU32 seqNum; //request sequence number
+@@ -1679,7 +1679,7 @@
+ static inline int
+ nv_ipmi_set_my_address
+ (
+- ipmi_user_t user,
++ struct ipmi_user *user,
+ unsigned char address
+ )
+ {
diff --git a/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild b/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild
index a8a3710ad2..e4f0174085 100644
--- a/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild
+++ b/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild
@@ -79,6 +79,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# patch for the newer kernels
+patch -p1 < $CWD/4.18.patch
+patch -p1 < $CWD/4.19.patch
+patch -p1 < $CWD/4.20.patch
+
(cd kernel || exit 1
make SYSSRC=$KERNELPATH module || exit 1
)