diff options
author | Sanket Goswami <[email protected]> | 2021-09-21 17:29:10 +0530 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2021-09-28 16:24:09 +0200 |
commit | 9c93f8f4fc8cd938bc0ee8d121809c6941e03347 (patch) | |
tree | 4df2addfe6e5c10047e65707e5a130b5881f3286 | |
parent | 40635cd32f0d83573a558dc30e9ba3469e769249 (diff) |
platform/x86: amd-pmc: Send command to dump data after clearing OS_HINT
It was reported that the resume stats received from the firmware are
always zero. This happens because the SMU expects the driver to send the
command to dump the log data after clearing the OS_HINT.
Adjust the order of the commands sent to SMU.
Signed-off-by: Shyam Sundar S K <[email protected]>
Signed-off-by: Sanket Goswami <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r-- | drivers/platform/x86/amd-pmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c index f185c43bbaa4..d4d2ba886f4e 100644 --- a/drivers/platform/x86/amd-pmc.c +++ b/drivers/platform/x86/amd-pmc.c @@ -436,14 +436,14 @@ static int __maybe_unused amd_pmc_resume(struct device *dev) int rc; u8 msg; - /* Let SMU know that we are looking for stats */ - amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0); - msg = amd_pmc_get_os_hint(pdev); rc = amd_pmc_send_cmd(pdev, 0, NULL, msg, 0); if (rc) dev_err(pdev->dev, "resume failed\n"); + /* Let SMU know that we are looking for stats */ + amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0); + /* Dump the IdleMask to see the blockers */ amd_pmc_idlemask_read(pdev, dev, NULL); |