[PATCH 4/5] drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo

Alex Deucher alexdeucher at gmail.com
Wed Mar 8 20:34:47 UTC 2017

On Wed, Mar 8, 2017 at 12:01 AM, Lukas Wunner <lukas at wunner.de> wrote:
> On Tue, Mar 07, 2017 at 03:30:30PM -0500, Alex Deucher wrote:
>> On Fri, Feb 24, 2017 at 2:19 PM, Lukas Wunner <lukas at wunner.de> wrote:
>> > An external Thunderbolt GPU can neither drive the laptop's panel nor be
>> > powered off by the platform, so there's no point in registering it with
>> > vga_switcheroo.  In fact, when the external GPU is runtime suspended,
>> > vga_switcheroo will cut power to the internal discrete GPU, resulting in
>> > a lockup.
>> I'm not necessarily opposed to this, but I'd prefer something more
>> generic.  E.g., what happens if someone uses another dGPU in a docking
>> station or some other sort of PCIe bridge?
> Such a dGPU is only relevant to vga_switcheroo if it can either drive
> the panel or be powered off by the platform.  Does such a product exist?
> I've never heard of one, and think that's because such a product doesn't
> make sense:  A docking staton is not power-constrained, it's stationary
> and connected to a wall outlet, so there's no need to power the dGPU off
> when it's not in use.
> And at a docking station you're usually connected to a larger monitor,
> so having the dGPU drive the laptop's smaller panel isn't necessary either.
> In the rare cases where there's no larger monitor, you just use the dGPU
> for render offloading, just as you would for contemporary ATPX laptops.
> OTOH, dGPUs in Thunderbolt enclosures *do* exist and connecting them
> to an ATPX machine causes failure, as explained in the commit message.

Whether you introduce additional dGPUs via thunderbolt or some
proprietary interface or a pci bridge in a docking station the result
is still the same.  You end up with the potential scenario you
described in this commit message that there may be confusion as to
which GPU is controlled via ACPI power controls.

I talked to the windows team.  They special case thunderbolt as well,
so the patch is probably fine.  For pcie ports in a docking station, I
suspect there may not actually be any docking stations supported by PX
laptops where this could be an issue.  For non-thunderbolt detachable
graphics there is a new ATIF function to query the bus number of the
supported device.  I'll send a patch out for that in a bit.

Thinking about this more, long term we should probably only register
with vga_switcheroo if we support display muxing which is a legacy
feature these days.  Most systems are mux-less so we just need to
handle dgpu power control via runtime pm.


>> I think on AMD platforms
>> at least we should be able to determine what devices are the
>> switcheroo devices based on information in the ATIF and ATPX ACPI
>> methods.  In that case, we can be explicit in which devices we
>> register with vga_switcheroo.
> Is there public documentation on these methods somewhere?
> Thanks,
> Lukas

More information about the amd-gfx mailing list