platform/x86/amd: pmc: Dump idle mask during "check" stage instead
The idle mask is dumped during the "prepare" and "restore" stage right now, which helps to demonstrate issues only related to the first s2idle entry. If the system has entered s2idle once, but was woken up never breaking the s2idle loop but also never went back to sleep we might still have another issue to deal with however. Move the dynamic debugging message here so that we'll catch it on each iteration. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216516 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20220929215042.745-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
4e3d731ba7
commit
c928df03bd
|
@ -719,8 +719,6 @@ static void amd_pmc_s2idle_prepare(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dump the IdleMask before we send hint to SMU */
|
|
||||||
amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
|
|
||||||
msg = amd_pmc_get_os_hint(pdev);
|
msg = amd_pmc_get_os_hint(pdev);
|
||||||
rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, 0);
|
rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, 0);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@ -738,6 +736,9 @@ static void amd_pmc_s2idle_check(void)
|
||||||
struct amd_pmc_dev *pdev = &pmc;
|
struct amd_pmc_dev *pdev = &pmc;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* Dump the IdleMask before we add to the STB */
|
||||||
|
amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
|
||||||
|
|
||||||
rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_CHECK);
|
rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_CHECK);
|
||||||
if (rc)
|
if (rc)
|
||||||
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
|
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
|
||||||
|
@ -757,9 +758,6 @@ static void amd_pmc_s2idle_restore(void)
|
||||||
/* Let SMU know that we are looking for stats */
|
/* Let SMU know that we are looking for stats */
|
||||||
amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
|
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, pdev->dev, NULL);
|
|
||||||
|
|
||||||
rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_RESTORE);
|
rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_RESTORE);
|
||||||
if (rc)
|
if (rc)
|
||||||
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
|
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
|
||||||
|
|
Loading…
Reference in New Issue