commit 4504b7ed4651d4958b7802bf816c60b7f7b62844
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Mon Sep 30 07:39:52 2019 +0100
Patch for 5.4 pre rc kernel
linux_5.4.patch | 16 ++++++++++++++++
nvidia-kmod.spec | 7 ++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/linux_5.4.patch b/linux_5.4.patch
new file mode 100644
index 0000000..775f9f2
--- /dev/null
+++ b/linux_5.4.patch
@@ -0,0 +1,16 @@
+--- a/kernel/nvidia-drm/nvidia-drm-drv.c
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c
+@@ -659,7 +659,12 @@
+
+ static struct drm_driver nv_drm_driver = {
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
++ .driver_features = DRIVER_GEM | DRIVER_RENDER,
++#else
+ .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER,
++#endif
+
+ .gem_free_object = nv_drm_gem_free,
+
+
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 69f300c..8361547 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -12,12 +12,13 @@ Name: nvidia-kmod
Epoch: 3
Version: 435.21
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
License: Redistributable, no modification permitted
URL:
http://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
+Patch0: linux_5.4.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: x86_64
@@ -41,6 +42,7 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
--filterf
%setup -T -c
tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
# patch loop
+%patch0 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -68,6 +70,9 @@ done
%changelog
+* Mon Sep 30 2019 Leigh Scott <leigh123linux(a)googlemail.com> - 3:435.21-2
+- Patch for 5.4 pre rc kernel
+
* Fri Aug 30 2019 Leigh Scott <leigh123linux(a)googlemail.com> - 3:435.21-1
- Update to 435.21 release