Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kory Maincent <kory.maincent@bootlin.com>
To: sashiko-reviews@lists.linux.dev
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/dp: Move eDP sink link rates reading helper out of i915
Date: Wed, 25 Nov 2026 11:03:54 +0100	[thread overview]
Message-ID: <57bb208d-e220-4ae0-94bb-5e873d138f92@bootlin.com> (raw)
In-Reply-To: <sashiko-outbox-220759@kernel.org>



On 11/18/26 11:53, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] drm/i915/dp: HBR2 quirk in intel_edp_set_sink_rates() skips
>    fallback
> --
> 
> commit b3bcea937e62f9aba672f8e2782fab0f2b184dbd
> Author: Kory Maincent <kory.maincent@bootlin.com>
> 
> drm/dp: Move eDP sink link rates reading helper out of i915
> 
> This commit moves the eDP DP_SUPPORTED_LINK_RATES reading logic from i915
> into a generic drm_dp_read_edp_sink_rates() helper.

...

>>   
>>   	/*
>>   	 * Use DP_LINK_RATE_SET if DP_SUPPORTED_LINK_RATES are available,
>>   	 * default to DP_MAX_LINK_RATE and DP_LINK_BW_SET otherwise.
>>   	 */
>> -	if (intel_dp->num_sink_rates)
>> +	if (num_sink_rates)
>>   		intel_dp->use_rate_select = true;
>>   	else
>>   		intel_dp_set_sink_rates(intel_dp);
> 
> [Severity: Medium]
> Can this leave intel_dp->num_sink_rates as 0 on platforms with
> QUIRK_EDP_LIMIT_RATE_HBR2 if DP_SUPPORTED_LINK_RATES only lists rates
> above 540000 kHz?
> 
> Previously, rates above 540000 kHz were filtered out before checking
> intel_dp->num_sink_rates, so an empty filtered list fell back to
> intel_dp_set_sink_rates().  Now num_sink_rates is checked before the
> following intel_dp_rate_limit_len() call clamps intel_dp->sink_rates:
> 
> drivers/gpu/drm/i915/display/intel_dp.c:intel_edp_set_sink_rates() {
> 	...
> 	if (num_sink_rates)
> 		intel_dp->use_rate_select = true;
> 	else
> 		intel_dp_set_sink_rates(intel_dp);
> 	...
> 	if (intel_dp->num_sink_rates && intel_has_quirk(display, QUIRK_EDP_LIMIT_RATE_HBR2))
> 		intel_dp->num_sink_rates = intel_dp_rate_limit_len(intel_dp->sink_rates,
> 								   intel_dp->num_sink_rates,
> 								   540000);
> }
> 
> When all entries in DP_SUPPORTED_LINK_RATES exceed 540000 kHz, this sets
> intel_dp->use_rate_select to true, skips intel_dp_set_sink_rates(), and
> then reduces intel_dp->num_sink_rates to 0, triggering drm_WARN_ON() in
> intel_dp_get_common_rates() and breaking eDP link training.

There is indeed maybe a small case where this can happen.
I will fix it in next version.

-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


  reply	other threads:[~2026-11-25 10:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 10:36 [PATCH 0/8] Move DRM helpers out of i915 driver Kory Maincent
2026-11-18 10:36 ` [PATCH 1/8] drm/dp: Move max DPRX link rate helper out of i915 Kory Maincent
2026-11-18 10:36 ` [PATCH 2/8] drm/dp: Move DPRX 128b/132b link rates " Kory Maincent
2026-11-18 10:36 ` [PATCH 3/8] drm/dp: Move DPRX 128b/132b support " Kory Maincent
2026-11-18 10:36 ` [PATCH 4/8] drm/dp: Move supported 128b/132b link rates " Kory Maincent
2026-11-18 10:36 ` [PATCH 5/8] drm/dp: Move DP sink link rates reading " Kory Maincent
2026-11-18 10:36 ` [PATCH 6/8] drm/dp: Make the DPRX link rates helpers static Kory Maincent
2026-11-18 10:36 ` [PATCH 7/8] drm/dp: Move eDP sink link rates reading helper out of i915 Kory Maincent
2026-11-18 10:53   ` sashiko-bot
2026-11-25 10:03     ` Kory Maincent [this message]
2026-11-18 10:36 ` [PATCH 8/8] drm: Move DSC capability " Kory Maincent
2026-11-18 10:45   ` sashiko-bot
2026-11-19  1:28   ` kernel test robot
2026-11-18 11:49 ` ✗ CI.checkpatch: warning for Move DRM helpers out of i915 driver Patchwork
2026-11-18 11:52 ` ✓ CI.KUnit: success " Patchwork
2026-11-18 12:29 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-19  1:51 ` ✓ Xe.CI.FULL: " 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=57bb208d-e220-4ae0-94bb-5e873d138f92@bootlin.com \
    --to=kory.maincent@bootlin.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox