summaryrefslogtreecommitdiff
path: root/sys-kernel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-02-10 02:36:43 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-02-10 02:36:43 +0000
commit02aaac86e9ea9ba142f6fa6319f99a3fcbb79e9d (patch)
treef106ec86da4b9cd7ba6d5a611d1accb2b0ec2752 /sys-kernel
parentb0d0c1c98c65f2701a0e28fef938fe4beab49058 (diff)
sys-kernel/nvidia-drivers-dkms : add kernel 4.19 patch
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/kernel-4.19.patch49
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.87.ebuild1
2 files changed, 50 insertions, 0 deletions
diff --git a/sys-kernel/nvidia-drivers-dkms/files/kernel-4.19.patch b/sys-kernel/nvidia-drivers-dkms/files/kernel-4.19.patch
new file mode 100644
index 00000000..7ddae3b9
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/files/kernel-4.19.patch
@@ -0,0 +1,49 @@
+diff -Naru a/kernel/nvidia-drm/nvidia-drm-connector.c b/kernel/nvidia-drm/nvidia-drm-connector.c
+--- a/kernel/nvidia-drm/nvidia-drm-connector.c 2018-10-23 07:58:50.447742183 +0200
++++ b/kernel/nvidia-drm/nvidia-drm-connector.c 2018-10-23 08:00:13.927741400 +0200
+@@ -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 -Naru kernel.orig/nvidia-drm/nvidia-drm-encoder.c kernel/nvidia-drm/nvidia-drm-encoder.c
+--- a/kernel/nvidia-drm/nvidia-drm-encoder.c 2018-10-23 07:58:50.447742183 +0200
++++ b/kernel/nvidia-drm/nvidia-drm-encoder.c 2018-10-23 08:01:21.587740766 +0200
+@@ -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( \ No newline at end of file
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.87.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.87.ebuild
index b2446948..63254a53 100644
--- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.87.ebuild
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.87.ebuild
@@ -29,6 +29,7 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}"/kernel-4.16.patch
+ epatch "${FILESDIR}"/kernel-4.19.patch
epatch "${FILESDIR}"/"${P}"-conf.patch
epatch "${FILESDIR}"/"${PV}"-vmf_insert_pfn.patch
epatch "${FILESDIR}"/"${PV}"-ipmi_user.patch