From ee59a13ae2fd14e7d15b1ff45a16f1b87f4d35ed Mon Sep 17 00:00:00 2001 From: ferreo Date: Mon, 20 Jan 2025 15:13:12 +0000 Subject: [PATCH] Really fix 6.13 --- .github/build-nest-v3 | 2 +- ...unkown-CPU-Type-and-add-Zen5-support.patch | 37 -------------- .../0004-silence-event-assert-until-570.patch | 34 ------------- ...nitize-trim-ELD-product-name-strings.patch | 51 ------------------- nvidia-graphics-drivers-565/debian/rules | 30 ----------- 5 files changed, 1 insertion(+), 153 deletions(-) delete mode 100644 nvidia-graphics-drivers-565/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch delete mode 100644 nvidia-graphics-drivers-565/debian/patches/0004-silence-event-assert-until-570.patch delete mode 100644 nvidia-graphics-drivers-565/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch diff --git a/.github/build-nest-v3 b/.github/build-nest-v3 index 56a6051..d8263ee 100644 --- a/.github/build-nest-v3 +++ b/.github/build-nest-v3 @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file diff --git a/nvidia-graphics-drivers-565/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch b/nvidia-graphics-drivers-565/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch deleted file mode 100644 index f971b01..0000000 --- a/nvidia-graphics-drivers-565/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c0bf5aa9ab8205c5cf74356c3af6cbeb016765e6 Mon Sep 17 00:00:00 2001 -From: Peter Jung -Date: Fri, 18 Oct 2024 22:40:38 +0200 -Subject: [PATCH 2/6] Do not error on unkown CPU Type and add Zen5 support - -Currently the Zen 5 CPU is an unknown CPU and prints an error in dmesg. Fix this with adding Zen5 support as well as change the print to a warning. - -Signed-off-by: Peter Jung ---- - kernel/platform/cpu.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/kernel/platform/cpu.c b/kernel/platform/cpu.c -index bb76a9c2..6832e77c 100644 ---- a/kernel/platform/cpu.c -+++ b/kernel/platform/cpu.c -@@ -1401,12 +1401,14 @@ static void cpuidInfoAMD(OBJSYS *pSys, PCPUIDINFO pCpuidInfo) - // Zen, Zen+, Zen 2 - case 0x0A0: - // Zen 3, Zen 4 -+ case 0x0B0: -+ // Zen 5 - pSys->cpuInfo.type = NV0000_CTRL_SYSTEM_CPU_TYPE_RYZEN; - break; - default: -- NV_PRINTF(LEVEL_ERROR, -- "Unrecognized AMD processor in cpuidInfoAMD\n"); -- pSys->cpuInfo.type = NV0000_CTRL_SYSTEM_CPU_TYPE_K8; -+ NV_PRINTF(LEVEL_NOTICE, -+ "Unrecognized AMD processor 0x%x in cpuidInfoAMD. Assuming new Ryzen\n", pCpuidInfo->Family); -+ pSys->cpuInfo.type = NV0000_CTRL_SYSTEM_CPU_TYPE_RYZEN; - break; - } - } --- -2.47.0 - diff --git a/nvidia-graphics-drivers-565/debian/patches/0004-silence-event-assert-until-570.patch b/nvidia-graphics-drivers-565/debian/patches/0004-silence-event-assert-until-570.patch deleted file mode 100644 index 1a8dbcc..0000000 --- a/nvidia-graphics-drivers-565/debian/patches/0004-silence-event-assert-until-570.patch +++ /dev/null @@ -1,34 +0,0 @@ -From bc3a3a9b9617c85b259fd1aa2c5ce46f17fb1694 Mon Sep 17 00:00:00 2001 -From: Peter Jung -Date: Fri, 18 Oct 2024 22:44:33 +0200 -Subject: [PATCH 4/6] silence-event-assert-until-570 - -Currently, when playing CS2 it reports a massive spam in the dmesg log. This will be fixed in the 570 driver. -Silence it for now. - -Signed-off-by: Peter Jung ---- - kernel/rmapi/event_notification.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/kernel/rmapi/event_notification.c b/kernel/rmapi/event_notification.c -index cf78eadd..d6937cac 100644 ---- a/kernel/rmapi/event_notification.c -+++ b/kernel/rmapi/event_notification.c -@@ -286,11 +286,11 @@ static NV_STATUS _gpuEngineEventNotificationListNotify - portSyncSpinlockAcquire(pEventNotificationList->pSpinlock); - { - // We don't expect this to be called multiple times in parallel -- NV_ASSERT_OR_ELSE(pEventNotificationList->pendingEventNotifyCount == 0, -+ if (pEventNotificationList->pendingEventNotifyCount != 0) - { - portSyncSpinlockRelease(pEventNotificationList->pSpinlock); - return NV_ERR_INVALID_STATE; -- }); -+ } - - EngineEventNotificationListIter it = - listIterAll(&pEventNotificationList->eventNotificationList); --- -2.47.0 - diff --git a/nvidia-graphics-drivers-565/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch b/nvidia-graphics-drivers-565/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch deleted file mode 100644 index 661ccd4..0000000 --- a/nvidia-graphics-drivers-565/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e9df998a8915c45aff2f17f80a2711584fba9d5d Mon Sep 17 00:00:00 2001 -From: Peter Jung -Date: Fri, 18 Oct 2024 22:44:59 +0200 -Subject: [PATCH 5/6] nvkms: Sanitize & trim ELD product name strings - -Signed-off-by: Peter Jung ---- - src/nvidia-modeset/src/nvkms-hdmi.c | 26 ++++++-------------------- - 1 file changed, 6 insertions(+), 20 deletions(-) - -diff --git a/src/nvidia-modeset/src/nvkms-hdmi.c b/src/nvidia-modeset/src/nvkms-hdmi.c -index 07841ef5..338d2dad 100644 ---- a/src/nvidia-modeset/src/nvkms-hdmi.c -+++ b/src/nvidia-modeset/src/nvkms-hdmi.c -@@ -1046,27 +1046,13 @@ static NvBool FillELDBuffer(const NVDpyEvoRec *pDpyEvo, - - if (status == NVT_STATUS_SUCCESS) { - /* -- * NvTiming_GetProductName() returns a nul-terminated string, but the -- * string in the EDID is terminated with 0x0A and padded with 0x20. -- * Put back these special characters. -+ * NvTiming_GetProductName returns a nul-terminated string. Figure out -+ * how long it is and copy the bytes up to, but not including, the nul -+ * terminator. - */ -- NvBool pastTerminator = FALSE; -- NvU32 i; -- -- for (i = 0; i < NVT_EDID_LDD_PAYLOAD_SIZE; i++) { -- if (pastTerminator) { -- name[i] = 0x20; -- } -- if (name[i] == '\0') { -- name[i] = 0x0A; -- pastTerminator = TRUE; -- } -- } -- -- monitorNameLen = NVT_EDID_LDD_PAYLOAD_SIZE; -- pEld->buffer[4] |= NVT_EDID_LDD_PAYLOAD_SIZE; -- nvkms_memcpy(&pEld->buffer[20], name, -- NVT_EDID_LDD_PAYLOAD_SIZE); -+ monitorNameLen = nvkms_strlen((char *)name); -+ pEld->buffer[4] |= monitorNameLen; -+ nvkms_memcpy(&pEld->buffer[20], name, monitorNameLen); - } - - /* offset 20 + MNL ~ 20 + MNL + (3 * SAD_Count) - 1 : CEA_SADs */ --- -2.47.0 - diff --git a/nvidia-graphics-drivers-565/debian/rules b/nvidia-graphics-drivers-565/debian/rules index cea6bf2..776c461 100644 --- a/nvidia-graphics-drivers-565/debian/rules +++ b/nvidia-graphics-drivers-565/debian/rules @@ -25,25 +25,10 @@ ifeq (amd64,$(DEB_HOST_ARCH)) patch -Np2 -i $(CURDIR)/debian/patches/0001-Make-modeset-and-fbdev-default-enabled.patch -d $(CURDIR)/debian/tmp/kernel patch -Np2 -i $(CURDIR)/debian/patches/0001-Make-modeset-and-fbdev-default-enabled.patch -d $(CURDIR)/debian/tmp/kernel-open - # Dont error, when Zen5 CPU is in the system - patch -Np2 -i $(CURDIR)/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -d $(CURDIR)/debian/tmp/kernel - patch -Np2 -i $(CURDIR)/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -d $(CURDIR)/debian/tmp/kernel-open - # Fix for https://bugs.archlinux.org/task/74886 patch -Np2 -i $(CURDIR)/debian/patches/0003-Add-IBT-support.patch -d $(CURDIR)/debian/tmp/kernel patch -Np2 -i $(CURDIR)/debian/patches/0003-Add-IBT-support.patch -d $(CURDIR)/debian/tmp/kernel-open - # Patch by Nvidia to silence error messages until a real fix drops in 570.xx - # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/716#issuecomment-2391898884 - patch -Np2 -i $(CURDIR)/debian/patches/0004-silence-event-assert-until-570.patch -d $(CURDIR)/debian/tmp/kernel - patch -Np2 -i $(CURDIR)/debian/patches/0004-silence-event-assert-until-570.patch -d $(CURDIR)/debian/tmp/kernel-open - - # Patch by Nvidia to fix HDMI names which are otherwise broken in the /proc/asound/NVidia/* ELD files - # Should hopefully ship with 570.xx - # https://github.com/NVIDIA/open-gpu-kernel-modules/pull/715 - patch -Np2 -i $(CURDIR)/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch -d $(CURDIR)/debian/tmp/kernel - patch -Np2 -i $(CURDIR)/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch -d $(CURDIR)/debian/tmp/kernel-open - # Fix build errors on 6.13+ # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/746 patch -Np2 -i $(CURDIR)/debian/patches/0006-crypto-Add-fix-for-6.13-Module-compilation.patch -d $(CURDIR)/debian/tmp/kernel @@ -85,25 +70,10 @@ ifeq (i386,$(DEB_HOST_ARCH)) patch -Np2 -i $(CURDIR)/debian/patches/0001-Make-modeset-and-fbdev-default-enabled.patch -d $(CURDIR)/debian/tmp/kernel patch -Np2 -i $(CURDIR)/debian/patches/0001-Make-modeset-and-fbdev-default-enabled.patch -d $(CURDIR)/debian/tmp/kernel-open - # Dont error, when Zen5 CPU is in the system - patch -Np2 -i $(CURDIR)/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -d $(CURDIR)/debian/tmp/kernel - patch -Np2 -i $(CURDIR)/debian/patches/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch -d $(CURDIR)/debian/tmp/kernel-open - # Fix for https://bugs.archlinux.org/task/74886 patch -Np2 -i $(CURDIR)/debian/patches/0003-Add-IBT-support.patch -d $(CURDIR)/debian/tmp/kernel patch -Np2 -i $(CURDIR)/debian/patches/0003-Add-IBT-support.patch -d $(CURDIR)/debian/tmp/kernel-open - # Patch by Nvidia to silence error messages until a real fix drops in 570.xx - # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/716#issuecomment-2391898884 - patch -Np2 -i $(CURDIR)/debian/patches/0004-silence-event-assert-until-570.patch -d $(CURDIR)/debian/tmp/kernel - patch -Np2 -i $(CURDIR)/debian/patches/0004-silence-event-assert-until-570.patch -d $(CURDIR)/debian/tmp/kernel-open - - # Patch by Nvidia to fix HDMI names which are otherwise broken in the /proc/asound/NVidia/* ELD files - # Should hopefully ship with 570.xx - # https://github.com/NVIDIA/open-gpu-kernel-modules/pull/715 - patch -Np2 -i $(CURDIR)/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch -d $(CURDIR)/debian/tmp/kernel - patch -Np2 -i $(CURDIR)/debian/patches/0005-nvkms-Sanitize-trim-ELD-product-name-strings.patch -d $(CURDIR)/debian/tmp/kernel-open - # Fix build errors on 6.13+ # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/746 patch -Np2 -i $(CURDIR)/debian/patches/0006-crypto-Add-fix-for-6.13-Module-compilation.patch -d $(CURDIR)/debian/tmp/kernel