From: sashiko-bot@kernel.org
To: "Lee Shawn C" <shawn.c.lee@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915/dp: Start eDP link training from VBT fast link train vswing/pre-emphasis levels
Date: Tue, 10 Nov 2026 12:14:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-206989@kernel.org> (raw)
In-Reply-To: <20261110115432.894616-4-shawn.c.lee@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/dp: intel_dp_link_training_clock_recovery() assumes
initial level 0
--
commit 6c36eea023572273fb066c2544c30e572e659dc6
Author: Lee Shawn C <shawn.c.lee@intel.com>
drm/i915/dp: Start eDP link training from VBT fast link train vswing/pre-emphasis levels
This commit initializes intel_dp->train_set from the VBT fast link
training voltage swing and pre-emphasis levels at the start of eDP clock
recovery when link recovery is idle.
> 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..3de74eb1d3d4a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
[ ... ]
> @@ -1032,6 +1104,10 @@ intel_dp_reset_link_train(struct intel_dp *intel_dp,
> u8 dp_train_pat)
> {
> memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
> +
> + if (intel_dp_use_vbt_fast_link_levels(intel_dp, crtc_state, dp_phy))
> + intel_dp_init_train_set_from_vbt(intel_dp, crtc_state, dp_phy);
> +
> intel_dp_set_signal_levels(intel_dp, crtc_state, dp_phy);
> return intel_dp_set_link_train(intel_dp, crtc_state, dp_phy, dp_train_pat);
> }
[Severity: Medium]
Does starting intel_dp_reset_link_train() at non-zero VBT levels throw off
the retry and max-vswing tracking in
intel_dp_link_training_clock_recovery()?
drivers/gpu/drm/i915/display/intel_dp_link_training.c:intel_dp_link_training_clock_recovery() {
u8 old_link_status[DP_LINK_STATUS_SIZE] = {};
int voltage_tries, cr_tries, max_cr_tries;
u8 link_status[DP_LINK_STATUS_SIZE];
bool max_vswing_reached = false;
...
if (!intel_dp_reset_link_train(intel_dp, crtc_state, dp_phy,
DP_TRAINING_PATTERN_1 |
DP_LINK_SCRAMBLING_DISABLE)) {
...
voltage_tries = 1;
for (cr_tries = 0; cr_tries < max_cr_tries; ++cr_tries) {
...
if (max_vswing_reached) {
intel_dp_dump_link_status(intel_dp, dp_phy, link_status);
lt_dbg(intel_dp, dp_phy, "Max Voltage Swing reached\n");
return false;
}
...
if (!intel_dp_adjust_request_changed(crtc_state, old_link_status, link_status))
++voltage_tries;
else
voltage_tries = 1;
memcpy(old_link_status, link_status, sizeof(link_status));
if (intel_dp_link_max_vswing_reached(intel_dp, crtc_state))
max_vswing_reached = true;
}
}
old_link_status starts zero-initialized, representing voltage swing 0 and
pre-emphasis 0. When intel_dp_reset_link_train() programs non-zero VBT
levels and the first poll does not lock, intel_dp_adjust_request_changed()
compares the sink's first adjust request against (0, 0) instead of the VBT
levels: if the sink requests the same VBT levels, voltage_tries is reset
to 1 instead of incrementing to 2 (trying those levels 6 times instead of
5), whereas if the sink requests (0, 0), voltage_tries increments to 2 on
the first attempt at (0, 0) (aborting after 4 tries instead of 5).
Also, max_vswing_reached is initialized to false before
intel_dp_reset_link_train(), so if the initial VBT levels already hit the
maximum voltage swing, the first loop iteration does not notice that max
vswing was already reached.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110115432.894616-1-shawn.c.lee@intel.com?part=3
next prev parent reply other threads:[~2026-11-10 12:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 11:54 [PATCH 0/4] drm/i915/dp: Use the VBT eDP fast link training params Lee Shawn C
2026-11-10 11:54 ` [PATCH 1/4] drm/i915/bios: Split out parsing the " Lee Shawn C
2026-11-10 11:54 ` [PATCH 2/4] drm/i915/bios: Parse eDP fast link training params only if enabled Lee Shawn C
2026-11-10 12:07 ` sashiko-bot
2026-11-10 12:31 ` Ville Syrjälä
2026-11-11 8:07 ` Lee, Shawn C
2026-11-10 11:54 ` [PATCH 3/4] drm/i915/dp: Start eDP link training from VBT fast link train vswing/pre-emphasis levels Lee Shawn C
2026-11-10 12:14 ` sashiko-bot [this message]
2026-11-10 11:54 ` [PATCH 4/4] drm/i915/dp: Use the VBT fast link training link config for eDP Lee Shawn C
2026-11-10 12:14 ` sashiko-bot
2026-11-10 12:05 ` ✓ CI.KUnit: success for drm/i915/dp: Use the VBT eDP fast link training params Patchwork
2026-11-10 12:42 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-10 15:35 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-10 15:41 ` ✓ i915.CI.BAT: " Patchwork
2026-11-10 20:41 ` ✗ i915.CI.Full: failure " 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=sashiko-outbox-206989@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shawn.c.lee@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.