PCI: Disable PTM during suspend to save power
authorDavid E. Box <david.e.box@linux.intel.com>
Mon, 7 Dec 2020 22:39:51 +0000 (14:39 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Dec 2020 20:45:14 +0000 (14:45 -0600)
commita697f072f5da8d75467be81bec918eb479405615
tree690494dc037a0f82fc5a56cadc763482714dd48e
parent39850ed51062f89cd46214a16aaafba5ca49fd6c
PCI: Disable PTM during suspend to save power

There are systems (for example, Intel based mobile platforms since Coffee
Lake) where the power drawn while suspended can be significantly reduced by
disabling Precision Time Measurement (PTM) on PCIe root ports as this
allows the port to enter a lower-power PM state and the SoC to reach a
lower-power idle state. To save this power, disable the PTM feature on root
ports during pci_prepare_to_sleep() and pci_finish_runtime_suspend().  The
feature will be returned to its previous state during restore and error
recovery.

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209361
Link: https://lore.kernel.org/r/20201207223951.19667-2-david.e.box@linux.intel.com
Reported-by: Len Brown <len.brown@intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/ptm.c