From: Greg Kroah-Hartman Date: Sat, 21 Mar 2026 06:55:12 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.1.167~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9545d6178f7c36c9170d97edfb32683693b1b4e;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: drm-amdgpu-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch drm-amdgpu-gmc9.0-add-bounds-checking-for-cid.patch drm-amdgpu-mmhub2.0-add-bounds-checking-for-cid.patch drm-amdgpu-mmhub2.3-add-bounds-checking-for-cid.patch drm-amdgpu-mmhub3.0-add-bounds-checking-for-cid.patch drm-amdgpu-mmhub3.0.1-add-bounds-checking-for-cid.patch drm-amdgpu-mmhub3.0.2-add-bounds-checking-for-cid.patch drm-radeon-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch --- diff --git a/queue-6.6/drm-amdgpu-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch b/queue-6.6/drm-amdgpu-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch new file mode 100644 index 0000000000..d8accedfdc --- /dev/null +++ b/queue-6.6/drm-amdgpu-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch @@ -0,0 +1,35 @@ +From 9787f7da186ee8143b7b6d914cfa0b6e7fee2648 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 25 Sep 2023 10:44:07 -0400 +Subject: drm/amdgpu: apply state adjust rules to some additional HAINAN vairants + +From: Alex Deucher + +commit 9787f7da186ee8143b7b6d914cfa0b6e7fee2648 upstream. + +They need a similar workaround. + +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1839 +Signed-off-by: Alex Deucher +(cherry picked from commit 0de31d92a173d3d94f28051b0b80a6c98913aed4) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c ++++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +@@ -3440,9 +3440,11 @@ static void si_apply_state_adjust_rules( + if (adev->asic_type == CHIP_HAINAN) { + if ((adev->pdev->revision == 0x81) || + (adev->pdev->revision == 0xC3) || ++ (adev->pdev->device == 0x6660) || + (adev->pdev->device == 0x6664) || + (adev->pdev->device == 0x6665) || +- (adev->pdev->device == 0x6667)) { ++ (adev->pdev->device == 0x6667) || ++ (adev->pdev->device == 0x666F)) { + max_sclk = 75000; + } + if ((adev->pdev->revision == 0xC3) || diff --git a/queue-6.6/drm-amdgpu-gmc9.0-add-bounds-checking-for-cid.patch b/queue-6.6/drm-amdgpu-gmc9.0-add-bounds-checking-for-cid.patch new file mode 100644 index 0000000000..02a8d82535 --- /dev/null +++ b/queue-6.6/drm-amdgpu-gmc9.0-add-bounds-checking-for-cid.patch @@ -0,0 +1,68 @@ +From f39e1270277f4b06db0b2c6ec9405b6dd766fb13 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 16 Mar 2026 15:51:08 -0400 +Subject: drm/amdgpu/gmc9.0: add bounds checking for cid + +From: Alex Deucher + +commit f39e1270277f4b06db0b2c6ec9405b6dd766fb13 upstream. + +The value should never exceed the array size as those +are the only values the hardware is expected to return, +but add checks anyway. + +Cc: Benjamin Cheng +Reviewed-by: Benjamin Cheng +Signed-off-by: Alex Deucher +(cherry picked from commit e14d468304832bcc4a082d95849bc0a41b18ddea) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +@@ -672,28 +672,35 @@ static int gmc_v9_0_process_interrupt(st + } else { + switch (adev->ip_versions[MMHUB_HWIP][0]) { + case IP_VERSION(9, 0, 0): +- mmhub_cid = mmhub_client_ids_vega10[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vega10) ? ++ mmhub_client_ids_vega10[cid][rw] : NULL; + break; + case IP_VERSION(9, 3, 0): +- mmhub_cid = mmhub_client_ids_vega12[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vega12) ? ++ mmhub_client_ids_vega12[cid][rw] : NULL; + break; + case IP_VERSION(9, 4, 0): +- mmhub_cid = mmhub_client_ids_vega20[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vega20) ? ++ mmhub_client_ids_vega20[cid][rw] : NULL; + break; + case IP_VERSION(9, 4, 1): +- mmhub_cid = mmhub_client_ids_arcturus[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_arcturus) ? ++ mmhub_client_ids_arcturus[cid][rw] : NULL; + break; + case IP_VERSION(9, 1, 0): + case IP_VERSION(9, 2, 0): +- mmhub_cid = mmhub_client_ids_raven[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_raven) ? ++ mmhub_client_ids_raven[cid][rw] : NULL; + break; + case IP_VERSION(1, 5, 0): + case IP_VERSION(2, 4, 0): +- mmhub_cid = mmhub_client_ids_renoir[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_renoir) ? ++ mmhub_client_ids_renoir[cid][rw] : NULL; + break; + case IP_VERSION(1, 8, 0): + case IP_VERSION(9, 4, 2): +- mmhub_cid = mmhub_client_ids_aldebaran[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_aldebaran) ? ++ mmhub_client_ids_aldebaran[cid][rw] : NULL; + break; + default: + mmhub_cid = NULL; diff --git a/queue-6.6/drm-amdgpu-mmhub2.0-add-bounds-checking-for-cid.patch b/queue-6.6/drm-amdgpu-mmhub2.0-add-bounds-checking-for-cid.patch new file mode 100644 index 0000000000..972843efb8 --- /dev/null +++ b/queue-6.6/drm-amdgpu-mmhub2.0-add-bounds-checking-for-cid.patch @@ -0,0 +1,45 @@ +From 0b26edac4ac5535df1f63e6e8ab44c24fe1acad7 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 4 Mar 2026 17:22:43 -0500 +Subject: drm/amdgpu/mmhub2.0: add bounds checking for cid + +From: Alex Deucher + +commit 0b26edac4ac5535df1f63e6e8ab44c24fe1acad7 upstream. + +The value should never exceed the array size as those +are the only values the hardware is expected to return, +but add checks anyway. + +Reviewed-by: Benjamin Cheng +Signed-off-by: Alex Deucher +(cherry picked from commit e064cef4b53552602bb6ac90399c18f662f3cacd) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +@@ -154,14 +154,17 @@ mmhub_v2_0_print_l2_protection_fault_sta + switch (adev->ip_versions[MMHUB_HWIP][0]) { + case IP_VERSION(2, 0, 0): + case IP_VERSION(2, 0, 2): +- mmhub_cid = mmhub_client_ids_navi1x[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_navi1x) ? ++ mmhub_client_ids_navi1x[cid][rw] : NULL; + break; + case IP_VERSION(2, 1, 0): + case IP_VERSION(2, 1, 1): +- mmhub_cid = mmhub_client_ids_sienna_cichlid[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_sienna_cichlid) ? ++ mmhub_client_ids_sienna_cichlid[cid][rw] : NULL; + break; + case IP_VERSION(2, 1, 2): +- mmhub_cid = mmhub_client_ids_beige_goby[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_beige_goby) ? ++ mmhub_client_ids_beige_goby[cid][rw] : NULL; + break; + default: + mmhub_cid = NULL; diff --git a/queue-6.6/drm-amdgpu-mmhub2.3-add-bounds-checking-for-cid.patch b/queue-6.6/drm-amdgpu-mmhub2.3-add-bounds-checking-for-cid.patch new file mode 100644 index 0000000000..d9b2c32cad --- /dev/null +++ b/queue-6.6/drm-amdgpu-mmhub2.3-add-bounds-checking-for-cid.patch @@ -0,0 +1,34 @@ +From a54403a534972af5d9ba5aaa3bb6ead612500ec6 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 4 Mar 2026 17:24:10 -0500 +Subject: drm/amdgpu/mmhub2.3: add bounds checking for cid + +From: Alex Deucher + +commit a54403a534972af5d9ba5aaa3bb6ead612500ec6 upstream. + +The value should never exceed the array size as those +are the only values the hardware is expected to return, +but add checks anyway. + +Reviewed-by: Benjamin Cheng +Signed-off-by: Alex Deucher +(cherry picked from commit 89cd90375c19fb45138990b70e9f4ba4806f05c4) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c ++++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +@@ -94,7 +94,8 @@ mmhub_v2_3_print_l2_protection_fault_sta + case IP_VERSION(2, 3, 0): + case IP_VERSION(2, 4, 0): + case IP_VERSION(2, 4, 1): +- mmhub_cid = mmhub_client_ids_vangogh[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vangogh) ? ++ mmhub_client_ids_vangogh[cid][rw] : NULL; + break; + default: + mmhub_cid = NULL; diff --git a/queue-6.6/drm-amdgpu-mmhub3.0-add-bounds-checking-for-cid.patch b/queue-6.6/drm-amdgpu-mmhub3.0-add-bounds-checking-for-cid.patch new file mode 100644 index 0000000000..bc7bed250b --- /dev/null +++ b/queue-6.6/drm-amdgpu-mmhub3.0-add-bounds-checking-for-cid.patch @@ -0,0 +1,34 @@ +From cdb82ecbeccb55fae75a3c956b605f7801a30db1 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 4 Mar 2026 17:25:30 -0500 +Subject: drm/amdgpu/mmhub3.0: add bounds checking for cid + +From: Alex Deucher + +commit cdb82ecbeccb55fae75a3c956b605f7801a30db1 upstream. + +The value should never exceed the array size as those +are the only values the hardware is expected to return, +but add checks anyway. + +Reviewed-by: Benjamin Cheng +Signed-off-by: Alex Deucher +(cherry picked from commit f14f27bbe2a3ed7af32d5f6eaf3f417139f45253) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c +@@ -110,7 +110,8 @@ mmhub_v3_0_print_l2_protection_fault_sta + switch (adev->ip_versions[MMHUB_HWIP][0]) { + case IP_VERSION(3, 0, 0): + case IP_VERSION(3, 0, 1): +- mmhub_cid = mmhub_client_ids_v3_0_0[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_v3_0_0) ? ++ mmhub_client_ids_v3_0_0[cid][rw] : NULL; + break; + default: + mmhub_cid = NULL; diff --git a/queue-6.6/drm-amdgpu-mmhub3.0.1-add-bounds-checking-for-cid.patch b/queue-6.6/drm-amdgpu-mmhub3.0.1-add-bounds-checking-for-cid.patch new file mode 100644 index 0000000000..968434b6d5 --- /dev/null +++ b/queue-6.6/drm-amdgpu-mmhub3.0.1-add-bounds-checking-for-cid.patch @@ -0,0 +1,34 @@ +From 5d4e88bcfef29569a1db224ef15e28c603666c6d Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 4 Mar 2026 17:24:35 -0500 +Subject: drm/amdgpu/mmhub3.0.1: add bounds checking for cid + +From: Alex Deucher + +commit 5d4e88bcfef29569a1db224ef15e28c603666c6d upstream. + +The value should never exceed the array size as those +are the only values the hardware is expected to return, +but add checks anyway. + +Reviewed-by: Benjamin Cheng +Signed-off-by: Alex Deucher +(cherry picked from commit 5f76083183363c4528a4aaa593f5d38c28fe7d7b) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c ++++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c +@@ -117,7 +117,8 @@ mmhub_v3_0_1_print_l2_protection_fault_s + + switch (adev->ip_versions[MMHUB_HWIP][0]) { + case IP_VERSION(3, 0, 1): +- mmhub_cid = mmhub_client_ids_v3_0_1[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_v3_0_1) ? ++ mmhub_client_ids_v3_0_1[cid][rw] : NULL; + break; + default: + mmhub_cid = NULL; diff --git a/queue-6.6/drm-amdgpu-mmhub3.0.2-add-bounds-checking-for-cid.patch b/queue-6.6/drm-amdgpu-mmhub3.0.2-add-bounds-checking-for-cid.patch new file mode 100644 index 0000000000..34b5454a05 --- /dev/null +++ b/queue-6.6/drm-amdgpu-mmhub3.0.2-add-bounds-checking-for-cid.patch @@ -0,0 +1,34 @@ +From e5e6d67b1ce9764e67aef2d0eef9911af53ad99a Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 4 Mar 2026 17:25:09 -0500 +Subject: drm/amdgpu/mmhub3.0.2: add bounds checking for cid + +From: Alex Deucher + +commit e5e6d67b1ce9764e67aef2d0eef9911af53ad99a upstream. + +The value should never exceed the array size as those +are the only values the hardware is expected to return, +but add checks anyway. + +Reviewed-by: Benjamin Cheng +Signed-off-by: Alex Deucher +(cherry picked from commit 1441f52c7f6ae6553664aa9e3e4562f6fc2fe8ea) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c ++++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c +@@ -108,7 +108,8 @@ mmhub_v3_0_2_print_l2_protection_fault_s + "MMVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n", + status); + +- mmhub_cid = mmhub_client_ids_v3_0_2[cid][rw]; ++ mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_v3_0_2) ? ++ mmhub_client_ids_v3_0_2[cid][rw] : NULL; + dev_err(adev->dev, "\t Faulty UTCL2 client ID: %s (0x%x)\n", + mmhub_cid ? mmhub_cid : "unknown", cid); + dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n", diff --git a/queue-6.6/drm-radeon-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch b/queue-6.6/drm-radeon-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch new file mode 100644 index 0000000000..6402af760c --- /dev/null +++ b/queue-6.6/drm-radeon-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch @@ -0,0 +1,35 @@ +From 86650ee2241ff84207eaa298ab318533f3c21a38 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 25 Sep 2023 10:44:06 -0400 +Subject: drm/radeon: apply state adjust rules to some additional HAINAN vairants + +From: Alex Deucher + +commit 86650ee2241ff84207eaa298ab318533f3c21a38 upstream. + +They need a similar workaround. + +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1839 +Signed-off-by: Alex Deucher +(cherry picked from commit 87327658c848f56eac166cb382b57b83bf06c5ac) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/radeon/si_dpm.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/si_dpm.c ++++ b/drivers/gpu/drm/radeon/si_dpm.c +@@ -2959,9 +2959,11 @@ static void si_apply_state_adjust_rules( + if (rdev->family == CHIP_HAINAN) { + if ((rdev->pdev->revision == 0x81) || + (rdev->pdev->revision == 0xC3) || ++ (rdev->pdev->device == 0x6660) || + (rdev->pdev->device == 0x6664) || + (rdev->pdev->device == 0x6665) || +- (rdev->pdev->device == 0x6667)) { ++ (rdev->pdev->device == 0x6667) || ++ (rdev->pdev->device == 0x666F)) { + max_sclk = 75000; + } + if ((rdev->pdev->revision == 0xC3) || diff --git a/queue-6.6/series b/queue-6.6/series index 333dcec3fe..9d971fda6a 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -484,3 +484,11 @@ serial-8250_pci-add-support-for-the-ax99100.patch serial-8250-fix-tx-deadlock-when-using-dma.patch serial-8250-add-late-synchronize_irq-to-shutdown-to-handle-dw-uart-busy.patch serial-uartlite-fix-pm-runtime-usage-count-underflow-on-probe.patch +drm-amdgpu-gmc9.0-add-bounds-checking-for-cid.patch +drm-amdgpu-mmhub2.0-add-bounds-checking-for-cid.patch +drm-amdgpu-mmhub2.3-add-bounds-checking-for-cid.patch +drm-amdgpu-mmhub3.0.1-add-bounds-checking-for-cid.patch +drm-amdgpu-mmhub3.0.2-add-bounds-checking-for-cid.patch +drm-amdgpu-mmhub3.0-add-bounds-checking-for-cid.patch +drm-radeon-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch +drm-amdgpu-apply-state-adjust-rules-to-some-additional-hainan-vairants.patch