summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mykola Orliuk <virkony@gmail.com> 2018-12-21 19:46:07 +0100
committerAvatar Heiko Becker <heirecka@exherbo.org> 2019-01-09 07:43:48 +0000
commit6ec3f13bfbee300f2611ba7a7d2fa70fdf28d75c (patch)
tree9a51db7458402b8e1c09b239d3573a61df8e8d3a
parenteaf0092047f0f17f5aac688c5f579157cb36abb9 (diff)
downloadhardware-6ec3f13bfbee300f2611ba7a7d2fa70fdf28d75c.tar.gz
hardware-6ec3f13bfbee300f2611ba7a7d2fa70fdf28d75c.tar.xz
nvidia-drivers: bump to 390.87 and fix linux 4.19
Patch tested against 4.16.2 and 4.19.12 kernel sources trees.
-rw-r--r--packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.87-linux-4.19.patch47
-rw-r--r--packages/x11-drivers/nvidia-drivers/nvidia-drivers-390.87.exheres-0 (renamed from packages/x11-drivers/nvidia-drivers/nvidia-drivers-390.77-r1.exheres-0)2
2 files changed, 49 insertions, 0 deletions
diff --git a/packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.87-linux-4.19.patch b/packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.87-linux-4.19.patch
new file mode 100644
index 0000000..531d1f1
--- /dev/null
+++ b/packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.87-linux-4.19.patch
@@ -0,0 +1,47 @@
+Source:
+ https://devtalk.nvidia.com/default/topic/1043938/
+ https://github.com/kugel-/evdi/commit/9c60542
+Upstream: NVidia legacy driver
+Reason: Fix compatibility with linux-4.19
+
+--- nvidia-390.87/kernel/nvidia-drm/nvidia-drm-conftest.h.orig 2018-12-21 19:09:28.372406905 +0100
++++ nvidia-390.87/kernel/nvidia-drm/nvidia-drm-conftest.h 2018-12-21 19:09:53.538943296 +0100
+@@ -54,5 +54,16 @@
+
+ #endif
+
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
++
++#define drm_connector_update_edid_property \
++ drm_mode_connector_update_edid_property
++
++#define drm_connector_attach_encoder \
++ drm_mode_connector_attach_encoder
++
++#endif
+
+ #endif /* defined(__NVIDIA_DRM_CONFTEST_H__) */
+--- nvidia-390.87/kernel/nvidia-drm/nvidia-drm-connector.c.orig 2018-12-21 19:11:48.595017977 +0100
++++ nvidia-390.87/kernel/nvidia-drm/nvidia-drm-connector.c 2018-12-21 19:12:09.691576676 +0100
+@@ -226,7 +226,7 @@
+
+
+ if (nv_connector->edid != NULL) {
+- drm_mode_connector_update_edid_property(
++ drm_connector_update_edid_property(
+ connector, nv_connector->edid);
+ }
+
+--- nvidia-390.87/kernel/nvidia-drm/nvidia-drm-encoder.c.orig 2018-12-21 19:10:37.612049194 +0100
++++ nvidia-390.87/kernel/nvidia-drm/nvidia-drm-encoder.c 2018-12-21 19:11:00.818596451 +0100
+@@ -216,7 +216,7 @@
+
+ /* Attach encoder and connector */
+
+- ret = drm_mode_connector_attach_encoder(connector, encoder);
++ ret = drm_connector_attach_encoder(connector, encoder);
+
+ if (ret != 0) {
+ NV_DRM_DEV_LOG_ERR(
diff --git a/packages/x11-drivers/nvidia-drivers/nvidia-drivers-390.77-r1.exheres-0 b/packages/x11-drivers/nvidia-drivers/nvidia-drivers-390.87.exheres-0
index cba0c32..857fecc 100644
--- a/packages/x11-drivers/nvidia-drivers/nvidia-drivers-390.77-r1.exheres-0
+++ b/packages/x11-drivers/nvidia-drivers/nvidia-drivers-390.87.exheres-0
@@ -5,3 +5,5 @@ require nvidia-drivers-legacy
PLATFORMS="~amd64 ~x86"
+DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}/${PNV}-linux-4.19.patch" )
+