platform/x86: amd-pmc: Send command to dump data after clearing OS_HINT
PATCH 1/1 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.
--- drivers/platform/x86/amd-pmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/amd-pmc.c +3 -3
@@ -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 );
Signature · 1 line
2.25.1
Hi,
Quoted 8 lines · Sanket Goswami
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]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Question, should I also submit this as a bug-fix for 5.15, or can this wait for the 5.16 cycle ?
Regards,
Hans
Quoted 27 lines
--- drivers/platform/x86/amd-pmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/platform/x86/amd-pmc.c +3
-3@@ -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 );