All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Frederik Schwan <freswa@archlinux.org>
Cc: <intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>,
	"Jani Nikula" <jani.nikula@intel.com>,
	<dri-devel@lists.freedesktop.org>,
	"Dave Airlie" <airlied@redhat.com>,
	Frederik Schwan <freswa@archlinux.org>, <stable@vger.kernel.org>
Subject: Re: [CI] drm/i915/dp: Fix source PHY updates for UHBR links with LTTPRs
Date: Thu, 26 Nov 2026 19:48:57 +0200	[thread overview]
Message-ID: <awhxCe7xsZ12eA75@ideak-desk.lan> (raw)
In-Reply-To: <20261123120954.1115838-1-imre.deak@intel.com>

Thanks for the patch, it's pushed to drm-intel-next.

On Mon, Nov 23, 2026 at 02:09:54PM +0200, Imre Deak wrote:
> From: Frederik Schwan <freswa@archlinux.org>
> 
> 128b/132b links use LTTPR-transparent training even when LTTPRs are
> present. The DPRX is trained directly in a single phase, without first
> training each LTTPR PHY separately. The source must therefore program
> its FFE parameters during this DPRX training phase.
> 
> The source signal-level update is currently guarded by
> intel_dp_phy_is_downstream_of_source(). With LTTPRs present, this only
> accepts the source-adjacent LTTPR PHY and rejects DP_PHY_DPRX. That is
> appropriate for non-transparent 8b/10b training, but skips the source
> FFE update during 128b/132b training. This affects legacy and DP-alt
> port modes; in TBT-alt mode the Thunderbolt subsystem owns and programs
> the source PHY.
> 
> Program the source signal levels for UHBR regardless of the detected
> LTTPRs. Also make the per-lane capability check used by
> intel_dp_get_lane_adjust_tx_ffe_preset() use the source PHY's capability
> for UHBR, rather than treating the DPRX as a separately trained
> receiver behind an LTTPR. Preserve the existing 8b/10b behavior.
> 
> Enabling UHBR tunneling exposed this older bug on a ThinkPad P1 Gen 8
> with a ThinkPad Thunderbolt 5 Smart Dock 7500. Updating the source FFE
> presets restores four-lane UHBR20 training and both DP displays.
> 
> Fixes: a421d8a99216 ("drm/i915/dp: rewrite DP 2.0 128b/132b link training based on errata")
> Cc: stable@vger.kernel.org # v5.18+
> Link: https://lore.kernel.org/regressions/40e2af4139b94eaeecd41fcdccb4ec1ef3dc098a@intel.com/
> Assisted-by: Codex:gpt-6
> Signed-off-by: Frederik Schwan <freswa@archlinux.org>
> Acked-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  .../drm/i915/display/intel_dp_link_training.c    | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> index ac1aff6edf052..1efc78b329a69 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> @@ -773,11 +773,14 @@ static u8 intel_dp_phy_preemph_max(struct intel_dp *intel_dp,
>  }
>  
>  static bool has_per_lane_signal_levels(struct intel_dp *intel_dp,
> +				       const struct intel_crtc_state *crtc_state,
>  				       enum drm_dp_phy dp_phy)
>  {
>  	struct intel_display *display = to_intel_display(intel_dp);
>  
> -	return !intel_dp_phy_is_downstream_of_source(intel_dp, dp_phy) ||
> +	/* UHBR training always adjusts the source PHY, even with LTTPRs. */
> +	return (!intel_dp_is_uhbr(crtc_state) &&
> +		!intel_dp_phy_is_downstream_of_source(intel_dp, dp_phy)) ||
>  		DISPLAY_VER(display) >= 10 || display->platform.broxton;
>  }
>  
> @@ -790,7 +793,7 @@ static u8 intel_dp_get_lane_adjust_tx_ffe_preset(struct intel_dp *intel_dp,
>  {
>  	u8 tx_ffe = 0;
>  
> -	if (has_per_lane_signal_levels(intel_dp, dp_phy)) {
> +	if (has_per_lane_signal_levels(intel_dp, crtc_state, dp_phy)) {
>  		lane = min(lane, crtc_state->lane_count - 1);
>  		tx_ffe = drm_dp_get_adjust_tx_ffe_preset(link_status, lane);
>  	} else {
> @@ -813,7 +816,7 @@ static u8 intel_dp_get_lane_adjust_vswing_preemph(struct intel_dp *intel_dp,
>  	u8 voltage_max;
>  	u8 preemph_max;
>  
> -	if (has_per_lane_signal_levels(intel_dp, dp_phy)) {
> +	if (has_per_lane_signal_levels(intel_dp, crtc_state, dp_phy)) {
>  		lane = min(lane, crtc_state->lane_count - 1);
>  
>  		v = drm_dp_get_adjust_request_voltage(link_status, lane);
> @@ -1021,7 +1024,12 @@ void intel_dp_set_signal_levels(struct intel_dp *intel_dp,
>  		       TRAIN_SET_PREEMPH_ARGS(intel_dp->train_set));
>  	}
>  
> -	if (intel_dp_phy_is_downstream_of_source(intel_dp, dp_phy))
> +	/*
> +	 * UHBR links use transparent training, so the source PHY must be
> +	 * programmed during the DPRX training phase even with LTTPRs present.
> +	 */
> +	if (intel_dp_is_uhbr(crtc_state) ||
> +	    intel_dp_phy_is_downstream_of_source(intel_dp, dp_phy))
>  		encoder->set_signal_levels(encoder, crtc_state);
>  }
>  
> -- 
> 2.49.1
> 

  reply	other threads:[~2026-11-26 17:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 22:08 [REGRESSION] i915: UHBR training fails with TB5 dock after 1fd440de4e02; source FFE update skipped? Frederik Schwan
2026-11-16 10:35 ` Jani Nikula
2026-11-16 12:39   ` Frederik Schwan
2026-11-16 14:24 ` Imre Deak
2026-11-16 18:08   ` Frederik Schwan
2026-11-20 22:18     ` Dave Airlie
2026-11-23 11:18     ` Imre Deak
2026-11-23 12:16       ` Imre Deak
2026-11-23 12:09     ` [CI] drm/i915/dp: Fix source PHY updates for UHBR links with LTTPRs Imre Deak
2026-11-26 17:48       ` Imre Deak [this message]
2026-11-16 14:49 ` [REGRESSION] i915: UHBR training fails with TB5 dock after 1fd440de4e02; source FFE update skipped? sashiko-bot
2026-11-16 17:46 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
2026-11-18 16:29 ` ✗ LGCI.VerificationFailed: failure for i915: UHBR training fails with TB5 dock after 1fd440de4e02; source FFE update skipped? (rev2) Patchwork
2026-11-23 14:36 ` ✗ CI.checkpatch: warning for drm/i915/dp: Fix source PHY updates for UHBR links with LTTPRs Patchwork
2026-11-23 14:38 ` ✗ CI.KUnit: failure " Patchwork
2026-11-23 22:11 ` ✗ Fi.CI.BUILD: failure for i915: UHBR training fails with TB5 dock after 1fd440de4e02; source FFE update skipped? (rev3) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awhxCe7xsZ12eA75@ideak-desk.lan \
    --to=imre.deak@intel.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freswa@archlinux.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.