Re: [PATCH 2/3] drm/msm/dp: don't log an expected link-training fallback as errors
From: Dmitry Baryshkov
Date: Fri Nov 27 2026 - 06:54:40 EST
On Mon, Oct 05, 2026 at 03:14:31PM +0200, Jean-Francois Bobier wrote:
> msm_dp_ctrl_on_link() implements DP link fallback: it retries
> msm_dp_ctrl_setup_main_link() up to five times, stepping the link rate
> down HBR3 -> HBR2 -> HBR -> RBR and then reducing the lane count, and
> breaks as soon as training succeeds. Every step of that search is
> therefore expected to fail before the one that works.
>
> Each failed attempt currently logs at error level, from four places:
>
> max v_level reached
> link training #1 on phy %d failed. ret=%d
> link training #2 on phy %d failed. ret=%d
> link training on sink failed. ret=%d
>
> A monitor that settles on two lanes after three attempts prints nine
> error lines on a completely successful attach -- which is how a cable
> that merely has two bad lanes looks identical in the log to a sink that
> never trains at all.
>
> Nothing is lost by demoting them. When the retry loop really does
> exhaust itself, msm_dp_ctrl_on_link() returns the error and
> msm_dp_display_process_hpd_high() already reports it once, at error
> level, as "Failed link training (rc=%d)" -- which is the correct place,
> because it is the only one that knows the search is over.
>
> Demote the per-attempt messages to drm_dbg_dp() so they remain available
> with drm.debug, and keep the final verdict where it is.
>
> Also demote the unsolicited AUX interrupt message. msm_dp_aux_isr()
> returns IRQ_NONE when no AUX transaction is outstanding, which is the
> whole of the correct response for an interrupt that is not ours -- the
> AUX block shares its interrupt and sinks raise AUX status asynchronously
> around hotplug, so this fires twice on a normal DisplayPort attach.
>
> Signed-off-by: Jean-Francois Bobier <jean-francois.bobier@xxxxxxxxxxx>
> ---
> drivers/gpu/drm/msm/dp/dp_aux.c | 9 ++++++++-
> drivers/gpu/drm/msm/dp/dp_ctrl.c | 15 ++++++++++-----
> 2 files changed, 18 insertions(+), 6 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry