mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86/amd/pmc: Fix S2D message ID on Rembrandt
@ 2026-11-02  5:35 Christian Aurich Zanettini Martins
  2026-11-02 15:08 ` Mario Limonciello
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Aurich Zanettini Martins @ 2026-11-02  5:35 UTC (permalink / raw)
  To: Shyam Sundar S K, Ilpo Järvinen, Hans de Goede
  Cc: Mario Limonciello, Sanket Goswami, platform-driver-x86,
	linux-kernel, Christian Aurich Zanettini Martins, stable

Commit 382fe403dc31 ("platform/x86/amd/pmc: Add STB support for AMD
Desktop variants") added S2D message ID 0x9B for Granite Ridge (family
1Ah, model 44h), but only checks the model. Rembrandt is family 19h,
model 44h and goes through the same AMD_CPU_ID_YC case, so it sends 0x9B
instead of 0xBE. The firmware then reports a telemetry size of 1 instead
of 0x100000 and amd_stb_s2d_init() fails with -EIO.

amd_stb_update_args() already checks for Zen 5 before using the Granite
Ridge registers. Do the same for the message ID.

Fixes: 382fe403dc31 ("platform/x86/amd/pmc: Add STB support for AMD Desktop variants")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
---

Notes:
    Tested on a Lenovo IdeaPad Slim 3 15ARP10 (Ryzen 7 7735HS), with this
    driver built out of tree for a 7.0 kernel. The size query returns 1 with
    0x9B and 0x100000 with 0xBE. This laptop's firmware then reports S2D
    address 0, so init still ends in -ENXIO here and I couldn't test an
    actual STB dump.
    
    Based on v7.4-rc1. Found in my own boot logs.

 drivers/platform/x86/amd/pmc/mp1_stb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/amd/pmc/mp1_stb.c b/drivers/platform/x86/amd/pmc/mp1_stb.c
index 8a33e75b71c3..af9ecec532f0 100644
--- a/drivers/platform/x86/amd/pmc/mp1_stb.c
+++ b/drivers/platform/x86/amd/pmc/mp1_stb.c
@@ -266,7 +266,7 @@ static bool amd_is_stb_supported(struct amd_pmc_dev *dev)
 	switch (dev->cpu_id) {
 	case AMD_CPU_ID_YC:
 	case AMD_CPU_ID_CB:
-		if (boot_cpu_data.x86_model == 0x44)
+		if (cpu_feature_enabled(X86_FEATURE_ZEN5) && boot_cpu_data.x86_model == 0x44)
 			dev->stb_arg.s2d_msg_id = 0x9B;
 		else
 			dev->stb_arg.s2d_msg_id = 0xBE;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] platform/x86/amd/pmc: Fix S2D message ID on Rembrandt
  2026-11-02  5:35 [PATCH] platform/x86/amd/pmc: Fix S2D message ID on Rembrandt Christian Aurich Zanettini Martins
@ 2026-11-02 15:08 ` Mario Limonciello
  0 siblings, 0 replies; 2+ messages in thread
From: Mario Limonciello @ 2026-11-02 15:08 UTC (permalink / raw)
  To: Christian Aurich Zanettini Martins, Shyam Sundar S K,
	Ilpo Järvinen, Hans de Goede
  Cc: Sanket Goswami, platform-driver-x86, linux-kernel, stable



On 11/1/26 23:35, Christian Aurich Zanettini Martins wrote:
> Commit 382fe403dc31 ("platform/x86/amd/pmc: Add STB support for AMD
> Desktop variants") added S2D message ID 0x9B for Granite Ridge (family
> 1Ah, model 44h), but only checks the model. Rembrandt is family 19h,
> model 44h and goes through the same AMD_CPU_ID_YC case, so it sends 0x9B
> instead of 0xBE. The firmware then reports a telemetry size of 1 instead
> of 0x100000 and amd_stb_s2d_init() fails with -EIO.
> 
> amd_stb_update_args() already checks for Zen 5 before using the Granite
> Ridge registers. Do the same for the message ID.
> 
> Fixes: 382fe403dc31 ("platform/x86/amd/pmc: Add STB support for AMD Desktop variants")
> Cc: stable@vger.kernel.org
> Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
> ---
> 
> Notes:
>      Tested on a Lenovo IdeaPad Slim 3 15ARP10 (Ryzen 7 7735HS), with this
>      driver built out of tree for a 7.0 kernel. The size query returns 1 with
>      0x9B and 0x100000 with 0xBE. This laptop's firmware then reports S2D
>      address 0, so init still ends in -ENXIO here and I couldn't test an
>      actual STB dump.
>      
>      Based on v7.4-rc1. Found in my own boot logs.
> 
>   drivers/platform/x86/amd/pmc/mp1_stb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/amd/pmc/mp1_stb.c b/drivers/platform/x86/amd/pmc/mp1_stb.c
> index 8a33e75b71c3..af9ecec532f0 100644
> --- a/drivers/platform/x86/amd/pmc/mp1_stb.c
> +++ b/drivers/platform/x86/amd/pmc/mp1_stb.c
> @@ -266,7 +266,7 @@ static bool amd_is_stb_supported(struct amd_pmc_dev *dev)
>   	switch (dev->cpu_id) {
>   	case AMD_CPU_ID_YC:
>   	case AMD_CPU_ID_CB:
> -		if (boot_cpu_data.x86_model == 0x44)
> +		if (cpu_feature_enabled(X86_FEATURE_ZEN5) && boot_cpu_data.x86_model == 0x44)
>   			dev->stb_arg.s2d_msg_id = 0x9B;
>   		else
>   			dev->stb_arg.s2d_msg_id = 0xBE;

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-02 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02  5:35 [PATCH] platform/x86/amd/pmc: Fix S2D message ID on Rembrandt Christian Aurich Zanettini Martins
2026-11-02 15:08 ` Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®