PCI: vmd: Add quirk to configure PCIe ASPM and LTR
authorDavid E. Box <david.e.box@linux.intel.com>
Fri, 20 Jan 2023 03:15:22 +0000 (19:15 -0800)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Thu, 2 Feb 2023 15:02:40 +0000 (16:02 +0100)
commitf492edb40b54862cbd65e6aa5eb39fa40f9949bf
treeccbb124342cf8e1f5bf9ef61c1867aa99c6313f0
parent14d2079af64835494fe5c59ed63222d91a38a624
PCI: vmd: Add quirk to configure PCIe ASPM and LTR

PCIe ports reserved for VMD use are not visible to BIOS and therefore not
configured to enable PCIe ASPM or LTR values (which BIOS will configure if
they are not set). Lack of this programming results in high power
consumption on laptops as reported in bugzilla.  For affected products use
pci_enable_link_state to set the allowed link states for devices on the
root ports. Also set the LTR value to the maximum value needed for the SoC.

This is a workaround for products from Rocket Lake through Alder Lake.
Raptor Lake, the latest product at this time, has already implemented LTR
configuring in BIOS. Future products will move ASPM configuration back to
BIOS as well.  As this solution is intended for laptops, support is not
added for hotplug or for devices downstream of a switch on the root port.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=212355
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215063
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213717
Link: https://lore.kernel.org/r/20230120031522.2304439-5-david.e.box@linux.intel.com
Signed-off-by: Michael Bottini <michael.a.bottini@linux.intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
drivers/pci/controller/vmd.c