nvidia-stable: merge patches from AUR for 3.18/4.0.
This commit is contained in:
parent
aa9ca9a6cf
commit
f8a1282df0
3 changed files with 58 additions and 2 deletions
28
srcpkgs/nvidia-stable/files/linux-4.0.patch
Normal file
28
srcpkgs/nvidia-stable/files/linux-4.0.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- kernel/nv-pat.c~ 2015-02-22 20:39:43.889075396 -0800
|
||||
+++ kernel/nv-pat.c 2015-02-22 20:29:33.519735577 -0800
|
||||
@@ -35,8 +35,13 @@
|
||||
unsigned long cr0 = read_cr0();
|
||||
write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
|
||||
wbinvd();
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,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 +46,11 @@
|
||||
wbinvd();
|
||||
__flush_tlb();
|
||||
write_cr0((cr0 & 0x9fffffff));
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
|
||||
+ if (cr4 & 0x80) __write_cr4(cr4);
|
||||
+#else
|
||||
if (cr4 & 0x80) write_cr4(cr4);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int nv_determine_pat_mode(void)
|
27
srcpkgs/nvidia-stable/files/nv-drm.patch
Normal file
27
srcpkgs/nvidia-stable/files/nv-drm.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- kernel/nv-drm.c~ 2014-09-12 00:33:06.000000000 +0200
|
||||
+++ kernel/nv-drm.c 2014-10-14 11:35:52.854400737 +0200
|
||||
@@ -18,6 +18,11 @@
|
||||
|
||||
#include <drm/drmP.h>
|
||||
|
||||
+/* 3.18-rc0+ */
|
||||
+#ifndef drm_gem_object
|
||||
+#include <drm/drm_gem.h>
|
||||
+#endif
|
||||
+
|
||||
extern nv_linux_state_t *nv_linux_devices;
|
||||
|
||||
struct nv_gem_object {
|
||||
diff --git a/kernel/nv-drm.c~ b/kernel/nv-drm.c
|
||||
index ecc982a..60d7aae 100644
|
||||
--- kernel/nv-drm.c~
|
||||
+++ kernel/nv-drm.c
|
||||
@@ -129,6 +129,8 @@ static struct drm_driver nv_drm_driver = {
|
||||
.gem_prime_vmap = nv_gem_prime_vmap,
|
||||
.gem_prime_vunmap = nv_gem_prime_vunmap,
|
||||
|
||||
+ .set_busid = drm_pci_set_busid,
|
||||
+
|
||||
.name = "nvidia-drm",
|
||||
.desc = "NVIDIA DRM driver",
|
||||
.date = "20130102",
|
|
@ -4,7 +4,7 @@ _desc="NVIDIA drivers for linux (long-lived series)"
|
|||
|
||||
pkgname=nvidia-stable
|
||||
version=340.76
|
||||
revision=5
|
||||
revision=6
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="Propietary NVIDIA license"
|
||||
homepage="http://www.nvidia.com"
|
||||
|
@ -38,7 +38,8 @@ do_extract() {
|
|||
}
|
||||
do_configure() {
|
||||
cd ${_pkg}
|
||||
patch -sNp0 -i ${XBPS_SRCPKGDIR}/nvidia/files/linux-3.18.patch
|
||||
patch -sNp0 -i ${FILESDIR}/nv-drm.patch
|
||||
patch -sNp0 -i ${FILESDIR}/linux-4.0.patch
|
||||
}
|
||||
do_install() {
|
||||
cd ${_pkg}
|
||||
|
|
Loading…
Reference in a new issue