diff options
author | David E. Box <david.e.box@linux.intel.com> | 2020-12-07 23:39:51 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-12-10 21:45:14 +0100 |
commit | a697f072f5da8d75467be81bec918eb479405615 (patch) | |
tree | 690494dc037a0f82fc5a56cadc763482714dd48e /drivers/pci/pci.h | |
parent | PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume (diff) | |
download | linux-a697f072f5da8d75467be81bec918eb479405615.tar.xz linux-a697f072f5da8d75467be81bec918eb479405615.zip |
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>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index e0f9e7259e47..f38ba693c69a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -519,9 +519,11 @@ static inline int pci_iov_bus_range(struct pci_bus *bus) #ifdef CONFIG_PCIE_PTM void pci_save_ptm_state(struct pci_dev *dev); void pci_restore_ptm_state(struct pci_dev *dev); +void pci_disable_ptm(struct pci_dev *dev); #else static inline void pci_save_ptm_state(struct pci_dev *dev) { } static inline void pci_restore_ptm_state(struct pci_dev *dev) { } +static inline void pci_disable_ptm(struct pci_dev *dev) { } #endif unsigned long pci_cardbus_resource_alignment(struct resource *); |