From 5d4a958258c01d116fa28447995de13c3d10d135 Mon Sep 17 00:00:00 2001 From: Stefano Ragni Date: Fri, 3 Jan 2020 01:59:26 +0100 Subject: [PATCH] nvidia340: update to 340.108 --- srcpkgs/nvidia340/files/kernel-5.0.patch | 62 ------------------------ srcpkgs/nvidia340/files/kernel-5.1.patch | 16 ------ srcpkgs/nvidia340/files/kernel-5.3.patch | 49 ------------------- srcpkgs/nvidia340/template | 11 ++--- 4 files changed, 5 insertions(+), 133 deletions(-) delete mode 100644 srcpkgs/nvidia340/files/kernel-5.1.patch delete mode 100644 srcpkgs/nvidia340/files/kernel-5.3.patch diff --git a/srcpkgs/nvidia340/files/kernel-5.0.patch b/srcpkgs/nvidia340/files/kernel-5.0.patch index b6d43e370bcb79..9442a307e50f53 100644 --- a/srcpkgs/nvidia340/files/kernel-5.0.patch +++ b/srcpkgs/nvidia340/files/kernel-5.0.patch @@ -1,67 +1,5 @@ ---- kernel/os-interface.c 2019-03-05 22:53:13.298064826 +0100 -+++ kernel/os-interface.c 2019-03-05 23:04:09.064902532 +0100 -@@ -14,6 +14,19 @@ - #include "os-interface.h" - #include "nv-linux.h" - -+#include -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) -+static inline void do_gettimeofday(struct timeval *tv) { -+ struct timespec64 now; -+ -+ ktime_get_real_ts64(&now); -+ tv->tv_sec = now.tv_sec; -+ tv->tv_usec = now.tv_nsec/1000; -+} -+#endif -+ -+ - RM_STATUS NV_API_CALL os_disable_console_access(void) - { - NV_ACQUIRE_CONSOLE_SEM(); ---- kernel/nv-drm.c 2019-03-05 22:37:07.015611635 +0100 -+++ kernel/nv-drm.c 2019-03-05 22:54:46.448761250 +0100 -@@ -13,6 +13,7 @@ - #include "nv-misc.h" - #include "os-interface.h" - #include "nv-linux.h" -+#include - - #if defined(NV_DRM_AVAILABLE) - -@@ -251,8 +252,11 @@ - status = RM_ERR_OPERATING_SYSTEM; - goto done; - } -- -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) - drm_gem_object_unreference_unlocked(&nv_obj->base); -+#else -+ drm_gem_object_put_unlocked(&nv_obj->base); -+#endif - - status = RM_OK; - --- kernel/uvm/nvidia_uvm_lite.c 2019-09-10 16:26:28.674315544 +0200 +++ kernel/uvm/nvidia_uvm_lite.c 2019-09-10 16:28:05.224054277 +0200 -@@ -30,6 +30,16 @@ - #include "nvidia_uvm_lite_counters.h" - #include "ctrl2080mc.h" - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) -+static inline void do_gettimeofday(struct timeval *tv) { -+ struct timespec64 now; -+ -+ ktime_get_real_ts64(&now); -+ tv->tv_sec = now.tv_sec; -+ tv->tv_usec = now.tv_nsec/1000; -+} -+#endif -+ - // - // nvidia_uvm_lite.c - // This file contains code that is specific to the UVM-Lite mode of operation. @@ -820,8 +830,10 @@ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) diff --git a/srcpkgs/nvidia340/files/kernel-5.1.patch b/srcpkgs/nvidia340/files/kernel-5.1.patch deleted file mode 100644 index 5c133f54a3a4bb..00000000000000 --- a/srcpkgs/nvidia340/files/kernel-5.1.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Nur nv/kernel/nv-drm.c nv2/kernel/nv-drm.c ---- kernel/nv-drm.c 2018-05-25 06:16:20.000000000 +0200 -+++ kernel/nv-drm.c 2019-05-09 20:51:33.364278935 +0200 -@@ -146,11 +146,7 @@ - }; - - static struct drm_driver nv_drm_driver = { --#if defined(DRIVER_LEGACY) - .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, - diff --git a/srcpkgs/nvidia340/files/kernel-5.3.patch b/srcpkgs/nvidia340/files/kernel-5.3.patch deleted file mode 100644 index c51a41d5d8f9de..00000000000000 --- a/srcpkgs/nvidia340/files/kernel-5.3.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git kernel/nv-linux.h kernel/nv-linux.h -index 4043bf1..62f0874 100644 ---- kernel/nv-linux.h -+++ kernel/nv-linux.h -@@ -877,12 +877,21 @@ extern void *nv_stack_t_cache; - __ret; \ - }) - #elif (NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT == 3) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0) - #define NV_SMP_CALL_FUNCTION(func, info, wait) \ - ({ \ - int __ret = smp_call_function(func, info, wait); \ - __ret; \ - }) - #else -+#define NV_SMP_CALL_FUNCTION(func, info, wait) \ -+ ({ \ -+ int __ret = 0; \ -+ smp_call_function(func, info, wait); \ -+ __ret; \ -+ }) -+#endif -+#else - #error "NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT value unrecognized!" - #endif - #elif defined(CONFIG_SMP) -@@ -897,12 +906,21 @@ extern void *nv_stack_t_cache; - __ret; \ - }) - #elif (NV_ON_EACH_CPU_ARGUMENT_COUNT == 3) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0) - #define NV_ON_EACH_CPU(func, info, wait) \ - ({ \ - int __ret = on_each_cpu(func, info, wait); \ - __ret; \ - }) - #else -+#define NV_ON_EACH_CPU(func, info, wait) \ -+ ({ \ -+ int __ret = 0; \ -+ on_each_cpu(func, info, wait); \ -+ __ret; \ -+ }) -+#endif -+#else - #error "NV_ON_EACH_CPU_ARGUMENT_COUNT value unrecognized!" - #endif - #elif defined(CONFIG_SMP) - diff --git a/srcpkgs/nvidia340/template b/srcpkgs/nvidia340/template index 4401f3d121f16e..8416060755e2b3 100644 --- a/srcpkgs/nvidia340/template +++ b/srcpkgs/nvidia340/template @@ -3,8 +3,8 @@ _desc="NVIDIA drivers (GeForce 8, 9, 9M, 100, 100M, 200, 300 series)" pkgname=nvidia340 -version=340.107 -revision=8 +version=340.108 +revision=1 maintainer="Orphaned " license="custom:NVIDIA proprietary" homepage="http://www.nvidia.com" @@ -24,11 +24,11 @@ subpackages="${pkgname}-dkms ${pkgname}-opencl ${pkgname}-libs" if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then _pkg="NVIDIA-Linux-x86-${version}" distfiles="http://us.download.nvidia.com/XFree86/Linux-x86/${version}/${_pkg}.run" - checksum=8d8bd2b04019eaa55d848534e2dbdc460be918e7731ecd8da87199ef9c1a0856 + checksum=2032aad612d9f3af1aecf979cfdfe423d79aa76929ef8bf8d3a403076f507cca else _pkg="NVIDIA-Linux-x86_64-${version}-no-compat32" distfiles="http://us.download.nvidia.com/XFree86/Linux-x86_64/${version}/${_pkg}.run" - checksum=6dc6f183c69c414670d8adef0286a2362eedd6e16ec6dfae811e48ea4a4505dc + checksum=995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77 fi do_extract() { @@ -42,8 +42,6 @@ do_patch() { cd ${_pkg} patch -p0 < ${FILESDIR}/kernel-4.11.patch patch -p0 < ${FILESDIR}/kernel-5.0.patch - patch -p0 < ${FILESDIR}/kernel-5.1.patch - patch -p0 < ${FILESDIR}/kernel-5.3.patch } do_install() { @@ -215,6 +213,7 @@ nvidia340-opencl_package() { nvidia340-libs_package() { short_desc="${_desc} - libraries" provides="libGL-7.11_1 libEGL-7.11_1 libGLES-7.11_1 libglvnd-1.3.0_1" + shlib_provides="libGLX.so.0 libOpenGL.so.0" replaces="libGL>=0 libEGL>=0 libGLES>=0 libglvnd>=0" pkg_install() { vmove usr/lib