[PATCH 2/2] platform/x86/amd: pmc: Add a check for PMFW version on PS platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux