]> git.itanic.dy.fi Git - linux-stable/commit
drm/amdgpu: Dynamically probe for ATIF handle (v2)
authorLyude Paul <lyude@redhat.com>
Tue, 26 Jun 2018 01:09:07 +0000 (21:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Jun 2018 20:32:46 +0000 (15:32 -0500)
commitf9ff68521a5541e1fdaeb0ef11871c035b30e409
tree7e1ff7148d77d977f0d063215b5bb0c788e1d9f4
parent4aa5d5eb82bb237d0bb3a38b2a7555054d018081
drm/amdgpu: Dynamically probe for ATIF handle (v2)

The other day I was testing one of the HP laptops at my office with an
i915/amdgpu hybrid setup and noticed that hotplugging was non-functional
on almost all of the display outputs. I eventually discovered that all
of the external outputs were connected to the amdgpu device instead of
i915, and that the hotplugs weren't being detected so long as the GPU
was in runtime suspend. After some talking with folks at AMD, I learned
that amdgpu is actually supposed to support hotplug detection in runtime
suspend so long as the OEM has implemented it properly in the firmware.

On this HP ZBook 15 G4 (the machine in question), amdgpu wasn't managing
to find the ATIF handle at all despite the fact that I could see acpi
events being sent in response to any hotplugging. After going through
dumps of the firmware, I discovered that this machine did in fact
support ATIF, but that it's ATIF method lived in an entirely different
namespace than this device's handle (the device handle was
\_SB_.PCI0.PEG0.PEGP, but ATIF lives in ATPX's handle at
\_SB_.PCI0.GFX0).

So, fix this by probing ATPX's ACPI parent's namespace if we can't find
ATIF elsewhere, along with storing a pointer to the proper handle to use
for ATIF and using that instead of the device's handle.

This fixes HPD detection while in runtime suspend for this ZBook!

v2: Update the comment to reflect how the namespaces are arranged
based on the system configuration. (Alex)

Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c