- fix building with kernel 4.19 auto/th/xorg-driver-video-nvidia-legacy-390xx-390.87-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Oct 2018 13:04:19 +0000 (15:04 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Oct 2018 13:04:19 +0000 (15:04 +0200)
- rel 2

kernel-4.19.patch [new file with mode: 0644]
xorg-driver-video-nvidia-legacy-390xx.spec

diff --git a/kernel-4.19.patch b/kernel-4.19.patch
new file mode 100644 (file)
index 0000000..6b2e217
--- /dev/null
@@ -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);
+     }
index 6fe1e06..0ad972b 100644 (file)
@@ -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
This page took 0.563462 seconds and 4 git commands to generate.