diff options
Diffstat (limited to 'abs/core/nvidia')
-rw-r--r-- | abs/core/nvidia/PKGBUILD | 22 | ||||
-rw-r--r-- | abs/core/nvidia/fix-abi.patch | 12 | ||||
-rw-r--r-- | abs/core/nvidia/kernel-4.16.patch | 33 |
3 files changed, 49 insertions, 18 deletions
diff --git a/abs/core/nvidia/PKGBUILD b/abs/core/nvidia/PKGBUILD index 21247b9..7d3fe9c 100644 --- a/abs/core/nvidia/PKGBUILD +++ b/abs/core/nvidia/PKGBUILD @@ -5,17 +5,19 @@ pkgbase=nvidia pkgname=(nvidia nvidia-dkms) -pkgver=387.22 +pkgver=390.48 _extramodules=extramodules-4.9-ARCH -pkgrel=9 +pkgrel=10 pkgdesc="NVIDIA drivers for linux" arch=('x86_64') url="http://www.nvidia.com/" makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.9' 'linux-headers<4.10') license=('custom') options=('!strip') -source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run") -sha256sums=('2056b386f619ed096ee3c2267c495c6b00d1a2a4c933f0635befcf4e69c3856c') +source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" + kernel-4.16.patch) +sha256sums=('2d4bf72801f101a85df6fd1464021380ad51f5a30df05dadaf1fb546a175a441' + '622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385') _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" @@ -23,6 +25,10 @@ prepare() { sh "${_pkg}.run" --extract-only cd "${_pkg}" + # Restore phys_to_dma support (still needed for 396.18) + # https://bugs.archlinux.org/task/58074 + patch -Np1 -i ../kernel-4.16.patch + cp -a kernel kernel-dkms cd kernel-dkms sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf @@ -58,7 +64,9 @@ package_nvidia() { find "${pkgdir}" -name '*.ko' -exec gzip -n {} + echo "blacklist nouveau" | - install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia.conf" + install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf" + + install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE" } package_nvidia-dkms() { @@ -74,5 +82,7 @@ package_nvidia-dkms() { cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}" echo "blacklist nouveau" | - install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia.conf" + install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf" + + install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE" } diff --git a/abs/core/nvidia/fix-abi.patch b/abs/core/nvidia/fix-abi.patch deleted file mode 100644 index 5a3f8df..0000000 --- a/abs/core/nvidia/fix-abi.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r kernel/nvidia-drm/nvidia-drm-fence.c kernel-patched/nvidia-drm/nvidia-drm-fence.c ---- kernel/nvidia-drm/nvidia-drm-fence.c 2016-08-09 01:43:19.000000000 +0200 -+++ kernel-patched/nvidia-drm/nvidia-drm-fence.c 2016-08-25 14:31:34.419655564 +0200 -@@ -325,7 +325,7 @@ - struct nvidia_drm_gem_object *nv_gem; - }; - --static void nvidia_drm_gem_prime_soft_fence_event -+static void NVKMS_KAPI_CALL nvidia_drm_gem_prime_soft_fence_event - ( - void *dataPtr, - NvU32 dataU32 diff --git a/abs/core/nvidia/kernel-4.16.patch b/abs/core/nvidia/kernel-4.16.patch new file mode 100644 index 0000000..6717281 --- /dev/null +++ b/abs/core/nvidia/kernel-4.16.patch @@ -0,0 +1,33 @@ +diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h +index 10fc418..22ef968 100644 +--- a/kernel/common/inc/nv-linux.h ++++ b/kernel/common/inc/nv-linux.h +@@ -175,7 +175,11 @@ static inline uid_t __kuid_val(kuid_t uid) + + #if defined(NV_VM_INSERT_PAGE_PRESENT) + #include <linux/pagemap.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) + #include <linux/dma-mapping.h> ++#else ++#include <linux/dma-direct.h> ++#endif + #endif + + #if defined(CONFIG_SWIOTLB) && defined(NVCPU_AARCH64) +diff --git a/kernel/conftest.sh b/kernel/conftest.sh +index b23dbb4..42dc576 100755 +--- a/kernel/conftest.sh ++++ b/kernel/conftest.sh +@@ -1906,7 +1906,12 @@ compile_test() { + # Determine if the phys_to_dma function is present. + # + CODE=" ++ #include <linux/version.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) + #include <linux/dma-mapping.h> ++#else ++ #include <linux/dma-direct.h> ++#endif + void conftest_phys_to_dma(void) { + phys_to_dma(); + }" |