diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-07 23:37:35 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-07 23:37:35 +0300 |
commit | 479174d402bcf60789106eedc4def3957c060bad (patch) | |
tree | f044dd954c8cdf39a28fbfc71839c936656162e3 /drivers/platform | |
parent | b5b52de3214a29911f949459a79f6640969b5487 (diff) | |
parent | e4678483f9bc400642bbc05c6b75a1b44bcb6c25 (diff) | |
download | linux-479174d402bcf60789106eedc4def3957c060bad.tar.xz |
Merge tag 'platform-drivers-x86-v6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fix from Hans de Goede:
"A single fix for 6.1 for suspend/resume issues on some AMD systems"
* tag 'platform-drivers-x86-v6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86/amd: pmc: Add a workaround for an s0i3 issue on Cezanne
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/amd/pmc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index ef4ae977b8e0..439d282aafd1 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -739,8 +739,14 @@ static void amd_pmc_s2idle_prepare(void) static void amd_pmc_s2idle_check(void) { struct amd_pmc_dev *pdev = &pmc; + struct smu_metrics table; int rc; + /* CZN: Ensure that future s0i3 entry attempts at least 10ms passed */ + if (pdev->cpu_id == AMD_CPU_ID_CZN && !get_metrics_table(pdev, &table) && + table.s0i3_last_entry_status) + usleep_range(10000, 20000); + /* Dump the IdleMask before we add to the STB */ amd_pmc_idlemask_read(pdev, pdev->dev, NULL); |