[packages/xorg-driver-video-nvidia-legacy-390xx] - fix building with kernel 4.19 - rel 2

baggins baggins at pld-linux.org
Sat Oct 27 15:04:48 CEST 2018


commit 8daff547c30566d3826c32d9d65d577ac7bded16
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 27 15:04:19 2018 +0200

    - fix building with kernel 4.19
    - rel 2

 kernel-4.19.patch                          | 48 ++++++++++++++++++++++++++++++
 xorg-driver-video-nvidia-legacy-390xx.spec |  4 ++-
 2 files changed, 51 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index 6fe1e06..0ad972b 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -33,7 +33,7 @@ exit 1
 
 %define		no_install_post_check_so 1
 
-%define		rel	1
+%define		rel	2
 %define		pname	xorg-driver-video-nvidia-legacy-390xx
 Summary:	Linux Drivers for nVidia GeForce/Quadro Chips
 Summary(hu.UTF-8):	Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -55,6 +55,7 @@ Source4:	10-nvidia.conf
 Source5:	10-nvidia-modules.conf
 Patch0:		X11-driver-nvidia-GL.patch
 Patch1:		X11-driver-nvidia-desktop.patch
+Patch2:		kernel-4.19.patch
 URL:		http://www.nvidia.com/object/unix.html
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -268,6 +269,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %endif
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
diff --git a/kernel-4.19.patch b/kernel-4.19.patch
new file mode 100644
index 0000000..6b2e217
--- /dev/null
+++ b/kernel-4.19.patch
@@ -0,0 +1,48 @@
+--- NVIDIA-Linux-x86_64-390.87-no-compat32/kernel/nvidia-drm/nvidia-drm-encoder.c.orig	2018-08-22 02:55:29.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.87-no-compat32/kernel/nvidia-drm/nvidia-drm-encoder.c	2018-10-27 14:51:02.291106466 +0200
+@@ -30,6 +30,9 @@
+ #include "nvidia-drm-connector.h"
+ #include "nvidia-drm-crtc.h"
+ 
++#include <linux/version.h>
++#include <linux/utsname.h>
++
+ #include <drm/drm_crtc_helper.h>
+ 
+ #include <drm/drm_atomic.h>
+@@ -216,7 +219,11 @@
+ 
+     /* Attach encoder and connector */
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+     ret = drm_mode_connector_attach_encoder(connector, encoder);
++#else
++    ret = drm_connector_attach_encoder(connector, encoder);
++#endif
+ 
+     if (ret != 0) {
+         NV_DRM_DEV_LOG_ERR(
+--- NVIDIA-Linux-x86_64-390.87-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c~	2018-08-22 02:55:29.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.87-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c	2018-10-27 14:54:53.714379051 +0200
+@@ -30,6 +30,9 @@
+ #include "nvidia-drm-utils.h"
+ #include "nvidia-drm-encoder.h"
+ 
++#include <linux/version.h>
++#include <linux/utsname.h>
++
+ #include <drm/drm_crtc_helper.h>
+ 
+ #include <drm/drm_atomic.h>
+@@ -226,7 +229,11 @@
+ 
+ 
+     if (nv_connector->edid != NULL) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+         drm_mode_connector_update_edid_property(
++#else
++        drm_connector_update_edid_property(
++#endif
+             connector, nv_connector->edid);
+     }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/8daff547c30566d3826c32d9d65d577ac7bded16



More information about the pld-cvs-commit mailing list