As part of reviewing a recent issue with BOCO I looked more closely
at what we're doing for _PR3 detection.

We used to look at the immediate link partner of the GPU PCIe device to
detect _PR3. This was wrong because dGPUs have internal PCIe switches
and those switches won't have _PR3.

So I changed it a few years back to look at the root port.  This worked
correctly for some common cases, but I realized that if you have a bridge
between (for example a B650) then you might end up in the wrong power state
for either of these cases:
 * Bridge supports _PR3 but CPU root port doesn't
 * CPU root port supports _PR3 but bridge doesn't

Both of those cases could lead to actually using the wrong power management
for the dGPU.

So this series adjusts the detection to look at the link partner of the
first PCIe device "outside of the dGPU" instead of the root port.

Mario Limonciello (2):
  drm/amd: Add dedicated helper for amdgpu_device_find_parent()
  drm/amd: Adjust _PR3 detection

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 51 +++++++++++-----------
 1 file changed, 25 insertions(+), 26 deletions(-)

-- 
2.43.0

Reply via email to