commit 549339ef7450e031bb65f7c12d0179b199bdd092
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Thu Nov 3 12:47:11 2022 +0000
Patch for 6.0 kernel
0001-backport-error-on-unknown-conftests.patch | 59 --
...kport-error-on-unknown-conftests-uvm-part.patch | 25 -
...t-nv_install_notifier-changes-from-418.30.patch | 126 +++++
0019-backport-acpi-changes-from-430.09.patch | 120 ++++
0020-backport-acpi-changes-from-455.23.04.patch | 61 ++
0021-backport-acpi-changes-from-510.85.02.patch | 615 +++++++++++++++++++++
0022-backport-acpi-changes-from-515.65.01.patch | 90 +++
...port-drm_frambuffer.h-changes-from-515.76.patch | 36 ++
kernel-5.11.patch | 348 ------------
kernel-5.12.patch | 47 --
kernel-5.13.patch | 447 ---------------
kernel-5.14.patch | 79 ---
kernel-5.18-uvm.patch | 38 --
kernel-5.18.patch | 94 ----
kernel-5.7.0-set-memory-array.patch | 83 ---
nvidia-390xx-kmod.spec | 59 +-
nvidia-470xx-fix-linux-5.17.patch | 37 --
nvidia-modeset-use-ARCH.o_binary.patch | 18 -
nvidia-use-ARCH.o_binary.patch | 22 -
use-kbuild-flags.patch | 48 --
use-kbuild-gcc-plugins.patch | 15 -
21 files changed, 1072 insertions(+), 1395 deletions(-)
---
diff --git a/0018-backport-nv_install_notifier-changes-from-418.30.patch
b/0018-backport-nv_install_notifier-changes-from-418.30.patch
new file mode 100644
index 0000000..7d311c5
--- /dev/null
+++ b/0018-backport-nv_install_notifier-changes-from-418.30.patch
@@ -0,0 +1,126 @@
+From 3c43ce4e0f2406b6411d0c9b29b383e8fb4e9c29 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe(a)debian.org>
+Date: Wed, 19 Oct 2022 13:49:43 +0200
+Subject: [PATCH] backport nv_install_notifier changes from 418.30
+
+---
+ nvidia/nv-acpi.c | 37 +++++++++++++++----------------------
+ 1 file changed, 15 insertions(+), 22 deletions(-)
+
+diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c
+index 6cfd400..d311e85 100644
+--- a/nvidia/nv-acpi.c
++++ b/nvidia/nv-acpi.c
+@@ -503,19 +503,19 @@ static int nv_acpi_match(struct acpi_device *device, struct
acpi_driver *driver)
+ #endif
+
+ /* Do the necessary allocations and install notifier "handler" on the
device-node "device" */
+-static NV_STATUS nv_install_notifier(struct acpi_handle *handle, acpi_notify_handler
handler)
+-{
++static nv_acpi_t* nv_install_notifier(struct acpi_handle *handle, acpi_notify_handler
handler)
++{
+ nvidia_stack_t *sp = NULL;
+ nv_acpi_t *pNvAcpiObject = NULL;
+ NV_STATUS rmStatus = NV_ERR_GENERIC;
+ acpi_status status = -1;
+
+ if (!handle)
+- return NV_ERR_GENERIC;
++ return NULL;
+
+ if (nv_kmem_cache_alloc_stack(&sp) != 0)
+ {
+- return NV_ERR_NO_MEMORY;
++ return NULL;
+ }
+
+ rmStatus = os_alloc_mem((void **) &pNvAcpiObject, sizeof(nv_acpi_t));
+@@ -533,32 +533,25 @@ static NV_STATUS nv_install_notifier(struct acpi_handle *handle,
acpi_notify_han
+ if (!ACPI_FAILURE(status))
+ {
+ pNvAcpiObject->notify_handler_installed = 1;
+- return NV_OK;
++ return pNvAcpiObject;
+ }
+
+-
+ return_error:
+-
+ nv_kmem_cache_free_stack(sp);
+ if (pNvAcpiObject)
+ os_free_mem((void *)pNvAcpiObject);
+- return NV_ERR_GENERIC;
+
++ return NULL;
+ }
+
+ /* Tear-down and remove whatever nv_install_notifier did */
+-static void nv_uninstall_notifier(struct acpi_device *device, acpi_notify_handler
handler)
++static void nv_uninstall_notifier(nv_acpi_t *pNvAcpiObject, acpi_notify_handler
handler)
+ {
+ acpi_status status;
+- nv_acpi_t *pNvAcpiObject = NULL;
+-
+- if (!device)
+- return;
+
+- pNvAcpiObject = device->driver_data;
+ if (pNvAcpiObject && pNvAcpiObject->notify_handler_installed)
+ {
+- status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
handler);
++ status = acpi_remove_notify_handler(pNvAcpiObject->handle,
ACPI_DEVICE_NOTIFY, handler);
+ if (ACPI_FAILURE(status))
+ {
+ nv_printf(NV_DBG_INFO,
+@@ -568,14 +561,12 @@ static void nv_uninstall_notifier(struct acpi_device *device,
acpi_notify_handle
+ {
+ nv_kmem_cache_free_stack(pNvAcpiObject->sp);
+ os_free_mem((void *)pNvAcpiObject);
+- device->driver_data = NULL;
+ }
+ }
+-
++
+ return;
+ }
+
+-
+ /*
+ * acpi methods init function.
+ * check if the NVIF, _DSM and WMMX methods are present in the acpi namespace.
+@@ -586,7 +577,6 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
+ {
+ #if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
+ struct acpi_device *device = NULL;
+- NV_STATUS rmStatus;
+ int retVal = -1;
+ #endif
+
+@@ -619,8 +609,10 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
+ nodes' structures. So nothing more to be done */
+ }
+
+- rmStatus = nv_install_notifier(device->handle, nv_acpi_event);
+- if (rmStatus != NV_OK)
++ device->driver_data = nv_install_notifier(device->handle,
nv_acpi_event);
++
++
++ if (!device->driver_data)
+ nvif_parent_gpu_handle = NULL;
+
+ } while (0);
+@@ -685,9 +677,10 @@ void NV_API_CALL nv_acpi_methods_uninit(void)
+ #if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
+ acpi_bus_get_device(nvif_parent_gpu_handle, &device);
+
+- nv_uninstall_notifier(device, nv_acpi_event);
++ nv_uninstall_notifier(device->driver_data, nv_acpi_event);
+ #endif
+
++ device->driver_data = NULL;
+ nvif_parent_gpu_handle = NULL;
+
+ return;
+--
+2.20.1
+
diff --git a/0019-backport-acpi-changes-from-430.09.patch
b/0019-backport-acpi-changes-from-430.09.patch
new file mode 100644
index 0000000..fd6b4c5
--- /dev/null
+++ b/0019-backport-acpi-changes-from-430.09.patch
@@ -0,0 +1,120 @@
+From 5d5ff8921ea0a8c72675d63b1caa9bc86394de03 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe(a)debian.org>
+Date: Wed, 19 Oct 2022 18:08:31 +0200
+Subject: [PATCH] backport acpi changes from 430.09
+
+---
+ nvidia/nv-acpi.c | 48 +++---------------------------------------------
+ 1 file changed, 3 insertions(+), 45 deletions(-)
+
+diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c
+index d311e85..423eb1d 100644
+--- a/nvidia/nv-acpi.c
++++ b/nvidia/nv-acpi.c
+@@ -37,11 +37,6 @@ static NV_STATUS nv_acpi_wmmx_method (NvU32, NvU8 *, NvU16 *);
+ static NV_STATUS nv_acpi_mxmi_method (NvU8 *, NvU16 *);
+ static NV_STATUS nv_acpi_mxms_method (NvU8 *, NvU16 *);
+
+-#if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH)
+-static int nv_acpi_match (struct acpi_device *, struct acpi_driver
*);
+-#endif
+-
+-#if defined(ACPI_VIDEO_HID) && defined(NV_ACPI_DEVICE_ID_HAS_DRIVER_DATA)
+ static const struct acpi_device_id nv_video_device_ids[] = {
+ {
+ .id = ACPI_VIDEO_HID,
+@@ -52,7 +47,6 @@ static const struct acpi_device_id nv_video_device_ids[] = {
+ .driver_data = 0,
+ },
+ };
+-#endif
+
+ static struct acpi_driver *nv_acpi_driver;
+ static acpi_handle nvif_handle = NULL;
+@@ -64,22 +58,13 @@ static acpi_handle mxms_handle = NULL;
+ static const struct acpi_driver nv_acpi_driver_template = {
+ .name = "NVIDIA ACPI Video Driver",
+ .class = "video",
+-#if defined(ACPI_VIDEO_HID)
+-#if defined(NV_ACPI_DEVICE_ID_HAS_DRIVER_DATA)
+ .ids = nv_video_device_ids,
+-#else
+- .ids = ACPI_VIDEO_HID,
+-#endif
+-#endif
+ .ops = {
+ .add = nv_acpi_add,
+ #if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) ||
(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
+ .remove = nv_acpi_remove_two_args,
+ #else
+ .remove = nv_acpi_remove_one_arg,
+-#endif
+-#if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH)
+- .match = nv_acpi_match,
+ #endif
+ },
+ };
+@@ -228,7 +213,7 @@ static int nv_acpi_add(struct acpi_device *device)
+ struct acpi_object_list control_argument_list = { 0, NULL };
+ nvidia_stack_t *sp = NULL;
+ struct list_head *node, *next;
+- nv_acpi_integer_t device_id = 0;
++ unsigned long long device_id = 0;
+ int device_counter = 0;
+
+ status = nv_kmem_cache_alloc_stack(&sp);
+@@ -397,7 +382,7 @@ static void nv_acpi_event(acpi_handle handle, u32 event_type, void
*data)
+ */
+ nv_acpi_t *pNvAcpiObject = data;
+ u32 event_val = 0;
+- nv_acpi_integer_t state;
++ unsigned long long state;
+ int status = 0;
+ int device_counter = 0;
+
+@@ -475,33 +460,6 @@ static void nv_acpi_event(acpi_handle handle, u32 event_type, void
*data)
+ // unsubscribe.
+ }
+
+-#if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH)
+-static int nv_acpi_match(struct acpi_device *device, struct acpi_driver *driver)
+-{
+- acpi_handle DOS_method_handler, DOD_method_handler;
+-
+- /*
+- *
+- * attempt to get handles to all of these objects
+- * _DOS = enable/disable output switching method
+- * _DOD = enumerate all devices attached to the display driver
+- *
+- * If handles are available, this is the VGA object.
+- *
+- */
+-
+- if ((!acpi_get_handle(device->handle, "_DOS", &DOS_method_handler))
&&
+- (!acpi_get_handle(device->handle, "_DOD",
&DOD_method_handler)))
+- {
+- nv_printf(NV_DBG_INFO, "NVRM: nv_acpi_match: VGA ACPI device
detected.\n");
+-
+- return 0;
+- }
+- else
+- return (-ENODEV);
+-}
+-#endif
+-
+ /* Do the necessary allocations and install notifier "handler" on the
device-node "device" */
+ static nv_acpi_t* nv_install_notifier(struct acpi_handle *handle, acpi_notify_handler
handler)
+ {
+@@ -1227,7 +1185,7 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ union acpi_object ddc_arg0 = { ACPI_TYPE_INTEGER };
+ struct acpi_object_list input = { 1, &ddc_arg0 };
+ struct list_head *node, *next;
+- nv_acpi_integer_t device_id = 0;
++ unsigned long long device_id = 0;
+ NvU32 i;
+ acpi_handle dev_handle = NULL;
+ acpi_handle lcd_dev_handle = NULL;
+--
+2.20.1
+
diff --git a/0020-backport-acpi-changes-from-455.23.04.patch
b/0020-backport-acpi-changes-from-455.23.04.patch
new file mode 100644
index 0000000..b8a70f1
--- /dev/null
+++ b/0020-backport-acpi-changes-from-455.23.04.patch
@@ -0,0 +1,61 @@
+From ce2b65fcc7a5c2c235e3d2058e3e17e97b8b654a Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe(a)debian.org>
+Date: Wed, 19 Oct 2022 22:15:29 +0200
+Subject: [PATCH] backport acpi changes from 455.23.04
+
+---
+ nvidia/nv-acpi.c | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c
+index 423eb1d..78949af 100644
+--- a/nvidia/nv-acpi.c
++++ b/nvidia/nv-acpi.c
+@@ -1185,7 +1185,6 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ union acpi_object ddc_arg0 = { ACPI_TYPE_INTEGER };
+ struct acpi_object_list input = { 1, &ddc_arg0 };
+ struct list_head *node, *next;
+- unsigned long long device_id = 0;
+ NvU32 i;
+ acpi_handle dev_handle = NULL;
+ acpi_handle lcd_dev_handle = NULL;
+@@ -1217,6 +1216,7 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+
+ list_for_each_safe(node, next, &device->children)
+ {
++ unsigned long long device_id = 0;
+ struct acpi_device *dev =
+ list_entry(node, struct acpi_device, node);
+
+@@ -1228,15 +1228,21 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ /* Couldnt query device_id for this device */
+ continue;
+
+- device_id = (device_id & 0xffff);
+-
+- if ((device_id == 0x0110) || (device_id == 0x0118) || (device_id == 0x0400)) /*
Only for an LCD*/
+- {
+- lcd_dev_handle = dev->handle;
+- nv_printf(NV_DBG_INFO, "NVRM: %s Found LCD: %x\n", __FUNCTION__,
device_id);
+- break;
++ switch (device_id & 0xffff) {
++ case 0x0110:
++ case 0x0118:
++ case 0x0400:
++ case 0xA420:
++ lcd_dev_handle = dev->handle;
++ nv_printf(NV_DBG_INFO, "NVRM: %s Found LCD: %x\n",
++ __FUNCTION__, device_id);
++ break;
++ default:
++ break;
+ }
+
++ if (lcd_dev_handle != NULL)
++ break;
+ }
+
+ if (lcd_dev_handle == NULL)
+--
+2.20.1
+
diff --git a/0021-backport-acpi-changes-from-510.85.02.patch
b/0021-backport-acpi-changes-from-510.85.02.patch
new file mode 100644
index 0000000..f490514
--- /dev/null
+++ b/0021-backport-acpi-changes-from-510.85.02.patch
@@ -0,0 +1,615 @@
+From 06e42830c1560d15a8c2cfa628bc85283df9e3e0 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe(a)debian.org>
+Date: Tue, 18 Oct 2022 22:32:41 +0200
+Subject: [PATCH] backport acpi changes from 510.85.02
+
+---
+ common/inc/nv-linux.h | 12 --
+ common/inc/nv-proto.h | 3 -
+ nvidia/nv-acpi.c | 440 ------------------------------------------
+ nvidia/nv.c | 16 --
+ 4 files changed, 471 deletions(-)
+
+diff --git a/common/inc/nv-linux.h b/common/inc/nv-linux.h
+index 8301299..4419883 100644
+--- a/common/inc/nv-linux.h
++++ b/common/inc/nv-linux.h
+@@ -1630,24 +1630,12 @@ extern struct semaphore nv_linux_devices_lock;
+ * and any other baggage we want to carry along
+ *
+ */
+-#define NV_MAXNUM_DISPLAY_DEVICES 8
+-
+-typedef struct
+-{
+- acpi_handle dev_handle;
+- int dev_id;
+-} nv_video_t;
+-
+ typedef struct
+ {
+ nvidia_stack_t *sp;
+ struct acpi_device *device;
+ struct acpi_handle *handle;
+-
+- nv_video_t pNvVideo[NV_MAXNUM_DISPLAY_DEVICES];
+-
+ int notify_handler_installed;
+- int default_display_mask;
+ } nv_acpi_t;
+
+ #endif
+diff --git a/common/inc/nv-proto.h b/common/inc/nv-proto.h
+index 4bc6815..d61134e 100644
+--- a/common/inc/nv-proto.h
++++ b/common/inc/nv-proto.h
+@@ -13,9 +13,6 @@
+
+ #include "nv-misc.h"
+
+-int nv_acpi_init (void);
+-int nv_acpi_uninit (void);
+-
+ #if !defined(NV_IRQ_HANDLER_T_PRESENT) || (NV_IRQ_HANDLER_T_ARGUMENT_COUNT == 3)
+ irqreturn_t nv_gvi_kern_isr (int, void *, struct pt_regs *);
+ #else
+diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c
+index 78949af..50ad4e9 100644
+--- a/nvidia/nv-acpi.c
++++ b/nvidia/nv-acpi.c
+@@ -21,15 +21,6 @@ static NV_STATUS nv_acpi_extract_buffer (const union acpi_object *,
void *, N
+ static NV_STATUS nv_acpi_extract_package (const union acpi_object *, void *, NvU32,
NvU32 *);
+ static NV_STATUS nv_acpi_extract_object (const union acpi_object *, void *, NvU32,
NvU32 *);
+
+-static int nv_acpi_add (struct acpi_device *);
+-
+-#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
+-static int nv_acpi_remove_one_arg(struct acpi_device *device);
+-#endif
+-
+-static void nv_acpi_event (acpi_handle, u32, void *);
+ static acpi_status nv_acpi_find_methods (acpi_handle, u32, void *, void **);
+ static NV_STATUS nv_acpi_nvif_method (NvU32, NvU32, void *, NvU16, NvU32 *, void
*, NvU16 *);
+
+@@ -37,38 +28,11 @@ static NV_STATUS nv_acpi_wmmx_method (NvU32, NvU8 *, NvU16 *);
+ static NV_STATUS nv_acpi_mxmi_method (NvU8 *, NvU16 *);
+ static NV_STATUS nv_acpi_mxms_method (NvU8 *, NvU16 *);
+
+-static const struct acpi_device_id nv_video_device_ids[] = {
+- {
+- .id = ACPI_VIDEO_HID,
+- .driver_data = 0,
+- },
+- {
+- .id = "",
+- .driver_data = 0,
+- },
+-};
+-
+-static struct acpi_driver *nv_acpi_driver;
+ static acpi_handle nvif_handle = NULL;
+-static acpi_handle nvif_parent_gpu_handle = NULL;
+ static acpi_handle wmmx_handle = NULL;
+ static acpi_handle mxmi_handle = NULL;
+ static acpi_handle mxms_handle = NULL;
+
+-static const struct acpi_driver nv_acpi_driver_template = {
+- .name = "NVIDIA ACPI Video Driver",
+- .class = "video",
+- .ids = nv_video_device_ids,
+- .ops = {
+- .add = nv_acpi_add,
+-#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) ||
(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
+- .remove = nv_acpi_remove_two_args,
+-#else
+- .remove = nv_acpi_remove_one_arg,
+-#endif
+- },
+-};
+-
+ static int nv_acpi_get_device_handle(nv_state_t *nv, acpi_handle *dev_handle)
+ {
+ nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+@@ -114,352 +78,6 @@ struct notifier_block acpi_nb = {
+ };
+ #endif
+
+-int nv_acpi_init(void)
+-{
+- /*
+- * This function will register the RM with the Linux
+- * ACPI subsystem.
+- */
+- int status;
+- nvidia_stack_t *sp = NULL;
+- NvU32 acpi_event_config = 0;
+- NV_STATUS rmStatus;
+-
+- status = nv_kmem_cache_alloc_stack(&sp);
+- if (status != 0)
+- {
+- return status;
+- }
+-
+- rmStatus = rm_read_registry_dword(sp, NULL, "NVreg",
+- NV_REG_REGISTER_FOR_ACPI_EVENTS, &acpi_event_config);
+- nv_kmem_cache_free_stack(sp);
+-
+- if ((rmStatus == NV_OK) && (acpi_event_config == 0))
+- return 0;
+-
+- if (nv_acpi_driver != NULL)
+- return -EBUSY;
+-
+- rmStatus = os_alloc_mem((void **)&nv_acpi_driver,
+- sizeof(struct acpi_driver));
+- if (rmStatus != NV_OK)
+- return -ENOMEM;
+-
+- memcpy((void *)nv_acpi_driver, (void *)&nv_acpi_driver_template,
+- sizeof(struct acpi_driver));
+-
+- status = acpi_bus_register_driver(nv_acpi_driver);
+- if (status < 0)
+- {
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_init: acpi_bus_register_driver() failed (%d)!\n",
status);
+- os_free_mem(nv_acpi_driver);
+- nv_acpi_driver = NULL;
+- }
+-
+-#if defined(NV_REGISTER_ACPI_NOTIFER_PRESENT)
+- register_acpi_notifier(&acpi_nb);
+-#endif
+-
+- return status;
+-}
+-
+-int nv_acpi_uninit(void)
+-{
+- nvidia_stack_t *sp = NULL;
+- NvU32 acpi_event_config = 0;
+- NV_STATUS rmStatus;
+- int rc;
+-
+-#if defined(NV_REGISTER_ACPI_NOTIFER_PRESENT)
+- unregister_acpi_notifier(&acpi_nb);
+-#endif
+-
+- rc = nv_kmem_cache_alloc_stack(&sp);
+- if (rc != 0)
+- {
+- return rc;
+- }
+-
+- rmStatus = rm_read_registry_dword(sp, NULL, "NVreg",
+- NV_REG_REGISTER_FOR_ACPI_EVENTS, &acpi_event_config);
+- nv_kmem_cache_free_stack(sp);
+-
+- if ((rmStatus == NV_OK) && (acpi_event_config == 0))
+- return 0;
+-
+- if (nv_acpi_driver == NULL)
+- return -ENXIO;
+-
+- acpi_bus_unregister_driver(nv_acpi_driver);
+- os_free_mem(nv_acpi_driver);
+-
+- nv_acpi_driver = NULL;
+-
+- return 0;
+-}
+-
+-static int nv_acpi_add(struct acpi_device *device)
+-{
+- /*
+- * This function will cause RM to initialize the things it needs for acpi
interaction
+- * on the display device.
+- */
+- int status = -1;
+- NV_STATUS rmStatus = NV_ERR_GENERIC;
+- nv_acpi_t *pNvAcpiObject = NULL;
+- union acpi_object control_argument_0 = { ACPI_TYPE_INTEGER };
+- struct acpi_object_list control_argument_list = { 0, NULL };
+- nvidia_stack_t *sp = NULL;
+- struct list_head *node, *next;
+- unsigned long long device_id = 0;
+- int device_counter = 0;
+-
+- status = nv_kmem_cache_alloc_stack(&sp);
+- if (status != 0)
+- {
+- return status;
+- }
+-
+- // allocate data structure we need
+- rmStatus = os_alloc_mem((void **) &pNvAcpiObject, sizeof(nv_acpi_t));
+- if (rmStatus != NV_OK)
+- {
+- nv_kmem_cache_free_stack(sp);
+- nv_printf(NV_DBG_ERRORS,
+- "NVRM: nv_acpi_add: failed to allocate ACPI device management
data!\n");
+- return -ENOMEM;
+- }
+-
+- os_mem_set((void *)pNvAcpiObject, 0, sizeof(nv_acpi_t));
+-
+- device->driver_data = pNvAcpiObject;
+- pNvAcpiObject->device = device;
+-
+- pNvAcpiObject->sp = sp;
+-
+- // grab handles to all the important nodes representing devices
+-
+- list_for_each_safe(node, next, &device->children)
+- {
+- struct acpi_device *dev =
+- list_entry(node, struct acpi_device, node);
+-
+- if (!dev)
+- continue;
+-
+- if (device_counter == NV_MAXNUM_DISPLAY_DEVICES)
+- {
+- nv_printf(NV_DBG_ERRORS,
+- "NVRM: nv_acpi_add: Total number of devices cannot exceed
%d\n",
+- NV_MAXNUM_DISPLAY_DEVICES);
+- break;
+- }
+-
+- status =
+- acpi_evaluate_integer(dev->handle, "_ADR", NULL,
&device_id);
+- if (ACPI_FAILURE(status))
+- /* Couldnt query device_id for this device */
+- continue;
+-
+- device_id = (device_id & 0xffff);
+-
+- if ((device_id != 0x100) && /* Not a known CRT device-id */
+- (device_id != 0x200) && /* Not a known TV device-id */
+- (device_id != 0x0110) && (device_id != 0x0118) && (device_id
!= 0x0400) && /* Not an LCD*/
+- (device_id != 0x0111) && (device_id != 0x0120) && (device_id
!= 0x0300)) /* Not a known DVI device-id */
+- {
+- /* This isnt a known device Id.
+- Do default switching on this system. */
+- pNvAcpiObject->default_display_mask = 1;
+- break;
+- }
+-
+- pNvAcpiObject->pNvVideo[device_counter].dev_id = device_id;
+- pNvAcpiObject->pNvVideo[device_counter].dev_handle = dev->handle;
+-
+- device_counter++;
+-
+- }
+-
+- // arg 0, bits 1:0, 0 = enable events
+- control_argument_0.integer.type = ACPI_TYPE_INTEGER;
+- control_argument_0.integer.value = 0x0;
+-
+- // listify it
+- control_argument_list.count = 1;
+- control_argument_list.pointer = &control_argument_0;
+-
+- // _DOS method takes 1 argument and returns nothing
+- status = acpi_evaluate_object(device->handle, "_DOS",
&control_argument_list, NULL);
+-
+- if (ACPI_FAILURE(status))
+- {
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_add: failed to enable display switch events
(%d)!\n", status);
+- }
+-
+- status = acpi_install_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
+- nv_acpi_event, pNvAcpiObject);
+-
+- if (ACPI_FAILURE(status))
+- {
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_add: failed to install event notification handler
(%d)!\n", status);
+- }
+- else
+- {
+- try_module_get(THIS_MODULE);
+- pNvAcpiObject->notify_handler_installed = 1;
+- }
+-
+- return 0;
+-}
+-
+-#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
+-static int nv_acpi_remove_one_arg(struct acpi_device *device)
+-#endif
+-{
+- /*
+- * This function will cause RM to relinquish control of the VGA ACPI device.
+- */
+- acpi_status status;
+- union acpi_object control_argument_0 = { ACPI_TYPE_INTEGER };
+- struct acpi_object_list control_argument_list = { 0, NULL };
+- nv_acpi_t *pNvAcpiObject = device->driver_data;
+-
+-
+- pNvAcpiObject->default_display_mask = 0;
+-
+- // arg 0, bits 1:0, 1 = disable events
+- control_argument_0.integer.type = ACPI_TYPE_INTEGER;
+- control_argument_0.integer.value = 0x1;
+-
+- // listify it
+- control_argument_list.count = 1;
+- control_argument_list.pointer = &control_argument_0;
+-
+- // _DOS method takes 1 argument and returns nothing
+- status = acpi_evaluate_object(device->handle, "_DOS",
&control_argument_list, NULL);
+-
+- if (ACPI_FAILURE(status))
+- {
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_remove: failed to disable display switch events
(%d)!\n", status);
+- }
+-
+- if (pNvAcpiObject->notify_handler_installed)
+- {
+- // remove event notifier
+- status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
nv_acpi_event);
+- }
+-
+- if (pNvAcpiObject->notify_handler_installed &&
+- ACPI_FAILURE(status))
+- {
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_remove: failed to remove event notification handler
(%d)!\n", status);
+- }
+- else
+- {
+- nv_kmem_cache_free_stack(pNvAcpiObject->sp);
+- os_free_mem((void *)pNvAcpiObject);
+- module_put(THIS_MODULE);
+- device->driver_data = NULL;
+- }
+-
+- return status;
+-}
+-
+-static void nv_acpi_event(acpi_handle handle, u32 event_type, void *data)
+-{
+- /*
+- * This function will handle acpi events from the linux kernel, used
+- * to detect notifications from the VGA device.
+- */
+- nv_acpi_t *pNvAcpiObject = data;
+- u32 event_val = 0;
+- unsigned long long state;
+- int status = 0;
+- int device_counter = 0;
+-
+- if (event_type == NVIF_DISPLAY_DEVICE_CHANGE_EVENT)
+- {
+- /* We are getting NVIF events on this machine. We arent putting a very
+- extensive handling in-place to communicate back with SBIOS, know
+- the next enabled devices, and then do the switch. We just
+- pass a default display switch event, so that X-driver decides
+- the switching policy itself. */
+- rm_system_event(pNvAcpiObject->sp, NV_SYSTEM_ACPI_DISPLAY_SWITCH_EVENT, 0);
+- }
+- if (event_type == ACPI_DISPLAY_DEVICE_CHANGE_EVENT)
+- {
+- if (pNvAcpiObject->default_display_mask != 1)
+- {
+- while ((device_counter < NV_MAXNUM_DISPLAY_DEVICES) &&
+- (pNvAcpiObject->pNvVideo[device_counter].dev_handle))
+- {
+- acpi_handle dev_handle =
pNvAcpiObject->pNvVideo[device_counter].dev_handle;
+- int dev_id = pNvAcpiObject->pNvVideo[device_counter].dev_id;
+-
+- status = acpi_evaluate_integer(dev_handle,
+- "_DGS",
+- NULL,
+- &state);
+- if (ACPI_FAILURE(status))
+- {
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_event: failed to query _DGS method for display
device 0x%x\n",
+- dev_id);
+- }
+- else if (state)
+- {
+- /* Check if the device is a CRT ...*/
+- if (dev_id == 0x0100)
+- {
+- event_val |= NV_HOTKEY_STATUS_DISPLAY_ENABLE_CRT;
+- }
+- /* device-id for a TV */
+- else if (dev_id == 0x0200)
+- {
+- event_val |= NV_HOTKEY_STATUS_DISPLAY_ENABLE_TV;
+- }
+- else if ((dev_id == 0x0110) || /* device id for internal LCD */
+- (dev_id == 0x0118) || /* alternate ACPI ID for the
+- internal LCD */
+- (dev_id == 0x0400)) /* ACPI spec 3.0 specified
+- device id for a internal LCD*/
+- {
+- event_val |= NV_HOTKEY_STATUS_DISPLAY_ENABLE_LCD;
+- }
+- else if ((dev_id == 0x0111) || /* the set
+- of possible device-ids for a DFP */
+- (dev_id == 0x0120) ||
+- (dev_id == 0x0300)) /* ACPI spec 3.0 specified
+- device id for non-LVDS DFP */
+- {
+- event_val |= NV_HOTKEY_STATUS_DISPLAY_ENABLE_DFP;
+- }
+- }
+- device_counter++;
+- }
+- }
+-
+- nv_printf(NV_DBG_INFO,
+- "NVRM: nv_acpi_event: Event-type 0x%x, Event-val 0x%x\n",
+- event_type, event_val);
+-
+- rm_system_event(pNvAcpiObject->sp, NV_SYSTEM_ACPI_DISPLAY_SWITCH_EVENT,
event_val);
+- }
+-
+- // no unsubscription or re-enable necessary. Once DOD has been set, we are go.
+- // once we are subscribed to ACPI events, we don't have to re-subscribe unless
+- // unsubscribe.
+-}
+-
+ /* Do the necessary allocations and install notifier "handler" on the
device-node "device" */
+ static nv_acpi_t* nv_install_notifier(struct acpi_handle *handle, acpi_notify_handler
handler)
+ {
+@@ -533,11 +151,6 @@ static void nv_uninstall_notifier(nv_acpi_t *pNvAcpiObject,
acpi_notify_handler
+
+ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
+ {
+-#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
+- struct acpi_device *device = NULL;
+- int retVal = -1;
+-#endif
+-
+ if (!handlesPresent) // Caller passed us invalid pointer.
+ return;
+
+@@ -549,32 +162,6 @@ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlesPresent)
+ if (nvif_handle)
+ {
+ *handlesPresent = NV_ACPI_NVIF_HANDLE_PRESENT;
+-#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
+- do
+- {
+- if (!nvif_parent_gpu_handle) /* unknown error */
+- break;
+-
+- retVal = acpi_bus_get_device(nvif_parent_gpu_handle, &device);
+-
+- if (ACPI_FAILURE(retVal) || !device)
+- break;
+-
+- if (device->driver_data)
+- {
+- nvif_parent_gpu_handle = NULL;
+- break; /* Someone else has already populated this device
+- nodes' structures. So nothing more to be done */
+- }
+-
+- device->driver_data = nv_install_notifier(device->handle,
nv_acpi_event);
+-
+-
+- if (!device->driver_data)
+- nvif_parent_gpu_handle = NULL;
+-
+- } while (0);
+-#endif
+ }
+
+ if (wmmx_handle)
+@@ -599,7 +186,6 @@ acpi_status nv_acpi_find_methods(
+ if (!acpi_get_handle(handle, "NVIF", &method_handle))
+ {
+ nvif_handle = method_handle;
+- nvif_parent_gpu_handle = handle;
+ }
+
+ if (!acpi_get_handle(handle, "WMMX", &method_handle))
+@@ -622,26 +208,10 @@ acpi_status nv_acpi_find_methods(
+
+ void NV_API_CALL nv_acpi_methods_uninit(void)
+ {
+- struct acpi_device *device = NULL;
+-
+ nvif_handle = NULL;
+ wmmx_handle = NULL;
+ mxmi_handle = NULL;
+ mxms_handle = NULL;
+-
+- if (nvif_parent_gpu_handle == NULL)
+- return;
+-
+-#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
+- acpi_bus_get_device(nvif_parent_gpu_handle, &device);
+-
+- nv_uninstall_notifier(device->driver_data, nv_acpi_event);
+-#endif
+-
+- device->driver_data = NULL;
+- nvif_parent_gpu_handle = NULL;
+-
+- return;
+ }
+
+ static NV_STATUS nv_acpi_extract_integer(
+@@ -1519,16 +1089,6 @@ static NV_STATUS nv_acpi_wmmx_method(
+
+ #else // NV_LINUX_ACPI_EVENTS_SUPPORTED
+
+-int nv_acpi_init(void)
+-{
+- return 0;
+-}
+-
+-int nv_acpi_uninit(void)
+-{
+- return 0;
+-}
+-
+ void NV_API_CALL nv_acpi_methods_init(NvU32 *handlePresent)
+ {
+ *handlePresent = 0;
+diff --git a/nvidia/nv.c b/nvidia/nv.c
+index 8fd90b6..a618635 100644
+--- a/nvidia/nv.c
++++ b/nvidia/nv.c
+@@ -2608,7 +2608,6 @@ nvidia_ctl_open(
+ nv_linux_state_t *nvl = &nv_ctl_device;
+ nv_state_t *nv = NV_STATE_PTR(nvl);
+ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
+- static int count = 0;
+
+ nv_printf(NV_DBG_INFO, "NVRM: nvidia_ctl_open\n");
+
+@@ -2622,13 +2621,6 @@ nvidia_ctl_open(
+ init_waitqueue_head(&nv_ctl_waitqueue);
+
+ nv->flags |= (NV_FLAG_OPEN | NV_FLAG_CONTROL);
+-
+- if ((nv_acpi_init() < 0) &&
+- (count++ < NV_MAX_RECURRING_WARNING_MESSAGES))
+- {
+- nv_printf(NV_DBG_ERRORS,
+- "NVRM: failed to register with the ACPI subsystem!\n");
+- }
+ }
+
+ NV_ATOMIC_INC(nvl->usage_count);
+@@ -2652,7 +2644,6 @@ nvidia_ctl_close(
+ nv_state_t *nv = NV_STATE_PTR(nvl);
+ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
+ nvidia_stack_t *sp = nvfp->sp;
+- static int count = 0;
+ unsigned int i;
+
+ nv_printf(NV_DBG_INFO, "NVRM: nvidia_ctl_close\n");
+@@ -2669,13 +2660,6 @@ nvidia_ctl_close(
+ if (NV_ATOMIC_DEC_AND_TEST(nvl->usage_count))
+ {
+ nv->flags &= ~NV_FLAG_OPEN;
+-
+- if ((nv_acpi_uninit() < 0) &&
+- (count++ < NV_MAX_RECURRING_WARNING_MESSAGES))
+- {
+- nv_printf(NV_DBG_ERRORS,
+- "NVRM: failed to unregister from the ACPI subsystem!\n");
+- }
+ }
+ up(&nvl->ldata_lock);
+
+--
+2.20.1
+
diff --git a/0022-backport-acpi-changes-from-515.65.01.patch
b/0022-backport-acpi-changes-from-515.65.01.patch
new file mode 100644
index 0000000..70d990a
--- /dev/null
+++ b/0022-backport-acpi-changes-from-515.65.01.patch
@@ -0,0 +1,90 @@
+From 1553033c3f7f948f1c39ab49e08c0f32e61c50e5 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe(a)debian.org>
+Date: Mon, 17 Oct 2022 03:03:00 +0200
+Subject: [PATCH] backport acpi changes from 515.65.01
+
+---
+ nvidia/nv-acpi.c | 29 ++++++++---------------------
+ 1 file changed, 8 insertions(+), 21 deletions(-)
+
+diff --git a/nvidia/nv-acpi.c b/nvidia/nv-acpi.c
+index 50ad4e9..81f5999 100644
+--- a/nvidia/nv-acpi.c
++++ b/nvidia/nv-acpi.c
+@@ -749,15 +749,14 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ )
+ {
+ acpi_status status;
+- struct acpi_device *device = NULL;
+ struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+ union acpi_object *ddc;
+ union acpi_object ddc_arg0 = { ACPI_TYPE_INTEGER };
+ struct acpi_object_list input = { 1, &ddc_arg0 };
+- struct list_head *node, *next;
+ NvU32 i;
+ acpi_handle dev_handle = NULL;
+ acpi_handle lcd_dev_handle = NULL;
++ acpi_handle handle = NULL;
+
+ if (!nv_acpi_get_device_handle(nv, &dev_handle))
+ return NV_ERR_NOT_SUPPORTED;
+@@ -765,15 +764,6 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ if (!dev_handle)
+ return NV_ERR_INVALID_ARGUMENT;
+
+-#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT)
+- status = acpi_bus_get_device(dev_handle, &device);
+-#else
+- return NV_ERR_NOT_SUPPORTED;
+-#endif
+-
+- if (ACPI_FAILURE(status) || !device)
+- return NV_ERR_INVALID_ARGUMENT;
+-
+ if (!NV_MAY_SLEEP())
+ {
+ #if defined(DEBUG)
+@@ -784,16 +774,16 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ return NV_ERR_NOT_SUPPORTED;
+ }
+
+- list_for_each_safe(node, next, &device->children)
++ while (lcd_dev_handle == NULL)
+ {
+ unsigned long long device_id = 0;
+- struct acpi_device *dev =
+- list_entry(node, struct acpi_device, node);
+
+- if (!dev)
+- continue;
++ status = acpi_get_next_object(ACPI_TYPE_DEVICE, dev_handle,
++ handle, &handle);
++ if (ACPI_FAILURE(status) || (handle == NULL))
++ break;
+
+- status = acpi_evaluate_integer(dev->handle, "_ADR", NULL,
&device_id);
++ status = acpi_evaluate_integer(handle, "_ADR", NULL, &device_id);
+ if (ACPI_FAILURE(status))
+ /* Couldnt query device_id for this device */
+ continue;
+@@ -803,16 +793,13 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method(
+ case 0x0118:
+ case 0x0400:
+ case 0xA420:
+- lcd_dev_handle = dev->handle;
++ lcd_dev_handle = handle;
+ nv_printf(NV_DBG_INFO, "NVRM: %s Found LCD: %x\n",
+ __FUNCTION__, device_id);
+ break;
+ default:
+ break;
+ }
+-
+- if (lcd_dev_handle != NULL)
+- break;
+ }
+
+ if (lcd_dev_handle == NULL)
+--
+2.20.1
+
diff --git a/0023-backport-drm_frambuffer.h-changes-from-515.76.patch
b/0023-backport-drm_frambuffer.h-changes-from-515.76.patch
new file mode 100644
index 0000000..17b5fcc
--- /dev/null
+++ b/0023-backport-drm_frambuffer.h-changes-from-515.76.patch
@@ -0,0 +1,36 @@
+From 2ed9de1b88d9e29ec2aa82c69371c53557e59fb2 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe(a)debian.org>
+Date: Mon, 17 Oct 2022 03:35:02 +0200
+Subject: [PATCH] backport drm_frambuffer.h changes from 515.76
+
+---
+ nvidia-drm/nvidia-drm-helper.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/nvidia-drm/nvidia-drm-helper.c b/nvidia-drm/nvidia-drm-helper.c
+index 601a9c3..8b89afe 100644
+--- a/nvidia-drm/nvidia-drm-helper.c
++++ b/nvidia-drm/nvidia-drm-helper.c
+@@ -39,6 +39,19 @@
+ #include <drm/drm_atomic_uapi.h>
+ #endif
+
++/*
++ * The inclusion of drm_framebuffer.h was removed from drm_crtc.h by commit
++ * 720cf96d8fecde29b72e1101f8a567a0ce99594f ("drm: Drop drm_framebuffer.h from
++ * drm_crtc.h") in linux-next, expected in v5.19-rc7.
++ *
++ * We only need drm_framebuffer.h for drm_framebuffer_put(), and it is always
++ * present (v4.9+) when drm_framebuffer_{put,get}() is present (v4.12+), so it
++ * is safe to unconditionally include it when drm_framebuffer_get() is present.
++ */
++#if defined(NV_DRM_FRAMEBUFFER_GET_PRESENT)
++#include <drm/drm_framebuffer.h>
++#endif
++
+ static void __nv_drm_framebuffer_put(struct drm_framebuffer *fb)
+ {
+ #if defined(NV_DRM_FRAMEBUFFER_GET_PRESENT)
+--
+2.20.1
+
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 54a4f1e..e6ed90f 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -18,7 +18,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.154
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -33,28 +33,19 @@ Source11: nvidia-390xx-kmodtool-excludekernel-filterfile
# openSUSE
https://build.opensuse.org/package/show/home:luc14n0:nvidia/nvidia-gfxG04
# kernel support
-#Patch10: 0001-backport-error-on-unknown-conftests.patch
-#Patch11: 0002-backport-error-on-unknown-conftests-uvm-part.patch
Patch12: do-div-cast.patch
-#Patch13: kernel-5.7.0-set-memory-array.patch
-#Patch14: kernel-5.12.patch
-#Patch15:
https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/herecura/ker...
-#Patch16: nvidia-470xx-fix-linux-5.17.patch
-#
http://git.pld-linux.org/gitweb.cgi?p=packages/xorg-driver-video-nvidia-l...
-#Patch17: kernel-5.18.patch
-#
http://git.pld-linux.org/gitweb.cgi?p=packages/xorg-driver-video-nvidia-l...
-#Patch18: kernel-5.18-uvm.patch
+Patch13: 0018-backport-nv_install_notifier-changes-from-418.30.patch
+Patch14: 0019-backport-acpi-changes-from-430.09.patch
+Patch15: 0020-backport-acpi-changes-from-455.23.04.patch
+Patch16: 0021-backport-acpi-changes-from-510.85.02.patch
+Patch17: 0022-backport-acpi-changes-from-515.65.01.patch
+Patch18: 0023-backport-drm_frambuffer.h-changes-from-515.76.patch
# build system updates
Patch30: use-kbuild-compiler.patch
-Patch31: use-kbuild-flags.patch
-Patch32: use-kbuild-gcc-plugins.patch
-Patch33: conftest-verbose.patch
-Patch34: cc_version_check-gcc5.patch
-Patch35: bashisms.patch
-#These are Debian specific. Dones not apply to Fedora
-#Patch35: nvidia-use-ARCH.o_binary.patch
-#Patch36: nvidia-modeset-use-ARCH.o_binary.patch
+Patch31: conftest-verbose.patch
+Patch32: cc_version_check-gcc5.patch
+Patch33: bashisms.patch
# armhf support
Patch40: include-swiotlb-header-on-arm.patch
@@ -84,30 +75,24 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
--filterf
%setup -T -c
tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
# Apply patches
-#patch10 -p1 -b 10 -d kernel
-%ifnarch armv7hl
-#patch11 -p1 -b 11 -d kernel
-%endif
%patch12 -p1 -b 12 -d kernel
-#patch13 -p1 -b 13 -d kernel
-#patch14 -p2 -b 14 -d kernel
-#patch15 -p2 -b 15 -d kernel
-#patch16 -p2 -b 15 -d kernel
-#%patch17 -p2 -b 17 -d kernel
-%ifnarch armv7hl
-#%patch18 -p2 -b 18 -d kernel
-%endif
+%patch13 -p1 -b 13 -d kernel
+%patch14 -p1 -b 14 -d kernel
+%patch15 -p1 -b 15 -d kernel
+%patch16 -p1 -b 16 -d kernel
+%patch17 -p1 -b 17 -d kernel
+%patch18 -p1 -b 18 -d kernel
%patch30 -p1 -b 30 -d kernel
-#patch31 -p1 -b 31 -d kernel
-#patch32 -p1 -b 32 -d kernel
+%patch31 -p1 -b 31 -d kernel
+%patch32 -p1 -b 32 -d kernel
%patch33 -p1 -b 33 -d kernel
-%patch34 -p1 -b 34 -d kernel
-%patch35 -p1 -b 35 -d kernel
+%ifarch armv7hl
%patch40 -p1 -b 40 -d kernel
%patch41 -p1 -b 41 -d kernel
%patch42 -p1 -b 42 -d kernel
%patch43 -p1 -b 43 -d kernel
+%endif
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -134,6 +119,10 @@ done
%changelog
+* Thu Nov 03 2022 Leigh Scott <leigh123linux(a)gmail.com> - 3:390.154-3
+- Patch for 6.0 kernel
+- Clean up old patches
+
* Sun Aug 28 2022 Leigh Scott <leigh123linux(a)gmail.com> - 3:390.154-2
- Restore kmod for el build