nvidia340: add patch to fix building with linux-5.0
This commit is contained in:
parent
b21b92f6e0
commit
86a86e4d41
|
@ -0,0 +1,45 @@
|
|||
--- 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 <linux/version.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
|
||||
+
|
||||
+
|
||||
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 <linux/version.h>
|
||||
|
||||
#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;
|
||||
|
|
@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 8, 9, 9M, 100, 100M, 200, 300 series)"
|
|||
|
||||
pkgname=nvidia340
|
||||
version=340.107
|
||||
revision=1
|
||||
revision=2
|
||||
maintainer="Juan RP <xtraeme@voidlinux.org>"
|
||||
license="Proprietary NVIDIA license"
|
||||
homepage="http://www.nvidia.com"
|
||||
|
@ -41,6 +41,7 @@ do_extract() {
|
|||
do_configure() {
|
||||
cd ${_pkg}
|
||||
patch -p0 < ${FILESDIR}/kernel-4.11.patch
|
||||
patch -p0 < ${FILESDIR}/kernel-5.0.patch
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
|
Loading…
Reference in New Issue