Skip to contentSkip to conversation

platform/x86:intel/pmc: Leave ACPI PM Timer alone when using S3 suspend

PATCH In review Hans de Goede 2 participants 2 messages Sep 19, 2024 – Sep 23, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86:intel/pmc: Leave ACPI PM Timer alone when using S3 suspend

Disabling the ACPI PM timer causes suspend to no longer work on a Intel Kaby Lake Dell XPS 13 using deep / S3 suspend.

The power-savings from disabling the pm-timer are mostly relevant for s0ix suspend. If regular S3 suspend is used the firmware is in control of the suspend and if necessary it should disable the timer if necessary.

Limit the disabling of the ACPI PM Timer on suspend to when using S0ix (so not firmware, but OS handled) suspend to fix this.

Fixes e86c8186d03a ("platform/x86:intel/pmc: Enable the ACPI PM Timer to be turned off when suspended")
Cc Marek Maslanka <[email protected]>
---
 drivers/platform/x86/intel/pmc/core.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/platform/x86/intel/pmc/core.c +4 -0
index f443bf8bb82c..c753f013b59d 100644
@@ -1275,6 +1275,10 @@ static void pmc_core_acpi_pm_timer_suspend_resume(void *data, bool suspend)
 	if (!map->acpi_pm_tmr_ctl_offset)
 		return;
 
+	/* Check if the suspend will actually use S0ix */
+	if (suspend && pm_suspend_via_firmware())
+		return;
+
 	guard(mutex)(&pmcdev->lock);
 
 	if (!suspend && !pmcdev->enable_acpi_pm_timer_on_resume)
Signature · 1 line
2.46.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Hans de Goede

Disabling the ACPI PM timer causes suspend to no longer work on a Intel Kaby Lake Dell XPS 13 using deep / S3 suspend.

The power-savings from disabling the pm-timer are mostly relevant for s0ix suspend. If regular S3 suspend is used the firmware is in control of the suspend and if necessary it should disable the timer if necessary.

Limit the disabling of the ACPI PM Timer on suspend to when using S0ix (so not firmware, but OS handled) suspend to fix this.

Signature · 2 lines
With Best Regards,
Andy Shevchenko