commit e2932bb4631fbc4732331075db0ed5a2eeebe9a9
Author: Nerijus Baliūnas <nerijus(a)users.sourceforge.net>
Date: Tue Feb 13 15:51:52 2018 +0200
added patch for 4.15 kernel
4.15_kernel.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-304xx-kmod.spec | 7 ++++++-
2 files changed, 54 insertions(+), 1 deletion(-)
---
diff --git a/4.15_kernel.patch b/4.15_kernel.patch
new file mode 100644
index 0000000..fdac62f
--- /dev/null
+++ b/4.15_kernel.patch
@@ -0,0 +1,48 @@
+diff -ur a/kernel/nv.c b/kernel/nv.c
+--- a/kernel/nv.c 2017-09-14 23:51:09.000000000 +0300
++++ b/kernel/nv.c 2018-02-13 14:56:42.289490885 +0200
+@@ -301,7 +301,11 @@
+ #else
+ irqreturn_t nv_kern_isr(int, void *);
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ void nv_kern_rc_timer(unsigned long);
++#else
++void nv_kern_rc_timer(struct timer_list *t);
++#endif
+ #if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
+ static int nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
+ #endif
+@@ -2075,10 +2079,18 @@
+ }
+
+ void nv_kern_rc_timer(
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ unsigned long data
++#else
++ struct timer_list *t
++#endif
+ )
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ nv_linux_state_t *nvl = (nv_linux_state_t *) data;
++#else
++ nv_linux_state_t *nvl = from_timer(nvl, t, rc_timer);
++#endif
+ nv_state_t *nv = NV_STATE_PTR(nvl);
+
+ NV_CHECK_PCI_CONFIG_SPACE(nvl->timer_sp, nv, TRUE, TRUE, FALSE);
+@@ -3029,9 +3041,13 @@
+ return -1;
+
+ nv_printf(NV_DBG_INFO, "NVRM: initializing rc timer\n");
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ init_timer(&nvl->rc_timer);
+ nvl->rc_timer.function = nv_kern_rc_timer;
+ nvl->rc_timer.data = (unsigned long) nv;
++#else
++ timer_setup(&nvl->rc_timer, nv_kern_rc_timer, 0);
++#endif
+ nv->rc_timer_enabled = 1;
+ mod_timer(&nvl->rc_timer, jiffies + HZ); /* set our timeout for 1 second */
+ nv_printf(NV_DBG_INFO, "NVRM: rc timer initialized\n");
diff --git a/nvidia-304xx-kmod.spec b/nvidia-304xx-kmod.spec
index e47f611..89ee7b8 100644
--- a/nvidia-304xx-kmod.spec
+++ b/nvidia-304xx-kmod.spec
@@ -9,7 +9,7 @@
Name: nvidia-304xx-kmod
Version: 304.137
# Taken over by kmodtool
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -23,6 +23,7 @@ Source11: nvidia-304xx-kmodtool-excludekernel-filterfile
#
https://anonscm.debian.org/viewvc/pkg-nvidia/packages/nvidia-graphics-dri...
Patch0: disable-warnings.patch
Patch1: 4.14_kernel.patch
+Patch2: 4.15_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -51,6 +52,7 @@ do
pushd nvidiapkg-${arch}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
popd
done
@@ -84,6 +86,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Feb 13 2018 Nerijus Baliūnas <nerijus(a)users.sourceforge.net> - 304.137-4
+- patch for kernel-4.15
+
* Wed Dec 06 2017 Nerijus Baliūnas <nerijus(a)users.sourceforge.net> - 304.137-3
- patch for kernel-4.14