summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-04-17 18:27:06 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-04-20 20:06:12 +0300
commit09f5df3fb82fd444296e248f90dd29288e82d3a3 (patch)
treecab2e9cbcfb5ddb4b07b77cca660505263f10cf3 /drivers/platform
parentb52124a78ab34eb0754e32edc0c9996937779176 (diff)
downloadlinux-09f5df3fb82fd444296e248f90dd29288e82d3a3.tar.xz
platform/x86/amd: pmc: Report duration of time in hw sleep state
amd_pmc displays a warning when a suspend didn't get to the deepest state and a dynamic debugging message with the duration if it did. Rather than logging to dynamic debugging the duration spent in the deepest state, report this to the standard kernel reporting infrastructure so that userspace software can query after the suspend cycle is done. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/amd/pmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index 2edaae04a691..e610457136e6 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -393,9 +393,8 @@ static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
if (!table.s0i3_last_entry_status)
dev_warn(pdev->dev, "Last suspend didn't reach deepest state\n");
- else
- dev_dbg(pdev->dev, "Last suspend in deepest state for %lluus\n",
- table.timein_s0i3_lastcapture);
+ pm_report_hw_sleep_time(table.s0i3_last_entry_status ?
+ table.timein_s0i3_lastcapture : 0);
}
static int amd_pmc_get_smu_version(struct amd_pmc_dev *dev)
@@ -1015,6 +1014,7 @@ static int amd_pmc_probe(struct platform_device *pdev)
}
amd_pmc_dbgfs_register(dev);
+ pm_report_max_hw_sleep(U64_MAX);
return 0;
err_pci_dev_put: