Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Suraj Kandpal" <suraj.kandpal@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 02/10] drm/i915/dp: Limit M/N ratio for DP SST
Date: Wed, 16 Sep 2026 09:25:22 +0000	[thread overview]
Message-ID: <20260916092522.9546E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916090946.677564-3-suraj.kandpal@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915/dp: mode_valid allows modes that will fail atomic_check due to decoupled M/N and bandwidth checks
--

commit 0616c11329b8f8c5ca25700eb71cd2152a14fe54
Author: Suraj Kandpal <suraj.kandpal@intel.com>
Date:   Wed Sep 16 09:09:38 2026 +0000

    drm/i915/dp: Limit M/N ratio for DP SST

This commit restricts DisplayPort link configurations to those satisfying the
hardware limitation for the Link M/Link N ratio limit in the transcoder's
timing generator DDA. The constraint is checked during link rate configuration
and modes failing this check are pruned in mode_valid.

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0cd5e6b5034cf..f6a2152c4432a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
[ ... ]
> @@ -1300,6 +1329,31 @@ bool intel_dp_dotclk_valid(struct intel_display *display,
>  	return target_clock <= effective_dotclk_limit;
>  }
>  
> +bool intel_dp_mode_valid_m_n(struct intel_dp *intel_dp, int pixel_clock)
> +{
> +	struct intel_display *display = to_intel_display(intel_dp);
> +	struct intel_dp_link_caps_order order = {
> +		.key = INTEL_DP_LINK_CAPS_ORDER_KEY_RATE_LANE,
> +		.dir = INTEL_DP_LINK_CAPS_ORDER_DIR_DESC,
> +	};
> +	struct intel_dp_link_config link_config;
> +	struct intel_dp_link_caps_iter iter;
> +	bool found = false;
> +
> +	intel_dp_link_caps_iter_start(&iter, intel_dp->link.caps, order,
> +				      INTEL_DP_LINK_CAPS_FILTER_ALL);
> +	for_each_dp_link_config(&iter, &link_config) {
> +		if (intel_dp_can_support_m_n(display, pixel_clock, link_config.rate)) {
> +			found = true;
> +
> +			break;
> +		}
> +	}
> +	intel_dp_link_caps_iter_end(&iter);
> +
> +	return found;
> +}

[Severity: Medium]
Will this loop cause modes to falsely pass mode_valid checks but later fail
during atomic_check?

Because HBR3 uses 8b/10b encoding, it has a higher symbol clock (810 MHz) than
UHBR20 (625 MHz, 128b/132b). This means HBR3 can satisfy the M/N ratio limit
for a higher pixel clock than UHBR20.

If a high-resolution mode (e.g., 3.0 GHz pixel clock needing 40 Gbps) is tested,
this function passes because HBR3 satisfies the M/N ratio. Subsequently,
intel_dp_mode_valid_format() passes because it independently checks bandwidth
against the absolute max link rate (UHBR20).

However, during atomic_check, UHBR20 gets filtered out due to the M/N ratio
limit, and HBR3 gets rejected for lacking bandwidth, causing the modeset to
fail. Does mode_valid need to verify that the specific link rate satisfying the
M/N ratio also provides enough bandwidth for the mode?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260916090946.677564-1-suraj.kandpal@intel.com?part=2

  reply	other threads:[~2026-09-16  9:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  9:09 [PATCH v3 00/10] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-09-16  9:09 ` [PATCH v3 01/10] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-09-16  9:09 ` [PATCH v3 02/10] drm/i915/dp: Limit M/N ratio for DP SST Suraj Kandpal
2026-09-16  9:25   ` sashiko-bot [this message]
2026-09-16  9:33     ` Kandpal, Suraj
2026-09-16  9:09 ` [PATCH v3 03/10] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-09-16  9:09 ` [PATCH v3 04/10] drm/i915/dp: Add M/N ratio check with warning for DP link config Suraj Kandpal
2026-09-16  9:23   ` sashiko-bot
2026-09-16  9:09 ` [PATCH v3 05/10] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-09-16  9:09 ` [PATCH v3 06/10] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-09-16  9:09 ` [PATCH v3 07/10] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-09-16  9:23   ` sashiko-bot
2026-09-16  9:09 ` [PATCH v3 08/10] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n " Suraj Kandpal
2026-09-16  9:27   ` sashiko-bot
2026-09-16  9:09 ` [PATCH v3 09/10] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-09-16  9:09 ` [PATCH v3 10/10] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
2026-09-16  9:18 ` ✓ CI.KUnit: success for Implement Wa_14021768792 to bypass m_n ratio limit (rev8) Patchwork
2026-09-16  9:55 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-16 11:30 ` ✗ Xe.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=20260916092522.9546E1F000FF@smtp.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=suraj.kandpal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox