Skip to content

Commit

Permalink
Merge pull request #18330 from grahamc/nvidia-x11
Browse files Browse the repository at this point in the history
nvidia-x11 fixes from master to release-16.03
  • Loading branch information
grahamc committed Sep 6, 2016
2 parents cbb1774 + fa94321 commit d8bade9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
40 changes: 40 additions & 0 deletions pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch
Original file line number Diff line number Diff line change
@@ -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)
8 changes: 5 additions & 3 deletions pkgs/os-specific/linux/nvidia-x11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}";

Expand All @@ -53,6 +53,8 @@ stdenv.mkDerivation {
[ gtk atk pango glib gdk_pixbuf cairo ] );
programPath = makeLibraryPath [ xorg.libXv ];

patches = if (!libsOnly) && (versionAtLeast kernel.dev.version "4.7") then [ ./365.35-kernel-4.7.patch ] else [];

buildInputs = [ perl nukeReferences ];

disallowedReferences = if libsOnly then [] else [ kernel.dev ];
Expand Down

0 comments on commit d8bade9

Please sign in to comment.