All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Frederik Schwan <frederik@tty42.de>,
	<intel-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <regressions@lists.linux.dev>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	"Dave Airlie" <airlied@redhat.com>
Subject: Re: [REGRESSION] i915: UHBR training fails with TB5 dock after 1fd440de4e02; source FFE update skipped?
Date: Mon, 23 Nov 2026 14:16:43 +0200	[thread overview]
Message-ID: <awQuqw8dBZ3UPLA_@ideak-desk.lan> (raw)
In-Reply-To: <awQg61Q0leUUP3yH@ideak-desk.lan>

On Mon, Nov 23, 2026 at 01:18:03PM +0200, Imre Deak wrote:
> On Mon, Nov 16, 2026 at 07:08:02PM +0100, Frederik Schwan wrote:
> 
> [...]
> 
> > From 55a68a5e094557572b278fa3193d36c147f63612 Mon Sep 17 00:00:00 2001
> > From: Frederik Schwan <freswa@archlinux.org>
> > Date: Mon, 16 Nov 2026 15:38:15 +0100
> > Subject: [PATCH v2] drm/i915/dp: Fix source PHY updates for UHBR links with LTTPRs
> 
> Could you resend only this patch, using the above Subject line for the
> email and making sure it's sent both to the
> intel-gfx@lists.freedesktop.org and the intel-xe@lists.freedesktop.org
> mailing lists. That ensures that we get CI test coverage for both
> drivers.

Did the above now, so no need to resend it:
https://lore.kernel.org/all/20261123120954.1115838-1-imre.deak@intel.com

> Thanks.
> 
> > 
> > 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
> > Link: https://lore.kernel.org/regressions/40e2af4139b94eaeecd41fcdccb4ec1ef3dc098a@intel.com/
> > Assisted-by: Codex:gpt-6
> > Signed-off-by: Frederik Schwan <freswa@archlinux.org>
> > ---
> > Changes in v2:
> > - Explain transparent UHBR training and legacy/DP-alt versus TBT-alt modes.
> > - Correct the FFE preset-selection path to use source per-lane capability.
> > - Point Fixes at the DPRX-only UHBR training rewrite, not tunnel support.
> > 
> >  .../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 ac1aff6edf05..1efc78b329a6 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);
> >  }
> >  
> > 
> > base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
> > -- 
> > 2.56.1
> > 
> 
> 
> 

  reply	other threads:[~2026-11-23 12:17 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 [this message]
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
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=awQuqw8dBZ3UPLA_@ideak-desk.lan \
    --to=imre.deak@intel.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frederik@tty42.de \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=regressions@lists.linux.dev \
    --cc=rodrigo.vivi@intel.com \
    /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.