Alexon Oliveira (the reporter) tested v2 of this series and gave his
Tested-by on the cover letter. Repeating it here, as patchwork does not
carry a tag from the cover letter over to the individual patches.

He tested on a ThinkPad P1 Gen 7 (Meteor Lake) with a Lenovo ThinkPad
Thunderbolt 4 Dock (Synaptics VMM6212) and a Samsung TV, with Fedora 44
kernel 7.2.15 and drm_display_helper.ko and i915.ko rebuilt with both
patches. The "Failed to get ACT after 3000 ms" errors, 3 without the
patches, are gone, and the new TV connector is connected 2.48 s after the
HPD drop instead of 8.44 s.

  https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17741

For reference, the commit message of v2:

> drm/i915/dp_mst: Skip link retrain and the ACT wait for disconnected MST 
> streams
>
> When a dock drops the upstream HPD, for instance when a TV behind it is
> powered on, the MST topology is torn down and the MST connectors get
> unregistered, while the CRTCs stay bound to them in the atomic state until
> userspace disables them.
>
> After the HPD is back, the link status of the link reads as all zeros, so
> intel_dp_retrain_link() selects the pipe still bound to the old MST
> connector and forces a modeset on it, while the topology is being
> rediscovered. drm_dp_add_payload_part1() fails, as the port is not in the
> topology anymore, but the enable sequence carries on and waits for an ACT
> at the branch that is never triggered, since nothing was written to DPCD
> 0x1c0-0x1c2:
>
>   [drm] *ERROR* Failed to get ACT after 3000 ms, last status: 04
>
> The same wait happens when userspace disables the stale pipe afterwards,
> as drm_dp_remove_payload_part1() doesn't remove the payload of a port that
> is not in the topology. The new connector only gets registered after these
> waits are over.
>
> Fix this by:
>
> - Not retraining the link if the MST sinks of all the active pipes are
>   gone. If any stream is still connected all the pipes are kept, as the
>   link only gets retrained after all the streams on it are disabled.
>
> - Only waiting for the ACT at the branch if the payload was allocated to
>   the DFP on enable, and if drm_dp_remove_payload_part1() removed it from
>   the branch on disable. The ACT generation and the wait for it in the
>   source are left as they were.
>
> Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17741
> Signed-off-by: Xiao Lu <[email protected]>

Tested-by: Alexon Oliveira <[email protected]>

Reply via email to