nvidia304: linux 4.[11-12] patches
This commit is contained in:
parent
55a53f788c
commit
8481209780
3 changed files with 101 additions and 1 deletions
44
srcpkgs/nvidia304/files/kernel_4.11.patch
Normal file
44
srcpkgs/nvidia304/files/kernel_4.11.patch
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
--- kernel/nv-drm.c.orig
|
||||||
|
+++ kernel/nv-drm.c
|
||||||
|
@@ -22,6 +22,8 @@
|
||||||
|
#include <drm/drm_gem.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <linux/version.h>
|
||||||
|
+
|
||||||
|
extern nv_linux_state_t *nv_linux_devices;
|
||||||
|
|
||||||
|
static int nv_drm_load(
|
||||||
|
@@ -42,7 +44,11 @@
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
|
||||||
|
static int nv_drm_unload(
|
||||||
|
+#else
|
||||||
|
+static void nv_drm_unload(
|
||||||
|
+#endif
|
||||||
|
struct drm_device *dev
|
||||||
|
)
|
||||||
|
{
|
||||||
|
@@ -52,11 +58,19 @@
|
||||||
|
{
|
||||||
|
if (nvl->dev == dev->pdev)
|
||||||
|
{
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
|
||||||
|
return 0;
|
||||||
|
+#else
|
||||||
|
+ return;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
|
||||||
|
return -ENODEV;
|
||||||
|
+#else
|
||||||
|
+ return;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations nv_drm_fops = {
|
||||||
|
|
54
srcpkgs/nvidia304/files/kernel_4.12.patch
Normal file
54
srcpkgs/nvidia304/files/kernel_4.12.patch
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
--- kernel/conftest.sh.orig
|
||||||
|
+++ kernel/conftest.sh
|
||||||
|
@@ -362,7 +362,11 @@
|
||||||
|
# Determine if the set_memory_uc() function is present.
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
- #include <asm/cacheflush.h>
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
+ #include <asm/set_memory.h>
|
||||||
|
+ #else
|
||||||
|
+ #include <asm/cacheflush.h>
|
||||||
|
+ #endif
|
||||||
|
void conftest_set_memory_uc(void) {
|
||||||
|
set_memory_uc();
|
||||||
|
}"
|
||||||
|
@@ -375,7 +379,11 @@
|
||||||
|
# Determine if the set_memory_array_uc() function is present.
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
- #include <asm/cacheflush.h>
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
+ #include <asm/set_memory.h>
|
||||||
|
+ #else
|
||||||
|
+ #include <asm/cacheflush.h>
|
||||||
|
+ #endif
|
||||||
|
void conftest_set_memory_array_uc(void) {
|
||||||
|
set_memory_array_uc();
|
||||||
|
}"
|
||||||
|
@@ -388,7 +396,11 @@
|
||||||
|
# Determine if the set_pages_uc() function is present.
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
- #include <asm/cacheflush.h>
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
+ #include <asm/set_memory.h>
|
||||||
|
+ #else
|
||||||
|
+ #include <asm/cacheflush.h>
|
||||||
|
+ #endif
|
||||||
|
void conftest_set_pages_uc(void) {
|
||||||
|
set_pages_uc();
|
||||||
|
}"
|
||||||
|
--- kernel/nv-vm.c.orig
|
||||||
|
+++ kernel/nv-vm.c
|
||||||
|
@@ -13,6 +13,10 @@
|
||||||
|
#include "nv.h"
|
||||||
|
#include "nv-linux.h"
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
+ #include <asm/set_memory.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages)
|
||||||
|
{
|
||||||
|
if (nv_update_memory_types)
|
|
@ -3,7 +3,7 @@ _desc="NVIDIA drivers (For GeForce 5 FX, 6, 7, 8 series)"
|
||||||
|
|
||||||
pkgname=nvidia304
|
pkgname=nvidia304
|
||||||
version=304.135
|
version=304.135
|
||||||
revision=4
|
revision=5
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
license="Proprietary NVIDIA license"
|
license="Proprietary NVIDIA license"
|
||||||
homepage="http://www.nvidia.com"
|
homepage="http://www.nvidia.com"
|
||||||
|
@ -39,6 +39,8 @@ do_configure() {
|
||||||
cd ${_pkg}
|
cd ${_pkg}
|
||||||
patch -sNp0 -i ${FILESDIR}/drm-driver-legacy.patch
|
patch -sNp0 -i ${FILESDIR}/drm-driver-legacy.patch
|
||||||
patch -sNp0 -i ${FILESDIR}/kernel_4.10.patch
|
patch -sNp0 -i ${FILESDIR}/kernel_4.10.patch
|
||||||
|
patch -sNp0 -i ${FILESDIR}/kernel_4.11.patch
|
||||||
|
patch -sNp0 -i ${FILESDIR}/kernel_4.12.patch
|
||||||
}
|
}
|
||||||
do_install() {
|
do_install() {
|
||||||
cd ${_pkg}
|
cd ${_pkg}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue