Revert "Partial fix for kernel 6.0, ACPI may be broken"

This reverts commit 1ab28be0c3.
This commit is contained in:
vnctdj 2022-12-11 16:13:37 +01:00
parent 1ab28be0c3
commit decfeaf179
3 changed files with 2 additions and 55 deletions

View file

@ -1,6 +1,6 @@
pkgbase = nvidia-390xx-utils
pkgver = 390.154
pkgrel = 2
pkgrel = 1
url = https://www.nvidia.com/
arch = x86_64
license = custom
@ -9,13 +9,11 @@ pkgbase = nvidia-390xx-utils
source = nvidia-390xx-utils.sysusers
source = nvidia-390xx.rules
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/390.154/NVIDIA-Linux-x86_64-390.154.run
source = kernel-6.0.patch
source = kernel-4.16.patch
b2sums = 8e24aea70b139185bd682b080d32aeda673e6e92b45a90e6f6e0d736674180400bc8bd1aa5c66b8d033fc9d5e0cfffed456a87298bd93a3afbbc30b8dc48c4e9
b2sums = c1da4ce5784e43385465913a95053a3e54f800aac6f1b49f33e2a77504d76da5e6db6ec7074fbe7ba5f52dcef9e1ebaa620942c33ff825a56caba5c9c8b0d1be
b2sums = 67e32932eeddda8fef667d25c34faf7b3a02f01cf9c15a97e5613bd44a0e8dcf7396e25399a52701f55dd18054c689720f237bb07d5bd580394d8dc8c9d05534
b2sums = e1bd2982f9697e74b593380acf471e03192cd8d20f14bd9b43e6d5925421c518278e75515a0713be25b29bf99d7ea49c770adf2cede79736a03f323d5ed96a33
b2sums = 35cccbce1728e80086ebe2304f6951535f8d2597259dcd88e9644363c7f52f74c6e11a2369cefd99c5fec79d86a8b9dbcb6fd8aa9c6f871e420585d60131f4ea
b2sums = a8234f542c2324ad698443e3decf7b6eacf3cb420b7aded787f102a8d32b64c2a8d45ea58e37a5e3b6f2f060f0cccd63d3a182065f57c606006d0ff8c7f6bb05
pkgname = nvidia-390xx-utils

View file

@ -7,7 +7,7 @@
pkgbase=nvidia-390xx-utils
pkgname=('nvidia-390xx-utils' 'opencl-nvidia-390xx' 'nvidia-390xx-dkms')
pkgver=390.154
pkgrel=2
pkgrel=1
arch=('x86_64')
url="https://www.nvidia.com/"
license=('custom')
@ -17,13 +17,11 @@ source=('nvidia-drm-outputclass.conf'
'nvidia-390xx-utils.sysusers'
'nvidia-390xx.rules'
"https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
kernel-6.0.patch
kernel-4.16.patch)
b2sums=('8e24aea70b139185bd682b080d32aeda673e6e92b45a90e6f6e0d736674180400bc8bd1aa5c66b8d033fc9d5e0cfffed456a87298bd93a3afbbc30b8dc48c4e9'
'c1da4ce5784e43385465913a95053a3e54f800aac6f1b49f33e2a77504d76da5e6db6ec7074fbe7ba5f52dcef9e1ebaa620942c33ff825a56caba5c9c8b0d1be'
'67e32932eeddda8fef667d25c34faf7b3a02f01cf9c15a97e5613bd44a0e8dcf7396e25399a52701f55dd18054c689720f237bb07d5bd580394d8dc8c9d05534'
'e1bd2982f9697e74b593380acf471e03192cd8d20f14bd9b43e6d5925421c518278e75515a0713be25b29bf99d7ea49c770adf2cede79736a03f323d5ed96a33'
'35cccbce1728e80086ebe2304f6951535f8d2597259dcd88e9644363c7f52f74c6e11a2369cefd99c5fec79d86a8b9dbcb6fd8aa9c6f871e420585d60131f4ea'
'a8234f542c2324ad698443e3decf7b6eacf3cb420b7aded787f102a8d32b64c2a8d45ea58e37a5e3b6f2f060f0cccd63d3a182065f57c606006d0ff8c7f6bb05')
create_links() {
@ -62,9 +60,6 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
# Gift for linux-rt guys
sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' dkms.conf
# Partial fix for kernel 6.0, ACPI has issues
patch -Np1 -i ../../kernel-6.0.patch
}
package_opencl-nvidia-390xx() {

View file

@ -1,46 +0,0 @@
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