nvidia-x11: advance to 365.35 and patch kernel 4.7.

This commit is contained in:
Karn Kallio 2016-08-01 09:44:04 -04:00 committed by Shea Levy
parent 9cc42ade37
commit 5d11dac8bb
2 changed files with 45 additions and 3 deletions

View file

@ -0,0 +1,40 @@
diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c
--- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:07:06.595038290 -0400
+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:09:18.532197060 -0400
@@ -114,7 +114,7 @@
* We don't support any planar format, pick up first buffer only.
*/
- gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
+ gem = drm_gem_object_lookup(file, cmd->handles[0]);
if (gem == NULL)
{
diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c
--- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:07:06.595038290 -0400
+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:08:56.187492736 -0400
@@ -408,7 +408,7 @@
mutex_lock(&dev->struct_mutex);
- gem = drm_gem_object_lookup(dev, file, handle);
+ gem = drm_gem_object_lookup(file, handle);
if (gem == NULL)
{
diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h
--- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:07:06.600038448 -0400
+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:08:06.506926763 -0400
@@ -554,12 +554,6 @@
INIT_RADIX_TREE(tree, GFP_NOWAIT);
}
-static bool radix_tree_empty(struct radix_tree_root *tree)
-{
- void *dummy;
- return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
-}
-
#if !defined(NV_USLEEP_RANGE_PRESENT)
static void __sched usleep_range(unsigned long min, unsigned long max)

View file

@ -12,7 +12,7 @@ assert (!libsOnly) -> kernel != null;
let
versionNumber = "361.45.11";
versionNumber = "367.35";
# Policy: use the highest stable version as the default (on our master).
inherit (stdenv.lib) makeLibraryPath;
@ -28,12 +28,12 @@ stdenv.mkDerivation {
if stdenv.system == "i686-linux" then
fetchurl {
url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
sha256 = "036v7bzh9zy7zvaz2wf7zsamrynbg1yr1dll7sf1l928w059i6pb";
sha256 = "05g36bxcfk21ab8b0ay3zy21k5nd71468p9y1nbflx7ghpx25jrq";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
sha256 = "1f8bxmf8cr3cgzxgap5ccb1yrqyrrdig19dp282y6z9xjq27l074";
sha256 = "0m4k8f0212l63h22wk6hgi8fbfsgxqih5mizsw4ixqqmjd75av4a";
}
else throw "nvidia-x11 does not support platform ${stdenv.system}";
@ -53,6 +53,8 @@ stdenv.mkDerivation {
[ gtk atk pango glib gdk_pixbuf cairo ] );
programPath = makeLibraryPath [ xorg.libXv ];
patches = if versionAtLeast kernel.version "4.7" then [ ./365.35-kernel-4.7.patch ] else [];
buildInputs = [ perl nukeReferences ];
disallowedReferences = if libsOnly then [] else [ kernel.dev ];