android_kernel_xiaomi_sm8450/drivers/pci
Mario Limonciello c59f79e2b4 PCI/PM: Avoid D3cold for HP Pavilion 17 PC/1972 PCIe Ports
[ Upstream commit 256df20c590bf0e4d63ac69330cf23faddac3e08 ]

Hewlett-Packard HP Pavilion 17 Notebook PC/1972 is an Intel Ivy Bridge
system with a muxless AMD Radeon dGPU.  Attempting to use the dGPU fails
with the following sequence:

  ACPI Error: Aborting method \AMD3._ON due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
  radeon 0000:01:00.0: not ready 1023ms after resume; waiting
  radeon 0000:01:00.0: not ready 2047ms after resume; waiting
  radeon 0000:01:00.0: not ready 4095ms after resume; waiting
  radeon 0000:01:00.0: not ready 8191ms after resume; waiting
  radeon 0000:01:00.0: not ready 16383ms after resume; waiting
  radeon 0000:01:00.0: not ready 32767ms after resume; waiting
  radeon 0000:01:00.0: not ready 65535ms after resume; giving up
  radeon 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible

The issue is that the Root Port the dGPU is connected to can't handle the
transition from D3cold to D0 so the dGPU can't properly exit runtime PM.

The existing logic in pci_bridge_d3_possible() checks for systems that are
newer than 2015 to decide that D3 is safe.  This would nominally work for
an Ivy Bridge system (which was discontinued in 2015), but this system
appears to have continued to receive BIOS updates until 2017 and so this
existing logic doesn't appropriately capture it.

Add the system to bridge_d3_blacklist to prevent D3cold from being used.

Link: https://lore.kernel.org/r/20240307163709.323-1-mario.limonciello@amd.com
Reported-by: Eric Heintzmann <heintzmann.eric@free.fr>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3229
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Eric Heintzmann <heintzmann.eric@free.fr>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:12:37 +02:00
..
controller PCI: rockchip-ep: Remove wrong mask on subsys_vendor_id 2024-07-05 09:12:30 +02:00
endpoint PCI: pci-epf-test: Register notifier if only core_init_notifier is enabled 2023-01-14 10:15:47 +01:00
hotplug Revert "PCI: acpiphp: Reassign resources on bridge if necessary" 2023-12-20 15:44:30 +01:00
pcie PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3 2024-06-16 13:32:20 +02:00
switch PCI: switchtec: Fix an error handling path in switchtec_pci_probe() 2024-03-26 18:21:56 -04:00
access.c PCI: Reduce warnings on possible RW1C corruption 2022-04-08 14:40:19 +02:00
ats.c
bus.c
ecam.c
host-bridge.c
iov.c
irq.c PCI: Check for alloc failure in pci_request_irq() 2023-01-14 10:15:50 +01:00
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Prevent MSI hardware interrupt number truncation 2024-03-01 13:16:48 +01:00
of.c PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges' 2021-09-22 12:28:02 +02:00
p2pdma.c PCI/P2PDMA: Avoid pci_get_slot(), which may sleep 2021-07-20 16:05:47 +02:00
pci-acpi.c PCI/sysfs: Protect driver's D3cold preference from user space 2023-11-28 16:54:56 +00:00
pci-bridge-emul.c PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device 2022-01-27 10:54:26 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Add PCIe Root Capabilities Register 2021-09-26 14:08:55 +02:00
pci-driver.c PCI/PM: Drain runtime-idle callbacks before driver removal 2024-04-13 12:58:22 +02:00
pci-label.c PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun 2021-07-20 16:05:50 +02:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Protect driver's D3cold preference from user space 2023-11-28 16:54:56 +00:00
pci.c PCI/PM: Avoid D3cold for HP Pavilion 17 PC/1972 PCIe Ports 2024-07-05 09:12:37 +02:00
pci.h PCI/ERR: Cache RCEC EA Capability offset in pci_init_capabilities() 2024-04-13 12:58:22 +02:00
probe.c PCI: Cache PCIe Device Capabilities register 2024-04-13 12:58:22 +02:00
proc.c
quirks.c PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports 2024-04-13 12:59:13 +02:00
remove.c
rom.c
search.c
setup-bus.c PCI: Take other bus devices into account when distributing resources 2023-03-11 16:40:18 +01:00
setup-irq.c
setup-res.c PCI: Work around Intel I210 ROM BAR overlap defect 2024-04-13 12:58:23 +02:00
slot.c
syscall.c PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure 2021-09-18 13:40:10 +02:00
vc.c
vpd.c PCI: Allow VPD access for QLogic ISP2722 2021-05-14 09:49:57 +02:00
xen-pcifront.c