linux-stable/drivers/pci
Lukas Wunner c6e331312e PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI
Recent laptops with dual AMD GPUs fail to suspend the discrete GPU, thus
causing lockups on system sleep and high power consumption at runtime.
The discrete GPU would normally be suspended to D3cold by turning off
ACPI _PR3 Power Resources of the Root Port above the GPU.

However on affected systems, the Root Port is hotplug-capable and
pci_bridge_d3_possible() only allows hotplug ports to go to D3 if they
belong to a Thunderbolt device or if the Root Port possesses a
"HotPlugSupportInD3" ACPI property.  Neither is the case on affected
laptops.  The reason for whitelisting only specific, known to work
hotplug ports for D3 is that there have been reports of SkyLake Xeon-SP
systems raising Hardware Error NMIs upon suspending their hotplug ports:
https://lore.kernel.org/linux-pci/20170503180426.GA4058@otc-nc-03/

But if a hotplug port is power manageable by ACPI (as can be detected
through presence of Power Resources and corresponding _PS0 and _PS3
methods) then it ought to be safe to suspend it to D3.  To this end,
amend acpi_pci_bridge_d3() to whitelist such ports for D3.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1222
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1252
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1304
Reported-and-tested-by: Arthur Borsboom <arthurborsboom@gmail.com>
Reported-and-tested-by: matoro <matoro@airmail.cc>
Reported-by: Aaron Zakhrov <aaron.zakhrov@gmail.com>
Reported-by: Michal Rostecki <mrostecki@suse.com>
Reported-by: Shai Coleman <git@shaicoleman.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-10-06 12:20:23 +02:00
..
controller pci-v5.9-fixes-2 2020-10-02 14:48:25 -07:00
endpoint PCI: Fix kerneldoc warnings 2020-08-05 18:23:14 -05:00
hotplug treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pcie pci-v5.9-changes 2020-08-07 18:48:15 -07:00
switch PCI: switchtec: Add missing __iomem tag to fix sparse warnings 2020-07-31 11:23:45 -05:00
access.c Merge branch 'pci/misc' 2020-08-05 18:24:16 -05:00
ats.c Merge branch 'pci/doc' 2020-08-05 18:24:22 -05:00
bus.c PCI: Add device even if driver attach failed 2020-07-07 17:33:41 -05:00
ecam.c PCI: host-generic: Support building as modules 2020-05-01 16:29:27 +01:00
host-bridge.c
iov.c s390/pci: create links between PFs and VFs 2020-05-20 10:22:51 +02:00
irq.c PCI: Remove unused pci_lost_interrupt() 2020-07-29 14:25:18 -05:00
Kconfig Merge branch 'pci/trivial' 2019-11-28 08:54:55 -06:00
Makefile PCI: Allow building PCIe things without PCIEPORTBUS 2019-11-21 07:52:33 -06:00
mmap.c
msi.c pci-v5.9-changes 2020-08-07 18:48:15 -07:00
of.c Merge branch 'pci/doc' 2020-08-05 18:24:22 -05:00
p2pdma.c PCI/P2PDMA: Fix build without DMA ops 2020-08-17 17:08:21 -05:00
pci-acpi.c PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI 2020-10-06 12:20:23 +02:00
pci-bridge-emul.c PCI: pci-bridge-emul: Eliminate the 'reserved' member 2020-05-22 12:39:35 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Fix big-endian support 2019-10-17 12:42:48 +01:00
pci-driver.c PCI: Restrict probe functions to housekeeping CPUs 2020-07-08 11:39:01 +02:00
pci-label.c PCI: Replace http:// links with https:// 2020-06-30 13:05:09 -05:00
pci-mid.c PCI: intel-mid: Convert to new X86 CPU match macros 2020-03-24 21:35:06 +01:00
pci-pf-stub.c PCI: Fix kerneldoc warnings 2020-08-05 18:23:14 -05:00
pci-stub.c
pci-sysfs.c Merge branch 'pci/misc' 2020-04-02 14:26:38 -05:00
pci.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pci.h Merge branch 'pci/host-probe-refactor' 2020-08-05 18:24:21 -05:00
probe.c Merge branch 'pci/host-probe-refactor' 2020-08-05 18:24:21 -05:00
proc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
quirks.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
remove.c PCI: Fix pci_host_bridge struct device release/free handling 2020-05-14 16:36:35 -05:00
rom.c PCI: Use ioremap(), not phys_to_virt() for platform ROM 2020-03-30 09:52:23 -05:00
search.c Merge branch 'pci/host-vmd' 2020-01-29 17:00:02 -06:00
setup-bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
setup-irq.c
setup-res.c PCI: Replace lkml.org, spinics, gmane with lore.kernel.org 2020-06-30 13:05:16 -05:00
slot.c PCI: Fix pci_create_slot() reference count leak 2020-07-10 15:48:22 -05:00
syscall.c
vc.c PCI: Fix kerneldoc warnings 2020-08-05 18:23:14 -05:00
vpd.c
xen-pcifront.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00