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

authored by Karn Kallio and committed by Shea Levy 5d11dac8 9cc42ade

+45 -3
+40
pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch
··· 1 + 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 2 + --- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:07:06.595038290 -0400 3 + +++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:09:18.532197060 -0400 4 + @@ -114,7 +114,7 @@ 5 + * We don't support any planar format, pick up first buffer only. 6 + */ 7 + 8 + - gem = drm_gem_object_lookup(dev, file, cmd->handles[0]); 9 + + gem = drm_gem_object_lookup(file, cmd->handles[0]); 10 + 11 + if (gem == NULL) 12 + { 13 + 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 14 + --- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:07:06.595038290 -0400 15 + +++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:08:56.187492736 -0400 16 + @@ -408,7 +408,7 @@ 17 + 18 + mutex_lock(&dev->struct_mutex); 19 + 20 + - gem = drm_gem_object_lookup(dev, file, handle); 21 + + gem = drm_gem_object_lookup(file, handle); 22 + 23 + if (gem == NULL) 24 + { 25 + 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 26 + --- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:07:06.600038448 -0400 27 + +++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:08:06.506926763 -0400 28 + @@ -554,12 +554,6 @@ 29 + INIT_RADIX_TREE(tree, GFP_NOWAIT); 30 + } 31 + 32 + -static bool radix_tree_empty(struct radix_tree_root *tree) 33 + -{ 34 + - void *dummy; 35 + - return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0; 36 + -} 37 + - 38 + 39 + #if !defined(NV_USLEEP_RANGE_PRESENT) 40 + static void __sched usleep_range(unsigned long min, unsigned long max)
+5 -3
pkgs/os-specific/linux/nvidia-x11/default.nix
··· 12 12 13 13 let 14 14 15 - versionNumber = "361.45.11"; 15 + versionNumber = "367.35"; 16 16 17 17 # Policy: use the highest stable version as the default (on our master). 18 18 inherit (stdenv.lib) makeLibraryPath; ··· 28 28 if stdenv.system == "i686-linux" then 29 29 fetchurl { 30 30 url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run"; 31 - sha256 = "036v7bzh9zy7zvaz2wf7zsamrynbg1yr1dll7sf1l928w059i6pb"; 31 + sha256 = "05g36bxcfk21ab8b0ay3zy21k5nd71468p9y1nbflx7ghpx25jrq"; 32 32 } 33 33 else if stdenv.system == "x86_64-linux" then 34 34 fetchurl { 35 35 url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run"; 36 - sha256 = "1f8bxmf8cr3cgzxgap5ccb1yrqyrrdig19dp282y6z9xjq27l074"; 36 + sha256 = "0m4k8f0212l63h22wk6hgi8fbfsgxqih5mizsw4ixqqmjd75av4a"; 37 37 } 38 38 else throw "nvidia-x11 does not support platform ${stdenv.system}"; 39 39 ··· 52 52 gtkPath = optionalString (!libsOnly) (makeLibraryPath 53 53 [ gtk atk pango glib gdk_pixbuf cairo ] ); 54 54 programPath = makeLibraryPath [ xorg.libXv ]; 55 + 56 + patches = if versionAtLeast kernel.version "4.7" then [ ./365.35-kernel-4.7.patch ] else []; 55 57 56 58 buildInputs = [ perl nukeReferences ]; 57 59