Skip to content

Commit

Permalink
nvidia: 340.101 -> 340.102 (#24694)
Browse files Browse the repository at this point in the history
(cherry picked from commit 71d8ce6)
It's just maintenance + patches to support newer kernels.
  • Loading branch information
calvertvl authored and vcunat committed Apr 16, 2017
1 parent 07bbc3e commit ebbabab
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkgs/os-specific/linux/nvidia-x11/default.nix
Expand Up @@ -22,11 +22,11 @@ in
};

legacy_340 = generic {
version = "340.101";
sha256_32bit = "0qmhkvxj6h63sayys9gldpafw5skpv8nsm2gxxb3pxcv7nfdlpjz";
sha256_64bit = "02k8j0xzxp2y4vay0kf982q382ny1i4g1kai93f2h5sak6sq3kyj";
settingsSha256 = "1mavbhff24n0jn154af152fp04njd505scdlxdm850h1ycb2i3g9";
persistencedSha256 = "1396bmmg9b1z805dzljgi2f219ji84wfnnifdbk32dpd5mrywjk0";
version = "340.102";
sha256_32bit = "0a484i37j00d0rc60q0bp6fd2wfrx2c4r32di9w5svqgmrfkvcb1";
sha256_64bit = "0nnz51d48a5fpnnmlz1znjp937k3nshdq46fw1qm8h00dkrd55ib";
settingsSha256 = "0nm5c06b09p6wsxpyfaqrzsnal3p1047lk6p4p2a0vksb7id9598";
persistencedSha256 = "1jwmggbph9zd8fj4syihldp2a5bxff7q1i2l9c55xz8cvk0rx08i";
useGLVND = false;
};

Expand Down
14 changes: 14 additions & 0 deletions pkgs/os-specific/linux/nvidia-x11/fs52243.patch
@@ -0,0 +1,14 @@
--- a/kernel/nv-drm.c
+++ b/kernel/nv-drm.c
@@ -115,7 +115,11 @@
};

static struct drm_driver nv_drm_driver = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_LEGACY,
+#else
.driver_features = DRIVER_GEM | DRIVER_PRIME,
+#endif
.load = nv_drm_load,
.unload = nv_drm_unload,
.fops = &nv_drm_fops,
14 changes: 13 additions & 1 deletion pkgs/os-specific/linux/nvidia-x11/generic.nix
Expand Up @@ -43,8 +43,20 @@ let
else throw "nvidia-x11 does not support platform ${stdenv.system}";

# patch to get the nvidia and nvidiaBeta driver to compile on kernel 4.10
patches = if libsOnly || versionOlder version "375"
patches = if libsOnly
then null
else if versionOlder version "340"
then null
else if versionOlder version "375"
then [
(fetchurl {
url = https://git.archlinux.org/svntogit/packages.git/plain/trunk/4.10.0_kernel.patch?h=packages/nvidia-340xx;
sha256 = "08k2phr9kawg6a3v88d4zkj7gdlih29gm5a1gmhpgmvd926k0z5l";
})
# from https://git.archlinux.org/svntogit/packages.git/plain/trunk/fs52243.patch?h=packages/nvidia-340xx
# with datestamps removed
./fs52243.patch
]
else [ (fetchurl {
url = https://git.archlinux.org/svntogit/packages.git/plain/trunk/kernel_4.10.patch?h=packages/nvidia; sha256 = "0zhpx3baq2pca2pmz1af5cp2nzjxjx0j9w5xrdy204mnv3v2708z";
}) ];
Expand Down

0 comments on commit ebbabab

Please sign in to comment.