From b47ea7cc1bec1fa32a14faf6a33ef0bca3006b76 Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Tue, 6 Nov 2018 18:33:41 +0100 Subject: [PATCH] nvidia390: add patch for kernel 4.19 --- srcpkgs/nvidia390/files/kernel-4.19.patch | 54 +++++++++++++++++++++++ srcpkgs/nvidia390/template | 7 ++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/nvidia390/files/kernel-4.19.patch diff --git a/srcpkgs/nvidia390/files/kernel-4.19.patch b/srcpkgs/nvidia390/files/kernel-4.19.patch new file mode 100644 index 00000000000..dfd9f283ff2 --- /dev/null +++ b/srcpkgs/nvidia390/files/kernel-4.19.patch @@ -0,0 +1,54 @@ +Source: Hoshpak +Upstream: no +Reason: mode infix was removed from the two functions in linux-4.19 +--- kernel/nvidia-drm/nvidia-drm-connector.c 2018-11-06 18:13:04.524177827 +0100 ++++ kernel/nvidia-drm/nvidia-drm-connector.c 2018-11-06 18:13:44.110540624 +0100 +@@ -30,6 +30,8 @@ + #include "nvidia-drm-utils.h" + #include "nvidia-drm-encoder.h" + ++#include ++ + #include + + #include +@@ -226,8 +228,13 @@ + + + if (nv_connector->edid != NULL) { +- drm_mode_connector_update_edid_property( +- connector, nv_connector->edid); ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) ++ drm_mode_connector_update_edid_property( ++ connector, nv_connector->edid); ++ #else ++ drm_connector_update_edid_property( ++ connector, nv_connector->edid); ++ #endif + } + + while (1) { +--- kernel/nvidia-drm/nvidia-drm-encoder.c 2018-11-06 18:12:59.580066311 +0100 ++++ kernel/nvidia-drm/nvidia-drm-encoder.c 2018-11-06 18:13:28.428920260 +0100 +@@ -30,6 +30,8 @@ + #include "nvidia-drm-connector.h" + #include "nvidia-drm-crtc.h" + ++#include ++ + #include + + #include +@@ -216,7 +218,11 @@ + + /* Attach encoder and connector */ + +- ret = drm_mode_connector_attach_encoder(connector, encoder); ++ #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( diff --git a/srcpkgs/nvidia390/template b/srcpkgs/nvidia390/template index 7c830f1252f..7e6313844e1 100644 --- a/srcpkgs/nvidia390/template +++ b/srcpkgs/nvidia390/template @@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 400, 500 series)" pkgname=nvidia390 version=390.87 -revision=1 +revision=2 maintainer="Juan RP " license="Proprietary NVIDIA license" homepage="http://www.nvidia.com" @@ -40,6 +40,11 @@ do_extract() { rm -f ${_pkg}.run } +do_configure() { + cd ${_pkg} + patch -p0 < ${FILESDIR}/kernel-4.19.patch +} + pre_install() { cd ${_pkg} cp nvidia_icd.json.template nvidia_icd.json