summaryrefslogtreecommitdiff
path: root/sys-kernel/nvidia-drivers-dkms
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-13 23:43:42 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-13 23:43:42 +0100
commitff2e06ef30ab02c7857837130bfc22443c2747c6 (patch)
treeadaf4f11562f372a859a44cb05f4db768a5d5294 /sys-kernel/nvidia-drivers-dkms
parentcc9132cbbfb116ec951c9b88b95b20d464af8488 (diff)
sys-kernel/nvidia-drivers-dkms : revision bump, kernel 6.0 compatibility
Diffstat (limited to 'sys-kernel/nvidia-drivers-dkms')
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch43
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild (renamed from sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild)3
2 files changed, 45 insertions, 1 deletions
diff --git a/sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch b/sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch
new file mode 100644
index 00000000..372b6572
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch
@@ -0,0 +1,43 @@
+diff -Nur a/kernel/nvidia/nv-acpi.c b/kernel/nvidia/nv-acpi.c
+--- a/kernel/nvidia/nv-acpi.c 2022-06-30 20:05:22.000000000 +0100
++++ b/kernel/nvidia/nv-acpi.c 2022-10-13 23:34:09.841766070 +0100
+@@ -16,7 +16,10 @@
+
+ #include <linux/acpi.h>
+
+-#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED)
++#include <linux/version.h>
++// Rel.commit "ACPI: bus: Drop unused list heads from struct acpi_device" (Rafael J. Wysocki, 4 Jun 2022)
++// Disable ACPI support due to more GPL stuff (acpi_dev_for_each_child is only GPL-exported)
++#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0))
+ static NV_STATUS nv_acpi_extract_integer (const union acpi_object *, void *, NvU32, NvU32 *);
+ static NV_STATUS nv_acpi_extract_buffer (const union acpi_object *, void *, NvU32, NvU32 *);
+ static NV_STATUS nv_acpi_extract_package (const union acpi_object *, void *, NvU32, NvU32 *);
+diff -Nur a/kernel/nvidia/nv.c b/kernel/nvidia/nv.c
+--- a/kernel/nvidia/nv.c 2022-06-30 20:05:22.000000000 +0100
++++ b/kernel/nvidia/nv.c 2022-10-13 23:34:09.841766070 +0100
+@@ -5423,7 +5423,8 @@
+ {
+ NvU8 buf[8];
+
+-#if defined(NV_SEQ_READ_ITER_PRESENT)
++// FIXME: Avoid this code path because on Linux 6.0-rc1, init_sync_kiocb references a GPL symbol
++#if defined(NV_SEQ_READ_ITER_PRESENT) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0))
+ struct file *file;
+ ssize_t num_read;
+ struct kiocb kiocb;
+diff -Nur a/kernel/nvidia-drm/nvidia-drm-helper.c b/kernel/nvidia-drm/nvidia-drm-helper.c
+--- a/kernel/nvidia-drm/nvidia-drm-helper.c 2022-06-30 19:33:22.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-helper.c 2022-10-13 23:34:09.841766070 +0100
+@@ -41,6 +41,11 @@
+ #include <drm/drm_atomic_uapi.h>
+ #endif
+
++// Add header which is no longer indirectly referenced as of Linux 6.0-rc1
++#if defined(NV_DRM_DRM_FRAMEBUFFER_H_PRESENT)
++#include <drm/drm_framebuffer.h>
++#endif
++
+ static void __nv_drm_framebuffer_put(struct drm_framebuffer *fb)
+ {
+ #if defined(NV_DRM_FRAMEBUFFER_GET_PRESENT)
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild
index 63bdc6ce..a24cf3f6 100644
--- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild
@@ -23,7 +23,8 @@ RDEPEND="${DEPEND}
!!sys-kernel/nvidia-drivers-legacy-dkms"
PATCHES=(
- "${FILESDIR}"/fs62142.patch
+ "${FILESDIR}"/fs62142.patch
+ "${FILESDIR}"/kernel-6.0.patch
"${FILESDIR}"/dkms.patch
)