mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #4382 from MilhouseVH/nvlegacy-bump
xf86-video-nvidia-legacy: Bump driver, add kernel 4.3 support
This commit is contained in:
commit
0cf170998a
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xf86-video-nvidia-legacy"
|
||||
PKG_VERSION="304.125"
|
||||
PKG_VERSION="304.128"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="nonfree"
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff -Naur xf86-video-nvidia-legacy-304.125/kernel/nv.c xf86-video-nvidia-legacy-304.125.patch/kernel/nv.c
|
||||
--- xf86-video-nvidia-legacy-304.125/kernel/nv.c 2014-12-02 04:55:59.000000000 +0100
|
||||
+++ xf86-video-nvidia-legacy-304.125.patch/kernel/nv.c 2015-02-11 19:07:09.844431593 +0100
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "rmil.h"
|
||||
|
||||
#if defined(MODULE_LICENSE)
|
||||
-MODULE_LICENSE("NVIDIA");
|
||||
+MODULE_LICENSE("GPL\0NVIDIA");
|
||||
#endif
|
||||
#if defined(MODULE_INFO)
|
||||
MODULE_INFO(supported, "external");
|
||||
@@ -2026,7 +2026,7 @@
|
||||
unsigned long i_arg
|
||||
)
|
||||
{
|
||||
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
|
||||
+ return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
|
||||
}
|
||||
|
||||
long nv_kern_compat_ioctl(
|
||||
@@ -2035,7 +2035,7 @@
|
||||
unsigned long i_arg
|
||||
)
|
||||
{
|
||||
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
|
||||
+ return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
|
||||
}
|
||||
|
||||
/*
|
@ -1,29 +0,0 @@
|
||||
diff -Naur NVIDIA-Linux-x86_64-340.76-no-compat32/kernel/nv-pat.c NVIDIA-Linux-x86_64-340.76-no-compat32.patch/kernel/nv-pat.c
|
||||
--- NVIDIA-Linux-x86_64-340.76-no-compat32/kernel/nv-pat.c 2015-01-22 20:01:16.000000000 +0100
|
||||
+++ NVIDIA-Linux-x86_64-340.76-no-compat32.patch/kernel/nv-pat.c 2015-04-04 19:16:01.931219988 +0200
|
||||
@@ -35,8 +35,13 @@
|
||||
unsigned long cr0 = read_cr0();
|
||||
write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
|
||||
wbinvd();
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
|
||||
*cr4 = read_cr4();
|
||||
if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
|
||||
+#else
|
||||
+ *cr4 = __read_cr4();
|
||||
+ if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
|
||||
+#endif
|
||||
__flush_tlb();
|
||||
}
|
||||
|
||||
@@ -46,7 +51,11 @@
|
||||
wbinvd();
|
||||
__flush_tlb();
|
||||
write_cr0((cr0 & 0x9fffffff));
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
|
||||
if (cr4 & 0x80) write_cr4(cr4);
|
||||
+#else
|
||||
+ if (cr4 & 0x80) __write_cr4(cr4);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int nv_determine_pat_mode(void)
|
@ -0,0 +1,28 @@
|
||||
--- a/kernel/nv-procfs.c 2015-10-18 04:32:24.214891836 +0100
|
||||
+++ b/kernel/nv-procfs.c 2015-10-18 04:33:01.611081468 +0100
|
||||
@@ -607,7 +607,12 @@
|
||||
registry_keys = ((nvl != NULL) ?
|
||||
nvl->registry_keys : nv_registry_keys);
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
|
||||
return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
|
||||
+#else
|
||||
+ seq_printf(s, "Binary: \"%s\"\n", registry_keys);
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
@@ -674,7 +679,12 @@
|
||||
void *v
|
||||
)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
|
||||
return seq_puts(s, s->private);
|
||||
+#else
|
||||
+ seq_puts(s, s->private);
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
NV_DEFINE_PROCFS_SINGLE_FILE(text_file);
|
Loading…
x
Reference in New Issue
Block a user