mirror of
https://github.com/archlinux-jerry/nvidia-340xx
synced 2024-11-18 13:50:40 +08:00
Fix for kernel 6.2
This commit is contained in:
parent
fe2b38e66f
commit
e552e83277
3 changed files with 66 additions and 1 deletions
2
.SRCINFO
2
.SRCINFO
|
@ -23,6 +23,7 @@ pkgbase = nvidia-340xx
|
|||
source = 0009-kernel-5.17.patch
|
||||
source = 0010-kernel-5.18.patch
|
||||
source = 0011-kernel-6.0.patch
|
||||
source = 0012-kernel-6.2.patch
|
||||
b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028
|
||||
b2sums = 49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8
|
||||
b2sums = 7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1
|
||||
|
@ -36,6 +37,7 @@ pkgbase = nvidia-340xx
|
|||
b2sums = 0266e1baaac9ffbb94d9e916a693b1663d8686b15e970bfc30f7c51f051a0af9267aa5f6a12b68586c69d2e9796a1124488b3997ba4b26db1a5ac10a892f0df2
|
||||
b2sums = d69c9acbe550d5fccca68ca6a0d5095cbcaf887d2bc43704a8eb85533896692f16701eef07ead297881f596f5502c3105bb5bea77b2dcaf6c4dc2b49941f9f19
|
||||
b2sums = a411df83e0166366ecc7b9adfb374168487b6cfac5de0ee4a41f2c24bc234947c16f814b5c50bf36ba08c5b7e69b0c14378194f338bbe3fcae446375651d98b4
|
||||
b2sums = 47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821
|
||||
|
||||
pkgname = nvidia-340xx
|
||||
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
||||
|
|
61
0012-kernel-6.2.patch
Normal file
61
0012-kernel-6.2.patch
Normal file
|
@ -0,0 +1,61 @@
|
|||
--- a/kernel/conftest.sh 2023-02-24 10:35:02.633467500 +0100
|
||||
+++ b/kernel/conftest.sh 2023-02-24 11:13:02.892079164 +0100
|
||||
@@ -794,12 +794,19 @@
|
||||
|
||||
echo "$CONFTEST_PREAMBLE
|
||||
#include <linux/acpi.h>
|
||||
+ #include <linux/version.h>
|
||||
|
||||
acpi_op_remove conftest_op_remove_routine;
|
||||
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
+ void conftest_acpi_device_ops_remove(struct acpi_device *device) {
|
||||
+ conftest_op_remove_routine(device);
|
||||
+ }
|
||||
+ #else
|
||||
int conftest_acpi_device_ops_remove(struct acpi_device *device) {
|
||||
return conftest_op_remove_routine(device);
|
||||
- }" > conftest$$.c
|
||||
+ }
|
||||
+ #endif" > conftest$$.c
|
||||
|
||||
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
|
||||
rm -f conftest$$.c
|
||||
--- a/kernel/nv-acpi.c 2023-02-24 10:35:02.643467765 +0100
|
||||
+++ b/kernel/nv-acpi.c 2023-02-24 11:09:14.821580592 +0100
|
||||
@@ -26,8 +26,12 @@
|
||||
#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
|
||||
static int nv_acpi_remove_two_args(struct acpi_device *device, int type);
|
||||
#else
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
+static void nv_acpi_remove_one_arg(struct acpi_device *device);
|
||||
+#else
|
||||
static int nv_acpi_remove_one_arg(struct acpi_device *device);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
static void nv_acpi_event (acpi_handle, u32, void *);
|
||||
static acpi_status nv_acpi_find_methods (acpi_handle, u32, void *, void **);
|
||||
@@ -356,8 +360,12 @@
|
||||
#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
|
||||
static int nv_acpi_remove_two_args(struct acpi_device *device, int type)
|
||||
#else
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
+static void nv_acpi_remove_one_arg(struct acpi_device *device)
|
||||
+#else
|
||||
static int nv_acpi_remove_one_arg(struct acpi_device *device)
|
||||
#endif
|
||||
+#endif
|
||||
{
|
||||
/*
|
||||
* This function will cause RM to relinquish control of the VGA ACPI device.
|
||||
@@ -407,7 +415,9 @@
|
||||
device->driver_data = NULL;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
|
||||
return status;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void nv_acpi_event(acpi_handle handle, u32 event_type, void *data)
|
4
PKGBUILD
4
PKGBUILD
|
@ -28,6 +28,7 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Li
|
|||
0009-kernel-5.17.patch
|
||||
0010-kernel-5.18.patch
|
||||
0011-kernel-6.0.patch
|
||||
0012-kernel-6.2.patch
|
||||
)
|
||||
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
|
||||
'49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
|
||||
|
@ -41,7 +42,8 @@ b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb
|
|||
'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
|
||||
'0266e1baaac9ffbb94d9e916a693b1663d8686b15e970bfc30f7c51f051a0af9267aa5f6a12b68586c69d2e9796a1124488b3997ba4b26db1a5ac10a892f0df2'
|
||||
'd69c9acbe550d5fccca68ca6a0d5095cbcaf887d2bc43704a8eb85533896692f16701eef07ead297881f596f5502c3105bb5bea77b2dcaf6c4dc2b49941f9f19'
|
||||
'a411df83e0166366ecc7b9adfb374168487b6cfac5de0ee4a41f2c24bc234947c16f814b5c50bf36ba08c5b7e69b0c14378194f338bbe3fcae446375651d98b4')
|
||||
'a411df83e0166366ecc7b9adfb374168487b6cfac5de0ee4a41f2c24bc234947c16f814b5c50bf36ba08c5b7e69b0c14378194f338bbe3fcae446375651d98b4'
|
||||
'47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821')
|
||||
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
|
||||
|
||||
# default is 'linux' substitute custom name here
|
||||
|
|
Loading…
Reference in a new issue