How to handle disconnection of eDP panels due to dynamic display mux switches
Lukas Wunner
lukas at wunner.de
Thu Apr 2 11:50:25 UTC 2020
On Thu, Apr 02, 2020 at 01:39:25PM +0200, Lukas Wunner wrote:
> First of all, there's DPCD byte 3 bit 6 (NO_AUX_HANDSHAKE_LINK_TRAINING)
> which is documented as follows:
>
> Does not require AUX CH handshake when the link configuration is
> already known. [...] The known-good drive current and pre-emphasis
> level (or those used in the last "full" link training with AUX CH
> handshake) must be used when the link training is performed without
> AUX CH handshake.
>
> That bit is set on the MacBook Pros in question.
>
> So I think what we should be doing here is that the DRM driver which
> happens to be muxed to the panel on boot performs link training and
> informs vga_switcheroo of the drive current, pre-emph level, etc.
> The other DRM driver is notified when that information is available
> and uses it to set up its eDP output, skipping an actual AUX CH
> handshake.
Actually I now remember that I already prepared for this by adding a
vga_switcheroo handler capability:
* @VGA_SWITCHEROO_NEEDS_EDP_CONFIG: whether the handler is unable to switch
* the AUX channel separately. This signals to clients that the active
* GPU needs to train the link and communicate the link parameters to the
* inactive GPU (mediated by vga_switcheroo). The inactive GPU may then
* skip the AUX handshake and set up its output with these pre-calibrated
* values (DisplayPort specification v1.1a, section 2.5.3.3)
And the referenced DP spec section says:
For a closed, embedded connection, the DisplayPort transmitter
and receiver may be set to pre-calibrated parameters without
going through the full link training sequence. In this mode,
the DisplayPort transmitter may start a normal operation
following the transmission of the Clock Recovery Pattern with
pre-calibrated drive current and pre-emphasis level, as shown
with a dotted arrow in Figure 2-36.
Thanks,
Lukas
More information about the dri-devel
mailing list