nvidia: added set_busid fix for kernels 3.18+, fixes FS#1139

This commit is contained in:
Matt Housh 2015-02-13 14:31:36 -06:00
parent 018bd49288
commit 017ee6d79d
3 changed files with 19 additions and 2 deletions

View File

@ -1,2 +1,3 @@
4511024cc556d0c6e7c467b6789524e2 90-nvidia-uvm.rules
9ca9f07f91361362f304ca8317ddd453 NVIDIA-Linux-x86_64-346.35-no-compat32.run
07e8f8a60f3be17700de4451a2737ede nvidia-3.18.patch

View File

@ -5,14 +5,16 @@
name=nvidia
version=346.35
release=1
release=2
source=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version-no-compat32.run \
90-nvidia-uvm.rules)
90-nvidia-uvm.rules $name-3.18.patch)
build() {
sh NVIDIA-Linux-x86_64-$version-no-compat32.run --extract-only
cd NVIDIA-Linux-x86_64-$version-no-compat32
patch -p1 -i $SRC/$name-3.18.patch
# libraries
install -d $PKG/usr/lib/{tls,vdpau}
install -m 0755 libGL.so.$version $PKG/usr/lib

14
nvidia/nvidia-3.18.patch Normal file
View File

@ -0,0 +1,14 @@
diff -urN NVIDIA-Linux-x86_64-346.35-no-compat32.orig/kernel/nv-drm.c NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-drm.c
--- NVIDIA-Linux-x86_64-346.35-no-compat32.orig/kernel/nv-drm.c 2015-01-10 22:30:46.000000000 -0600
+++ NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-drm.c 2015-02-13 14:26:12.880988829 -0600
@@ -128,6 +128,10 @@
.gem_prime_vmap = nv_gem_prime_vmap,
.gem_prime_vunmap = nv_gem_prime_vunmap,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
+ .set_busid = drm_pci_set_busid,
+ #endif
+
.name = "nvidia-drm",
.desc = "NVIDIA DRM driver",
.date = "20130102",