commit edd256f4f4413464eab3121e2af427a361c661b2
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Wed Oct 10 17:38:10 2018 +0100
Patch for 4.19 kernel
4.19_kernel.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-390xx-kmod.spec | 7 ++++++-
2 files changed, 55 insertions(+), 1 deletion(-)
---
diff --git a/4.19_kernel.patch b/4.19_kernel.patch
new file mode 100644
index 0000000..beeeb78
--- /dev/null
+++ b/4.19_kernel.patch
@@ -0,0 +1,49 @@
+--- a/kernel/nvidia-drm/nvidia-drm-encoder.c
++++ b/kernel/nvidia-drm/nvidia-drm-encoder.c
+@@ -35,6 +35,8 @@
+ #include <drm/drm_atomic.h>
+ #include <drm/drm_atomic_helper.h>
+
++#include <linux/version.h>
++
+ static void nv_drm_encoder_destroy(struct drm_encoder *encoder)
+ {
+ struct nv_drm_encoder *nv_encoder = to_nv_encoder(encoder);
+@@ -215,8 +217,11 @@
+ }
+
+ /* Attach encoder and connector */
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
++ ret = drm_connector_attach_encoder(connector, encoder);
++#else
+ ret = drm_mode_connector_attach_encoder(connector, encoder);
++#endif
+
+ if (ret != 0) {
+ NV_DRM_DEV_LOG_ERR(
+
+--- a/kernel/nvidia-drm/nvidia-drm-connector.c
++++ b/kernel/nvidia-drm/nvidia-drm-connector.c
+@@ -35,6 +35,8 @@
+ #include <drm/drm_atomic.h>
+ #include <drm/drm_atomic_helper.h>
+
++#include <linux/version.h>
++
+ static void nv_drm_connector_destroy(struct drm_connector *connector)
+ {
+ struct nv_drm_connector *nv_connector = to_nv_connector(connector);
+@@ -226,7 +228,11 @@
+
+
+ if (nv_connector->edid != NULL) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
++ drm_connector_update_edid_property(
++#else
+ drm_mode_connector_update_edid_property(
++#endif
+ connector, nv_connector->edid);
+ }
+
+
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index d25e29e..fdcfd2a 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -10,7 +10,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.87
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -19,6 +19,7 @@ URL:
http://www.nvidia.com/
Source11: nvidia-390xx-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
+Patch2: 4.19_kernel.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -44,6 +45,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%%___*}
@@ -71,6 +73,9 @@ done
%changelog
+* Wed Oct 10 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 3:390.87-2
+- Patch for 4.19 kernel
+
* Sun Sep 23 2018 Richard Shaw <hobbes1069(a)gmail.com> - 3:390.87-1
- Update to 390.87.