lkml.org 
[lkml]   [2023]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] platform/x86/amd: pmc: Add a check for PMFW version on PS platform
Date
When running s2idle on PS if using PMFW older than 76.49.0 we will
trip up some bugs that will lead to freezes outside of the control
of Linux. Set a guard that we only can enter HW sleep on 76.49.0
or newer for PS.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd/pmc.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index c42fa47381c3..e7c6c06b2ccd 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -778,6 +778,14 @@ static void amd_pmc_s2idle_prepare(void)
return;
}
break;
+ case AMD_CPU_ID_PS:
+ if (!amd_pmc_verify_min_version(pdev, 76, 49)) {
+ dev_warn(pdev->dev,
+ "hardware sleep unsupported with firmware %u.%u.%u\n",
+ pdev->major, pdev->minor, pdev->rev);
+ return;
+ }
+ break;
}

msg = amd_pmc_get_os_hint(pdev);
--
2.34.1
\
 
 \ /
  Last update: 2023-03-27 00:40    [W:0.046 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site