PCI: Add AMD GPU multi-function power dependencies
commit 60b78ed088ebe1a872ee1320b6c5ad6ee2c4bd9a upstream.
Some AMD GPUs have built-in USB xHCI and USB Type-C UCSI controllers with
power dependencies between the GPU and the other functions as in
6d2e369f0d
("PCI: Add NVIDIA GPU multi-function power dependencies").
Add device link support for the AMD integrated USB xHCI and USB Type-C UCSI
controllers.
Without this, runtime power management, including GPU resume and temp and
fan sensors don't work correctly.
Reported-at: https://gitlab.freedesktop.org/drm/amd/-/issues/1704
Link: https://lore.kernel.org/r/20210903063311.3606226-1-evan.quan@amd.com
Signed-off-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cd64b416ae
commit
87f7032dc2
@ -5346,7 +5346,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
|
||||
PCI_CLASS_MULTIMEDIA_HD_AUDIO, 8, quirk_gpu_hda);
|
||||
|
||||
/*
|
||||
* Create device link for NVIDIA GPU with integrated USB xHCI Host
|
||||
* Create device link for GPUs with integrated USB xHCI Host
|
||||
* controller to VGA.
|
||||
*/
|
||||
static void quirk_gpu_usb(struct pci_dev *usb)
|
||||
@ -5355,9 +5355,11 @@ static void quirk_gpu_usb(struct pci_dev *usb)
|
||||
}
|
||||
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
|
||||
PCI_CLASS_SERIAL_USB, 8, quirk_gpu_usb);
|
||||
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
|
||||
PCI_CLASS_SERIAL_USB, 8, quirk_gpu_usb);
|
||||
|
||||
/*
|
||||
* Create device link for NVIDIA GPU with integrated Type-C UCSI controller
|
||||
* Create device link for GPUs with integrated Type-C UCSI controller
|
||||
* to VGA. Currently there is no class code defined for UCSI device over PCI
|
||||
* so using UNKNOWN class for now and it will be updated when UCSI
|
||||
* over PCI gets a class code.
|
||||
@ -5370,6 +5372,9 @@ static void quirk_gpu_usb_typec_ucsi(struct pci_dev *ucsi)
|
||||
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
|
||||
PCI_CLASS_SERIAL_UNKNOWN, 8,
|
||||
quirk_gpu_usb_typec_ucsi);
|
||||
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
|
||||
PCI_CLASS_SERIAL_UNKNOWN, 8,
|
||||
quirk_gpu_usb_typec_ucsi);
|
||||
|
||||
/*
|
||||
* Enable the NVIDIA GPU integrated HDA controller if the BIOS left it
|
||||
|
Loading…
Reference in New Issue
Block a user