Really fix 6.13
Some checks failed
PikaOS Package Build Only (amd64-v3) / build (push) Failing after 34s

This commit is contained in:
ferreo 2025-01-20 15:13:12 +00:00
parent 5ebc91f783
commit ee59a13ae2
5 changed files with 1 additions and 153 deletions

View File

@ -1 +1 @@
1
2

View File

@ -1,37 +0,0 @@
From c0bf5aa9ab8205c5cf74356c3af6cbeb016765e6 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
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 <admin@ptr1337.dev>
---
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

View File

@ -1,34 +0,0 @@
From bc3a3a9b9617c85b259fd1aa2c5ce46f17fb1694 Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
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 <admin@ptr1337.dev>
---
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

View File

@ -1,51 +0,0 @@
From e9df998a8915c45aff2f17f80a2711584fba9d5d Mon Sep 17 00:00:00 2001
From: Peter Jung <admin@ptr1337.dev>
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 <admin@ptr1337.dev>
---
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

View File

@ -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