Abhishek Sahu 6d2e369f0d PCI: Add NVIDIA GPU multi-function power dependencies
The NVIDIA Turing GPU is a multi-function PCI device with the following
functions:

  - Function 0: VGA display controller
  - Function 1: Audio controller
  - Function 2: USB xHCI Host controller
  - Function 3: USB Type-C UCSI controller

Function 0 is tightly coupled with other functions in the hardware.  When
function 0 is in D3, it gates power for hardware blocks used by other
functions, which means those functions only work when function 0 is in D0.
If any of these functions (1/2/3) are in D0, then function 0 should also be
in D0.

Commit 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller")
already creates a device link to show the dependency of function 1 on
function 0 of this GPU.  Create additional device links to express the
dependencies of functions 2 and 3 on function 0.  This means function 0
will be in D0 if any other function is in D0.

[bhelgaas: I think the PCI spec expectation is that functions can be
power-managed independently, so I don't think this device is technically
compliant.  For example, the PCIe r5.0 spec, sec 1.4, says "the PCI/PCIe
hardware/software model includes architectural constructs necessary to
discover, configure, and use a Function, without needing Function-specific
knowledge" and sec 5.1 says "D states are associated with a particular
Function" and "PM provides ... a mechanism to identify power management
capabilities of a given Function [and] the ability to transition a Function
into a certain power management state."]

Link: https://lore.kernel.org/lkml/20190606092225.17960-3-abhsahu@nvidia.com
Signed-off-by: Abhishek Sahu <abhsahu@nvidia.com>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2019-06-13 15:53:40 -05:00
..
2019-05-16 19:08:15 -07:00
2019-05-16 19:08:15 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 08:31:32 -07:00
2019-05-15 18:56:50 -07:00
2019-05-09 08:51:45 -07:00
2019-05-16 09:19:14 -07:00
2019-05-07 08:50:40 -07:00
2019-05-16 08:31:32 -07:00
2019-05-14 10:39:08 -07:00
2019-05-07 12:56:19 -07:00
2019-05-15 18:56:50 -07:00
2019-05-16 19:08:15 -07:00
2019-05-16 09:19:14 -07:00
2019-05-09 08:40:55 -07:00
2019-05-08 10:03:52 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 19:52:51 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 11:57:16 -07:00
2019-05-16 09:19:14 -07:00
2019-05-14 14:12:59 -07:00
2019-05-07 13:39:22 -07:00
2019-05-16 08:31:32 -07:00
2019-05-15 18:44:52 -07:00