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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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")
Reported-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
Closes: https://lore.kernel.org/linux-pm/18784f62-91ff-4d88-9621-6c88eb0af2b5@xxxxxxxxxxxxx/
Cc: Marek Maslanka <mmaslanka@xxxxxxxxxx>
Tested-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx> # Dell XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 drivers/platform/x86/intel/pmc/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index f443bf8bb82c..c753f013b59d 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -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)
-- 
2.46.0





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux