mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 02:42:56 +02:00
nvidia390: import patch for linux 6.0
This commit is contained in:
parent
7b28f321ee
commit
83bb800262
2 changed files with 48 additions and 1 deletions
46
srcpkgs/nvidia390/patches/kernel-6.0.patch
Normal file
46
srcpkgs/nvidia390/patches/kernel-6.0.patch
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
From 17bed78791d6f311c83ff1794d085b18c9f89730 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Joan Bruguera <joanbrugueram@gmail.com>
|
||||||
|
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 <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/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 <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 *);
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
|
@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 400, 500 series)"
|
||||||
|
|
||||||
pkgname=nvidia390
|
pkgname=nvidia390
|
||||||
version=390.154
|
version=390.154
|
||||||
revision=1
|
revision=2
|
||||||
maintainer="Andrew Benson <abenson+void@gmail.com>"
|
maintainer="Andrew Benson <abenson+void@gmail.com>"
|
||||||
license="custom:NVIDIA Proprietary"
|
license="custom:NVIDIA Proprietary"
|
||||||
homepage="https://www.nvidia.com/en-us/drivers/unix/"
|
homepage="https://www.nvidia.com/en-us/drivers/unix/"
|
||||||
|
@ -28,6 +28,7 @@ else
|
||||||
distfiles="http://uk.download.nvidia.com/XFree86/Linux-x86_64/${version}/${_pkg}.run"
|
distfiles="http://uk.download.nvidia.com/XFree86/Linux-x86_64/${version}/${_pkg}.run"
|
||||||
checksum=20a10d71b13e03924a26b822d80884d961a8e2c61564645049d727f7d5a814ec
|
checksum=20a10d71b13e03924a26b822d80884d961a8e2c61564645049d727f7d5a814ec
|
||||||
fi
|
fi
|
||||||
|
patch_args="-Np1 --directory=${XBPS_BUILDDIR}/${pkgname}-${version}/${_pkg}/kernel"
|
||||||
|
|
||||||
subpackages="nvidia390-gtklibs nvidia390-dkms nvidia390-opencl nvidia390-libs"
|
subpackages="nvidia390-gtklibs nvidia390-dkms nvidia390-opencl nvidia390-libs"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue