commit e3d0637c657c5484d5aa222c253f841ad1adb4aa
Author: Leigh Scott <leigh123linux(a)googlemail.com>
Date: Mon Jun 3 10:35:09 2019 +0100
patch for kernel-5.1.0
nvidia-340xx-kmod.spec | 7 ++++++-
xf86-video-nvidia-legacy-02-fix-linux-5.1.patch | 15 +++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index 94921f8..5dfbba7 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -10,7 +10,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.107
# Taken over by kmodtool
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -19,6 +19,7 @@ URL:
http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: buildfix_kernel_5.0.patch
+Patch2: xf86-video-nvidia-legacy-02-fix-linux-5.1.patch
# needed for plague to make sure it builds for i586 and i686
#ExclusiveArch: i686 x86_64 armv7hl
@@ -46,6 +47,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
# patch loop
%patch0 -p1
%patch1 -p1
+%patch2 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -75,6 +77,9 @@ done
%{?akmod_install}
%changelog
+* Mon Jun 03 2019 Leigh Scott <leigh123linux(a)googlemail.com> - 1:340.107-8
+- patch for kernel-5.1.0
+
* Wed Mar 27 2019 Leigh Scott <leigh123linux(a)googlemail.com> - 1:340.107-7
- patch for kernel-5.0.0
diff --git a/xf86-video-nvidia-legacy-02-fix-linux-5.1.patch
b/xf86-video-nvidia-legacy-02-fix-linux-5.1.patch
new file mode 100644
index 0000000..160fc55
--- /dev/null
+++ b/xf86-video-nvidia-legacy-02-fix-linux-5.1.patch
@@ -0,0 +1,15 @@
+--- a/kernel/nv-drm.c
++++ b/kernel/nv-drm.c
+@@ -156,11 +156,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,
+