From 07a57b42a0b763127bd2dc4a7fc9f1d15179cad6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 16 Oct 2022 19:04:20 +0100 Subject: Revert "Revert "x11-drivers/nvidia-drivers-dkms (390 && 470) : add kernel 6.0 compat"" This reverts commit 2267a871d927432c30d4694c22b16b67c18e6cf6. --- .../nvidia-drivers-dkms/files/390-kernel6.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sys-kernel/nvidia-drivers-dkms/files/390-kernel6.patch (limited to 'sys-kernel/nvidia-drivers-dkms/files/390-kernel6.patch') diff --git a/sys-kernel/nvidia-drivers-dkms/files/390-kernel6.patch b/sys-kernel/nvidia-drivers-dkms/files/390-kernel6.patch new file mode 100644 index 00000000..a8cf8d7c --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/files/390-kernel6.patch @@ -0,0 +1,46 @@ +From 17bed78791d6f311c83ff1794d085b18c9f89730 Mon Sep 17 00:00:00 2001 +From: Joan Bruguera +Date: Wed, 3 Aug 2022 00:56:57 +0200 +Subject: [PATCH] Tentative fix for NVIDIA 470.141.03 driver for Linux 6.0-rc1 + +--- + nvidia-drm/nvidia-drm-helper.c | 5 +++++ + nvidia/nv-acpi.c | 5 ++++- + nvidia/nv.c | 3 ++- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/nvidia-drm/nvidia-drm-helper.c b/nvidia-drm/nvidia-drm-helper.c +index 3831180..fa03d51 100644 +--- a/nvidia-drm/nvidia-drm-helper.c ++++ b/nvidia-drm/nvidia-drm-helper.c +@@ -41,6 +41,11 @@ + #include + #endif + ++// Add header which is no longer indirectly referenced as of Linux 6.0-rc1 ++#if defined(NV_DRM_DRM_FRAMEBUFFER_H_PRESENT) ++#include ++#endif ++ + static void __nv_drm_framebuffer_put(struct drm_framebuffer *fb) + { + #if defined(NV_DRM_FRAMEBUFFER_GET_PRESENT) +diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c +index 2b7b988..76c36fa 100644 +--- a/nvidia/nv-acpi.c ++++ b/nvidia/nv-acpi.c +@@ -16,7 +16,10 @@ + + #include + +-#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) ++#include ++// 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 *); +-- +2.37.1 + -- cgit v1.2.3