linux_dsm_epyc7002/drivers/pci
Lukas Wunner 4132a577a0 PCI: Afford direct-complete to devices with non-standard PM
There are devices not power-manageable by the platform, but still able to
runtime suspend to D3cold with a non-standard mechanism.  One example is
laptop hybrid graphics where the discrete GPU and its built-in HDA
controller are power-managed either with a _DSM (AMD PowerXpress, Nvidia
Optimus) or a separate gmux controller (MacBook Pro).  Another example is
Thunderbolt on Macs which is power-managed with custom ACPI methods.

When putting the system to sleep, we currently handle such devices
improperly by transitioning them from D3cold to D3hot (the default power
state defined at the top of pci_target_state()).  This wastes energy and
prolongs the suspend sequence (powering up the Thunderbolt controller takes
2 seconds).

Avoid that by assuming that a non-standard PM mechanism is at work if the
device is not platform-power-manageable but currently in D3cold.

If the device is wakeup enabled, we might still have to wake it up from
D3cold if PME cannot be signaled from that power state.

The check for devices without PM capability comes before the check for
D3cold since such devices could in theory also be powered down by
non-standard means and should then be afforded direct-complete as well.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-28 11:45:27 -05:00
..
host Merge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-dra7xx', 'pci/host-hv', 'pci/host-vmd' and 'pci/host-xilinx' into next 2016-08-01 12:32:13 -05:00
hotplug ACPI / hotplug / PCI: Runtime resume bridges before bus rescans 2016-08-04 21:33:58 -04:00
pcie Merge branches 'pci/aspm', 'pci/dpc', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/pm' and 'pci/virtualization' into next 2016-08-01 12:23:31 -05:00
access.c PCI: Add pci_set_vpd_size() to set VPD size 2016-04-15 13:00:11 -05:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c Merge branches 'pci/demodularize-hosts' and 'pci/host-request-windows' into next 2016-08-01 12:23:57 -05:00
ecam.c tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI/MSI: irqchip: Fix PCI_MSI dependencies 2016-06-15 15:47:33 -05:00
Makefile x86/platform/intel-mid: Add Power Management Unit driver 2016-06-15 10:10:49 +02:00
msi.c PCI: Spread interrupt vectors in pci_alloc_irq_vectors() 2016-07-21 15:57:03 -05:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Power management and ACPI updates for v4.5-rc1 2016-01-12 20:25:09 -08:00
pci-driver.c PCI: Put PCIe ports into D3 during suspend 2016-06-13 14:57:36 -05:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-mid.c x86/platform/intel-mid: Add Power Management Unit driver 2016-06-15 10:10:49 +02:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c PCI: Put PCIe ports into D3 during suspend 2016-06-13 14:57:36 -05:00
pci.c PCI: Afford direct-complete to devices with non-standard PM 2016-09-28 11:45:27 -05:00
pci.h PCI: Put PCIe ports into D3 during suspend 2016-06-13 14:57:36 -05:00
probe.c Merge branches 'pci/aspm', 'pci/dpc', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/pm' and 'pci/virtualization' into next 2016-08-01 12:23:31 -05:00
proc.c PCI: Ignore write combining when mapping I/O port space 2016-06-17 14:43:33 -05:00
quirks.c PCI: Add ACS quirk for Solarflare SFC9220 2016-07-29 17:28:24 -05:00
remove.c PCI: Put PCIe ports into D3 during suspend 2016-06-13 14:57:36 -05:00
rom.c PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY 2016-03-12 06:00:29 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c PCI changes for the v4.8 merge window: 2016-08-02 17:12:29 -04:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Don't assign or reassign immutable resources 2016-03-08 12:14:31 -06:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
vc.c PCI: Fix unaligned accesses in VC code 2016-06-20 13:24:20 -05:00
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00