lkml.org 
[lkml]   [2022]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported
On Tue, Aug 16, 2022 at 11:06:18AM +0300, Jani Nikula wrote:
> On Tue, 16 Aug 2022, Kai-Heng Feng <kai.heng.feng@canonical.com> wrote:
> > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can switch to
> > dGFX so external monitors are routed to dGFX, and more monitors can be
> > supported as result.
> >
> > To switch the DP-IN to dGFX, the driver needs to invoke _DSM function 20
> > on intel_dsm_guid2. This method is described in Intel document 632107.
>
> Is this the policy decision that we want to unconditionally make,
> though?

In general, we handle switching of outputs between GPUs in vga_switcheroo.c
upon a request from user space via sysfs (well, debugfs currently).
It's up to users to decide which policy suits their needs best.

That said, we never grew support to allow different switching policies for
the built-in panel and external outputs. Laptops supporting this are
rare. Older MacBook Pros introduced between 2008 and 2010 are among them:
They have separate muxes for the panel and external DP port. Our policy
is documented in a code comment in drivers/platform/x86/apple-gmux.c:

* The external DP port is only fully switchable on the first two unibody
* MacBook Pro generations, MBP5 2008/09 and MBP6 2010. This is done by an
* `NXP CBTL06141`_ which is controlled by gmux.
[...]
* Our switching policy for the external port is that on those generations
* which are able to switch it fully, the port is switched together with the
* panel when IGD / DIS commands are issued to vga_switcheroo. It is thus
* possible to drive e.g. a beamer on battery power with the integrated GPU.
* The user may manually switch to the discrete GPU if more performance is
* needed.
*
* On all newer generations, the external port can only be driven by the
* discrete GPU. If a display is plugged in while the panel is switched to
* the integrated GPU, *both* GPUs will be in use for maximum performance.
* To decrease power consumption, the user may manually switch to the
* discrete GPU, thereby suspending the integrated GPU.

In other words, on these older MacBook Pros, we switch the panel and
external DP port in unison, thus always allowing one of the two GPUs
to runtime suspend and save power.

Thanks,

Lukas

\
 
 \ /
  Last update: 2022-08-18 13:54    [W:0.143 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site