From: sashiko-bot@kernel.org
To: "Suraj Kandpal" <suraj.kandpal@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v7 04/13] drm/i915/dp_mst: Limit M/N ratio for MST
Date: Thu, 22 Oct 2026 03:43:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-180972@kernel.org> (raw)
In-Reply-To: <20261022032247.1378809-5-suraj.kandpal@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915/dp_mst: M/N mode_valid check mismatches MST compute_config limits
--
commit 67d8f2b2b1195befcc18a05f5eb7b442e2188782
Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
drm/i915/dp_mst: Limit M/N ratio for MST
This commit adds a Link M/Link N ratio check to mst_connector_mode_valid_ctx()
using intel_dp_mode_valid_m_n() to prune display modes that exceed the
hardware M/N ratio limit on MST connectors.
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 7023619aaaba9..f00edfb66a10a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -1565,6 +1565,11 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,
> min_link_bpp_x16,
> bw_overhead_flags);
>
> + if (!intel_dp_mode_valid_m_n(intel_dp, mode->clock)) {
> + *status = MODE_CLOCK_HIGH;
> + return 0;
> + }
> +
> /*
> * TODO:
> * - Also check if compression would allow for the mode
[Severity: Medium]
Does calling intel_dp_mode_valid_m_n() here match the link configuration
constraints enforced during MST modeset in intel_dp_compute_config_limits()?
In drivers/gpu/drm/i915/display/intel_dp_mst.c, mst_connector_mode_valid_ctx()
evaluates bandwidth and DSC against max_bw_config, whereas
intel_dp_mode_valid_m_n() in drivers/gpu/drm/i915/display/intel_dp.c iterates
over all configurations in INTEL_DP_LINK_CAPS_FILTER_ALL:
drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_mode_valid_m_n() {
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, m_n_pixel_clock,
link_config.rate)) {
found = true;
break;
}
}
}
On a UHBR-capable MST topology (for example UHBR10 with a 312.5 MHz symbol
clock, or UHBR13.5 with a 421.875 MHz symbol clock), intel_dp->link.caps also
includes 8b/10b rates such as HBR3 (810 MHz symbol clock). Because HBR3 has a
higher link symbol clock than UHBR10 or UHBR13.5, intel_dp_mode_valid_m_n()
will see that HBR3 satisfies intel_dp_can_support_m_n() and return true even
when max_bw_config violates the M/N ratio limit.
However, during modeset via
mst_stream_compute_config() -> mst_stream_compute_link_for_joined_pipes() ->
mst_stream_compute_config_limits() -> intel_dp_compute_config_limits(),
the MST path narrows limits->link_config_filter to the single highest-BW
max_config before intel_dp_compute_m_n_ratio_limits() is called:
drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_compute_config_limits() {
if (is_mst || intel_dp->use_max_params) {
struct intel_dp_link_caps_filter new_filter = INTEL_DP_LINK_CAPS_FILTER_NONE;
struct intel_dp_link_config max_config;
...
if (!intel_dp_get_connector_max_link_config(connector, limits, &max_config))
return false;
if (!intel_dp_link_caps_filter_add(link_caps, &new_filter, &max_config))
return false;
limits->link_config_filter = new_filter;
}
if (!intel_dp_compute_m_n_ratio_limits(intel_dp, conn_state, crtc_state, limits))
return false;
}
As a result, intel_dp_compute_m_n_ratio_limits() only checks max_config for
MST and rejects the modeset if max_config violates the M/N ratio limit.
Should mst_connector_mode_valid_ctx() check intel_dp_can_support_m_n() against
max_link_clock (matching the rest of mst_connector_mode_valid_ctx() and the
current MST max_config selection), or should intel_dp_compute_m_n_ratio_limits()
filter limits->link_config_filter before intel_dp_get_connector_max_link_config()
picks max_config?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261022032247.1378809-1-suraj.kandpal@intel.com?part=4
next prev parent reply other threads:[~2026-10-22 3:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 3:22 [PATCH v7 00/13] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 01/13] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 02/13] drm/i915/dp: Limit M/N ratio for DP Suraj Kandpal
2026-10-22 3:34 ` sashiko-bot
2026-10-22 16:29 ` Golani, Mitulkumar Ajitkumar
2026-10-22 3:22 ` [PATCH v7 03/13] drm/i915/display_wa: Add support for Wa_14014191401 Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 04/13] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-10-22 3:43 ` sashiko-bot [this message]
2026-10-22 16:42 ` Golani, Mitulkumar Ajitkumar
2026-10-22 3:22 ` [PATCH v7 05/13] drm/i915/dp: Add M/N ratio check for DP link config Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 06/13] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 07/13] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 08/13] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-10-22 17:32 ` Golani, Mitulkumar Ajitkumar
2026-10-22 17:42 ` Golani, Mitulkumar Ajitkumar
2026-10-23 3:39 ` Kandpal, Suraj
2026-10-22 3:22 ` [PATCH v7 09/13] drm/i915/display: Compare bypass_m_n_ratio_limit in the state checker Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 10/13] drm/i915/display: Dump bypass_m_n_ratio_limit in the crtc state dump Suraj Kandpal
2026-10-22 7:38 ` Golani, Mitulkumar Ajitkumar
2026-10-22 3:22 ` [PATCH v7 11/13] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n ratio > 10 Suraj Kandpal
2026-10-22 3:22 ` [PATCH v7 12/13] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-10-22 16:13 ` Golani, Mitulkumar Ajitkumar
2026-10-22 17:05 ` Kandpal, Suraj
2026-10-22 3:22 ` [PATCH v7 13/13] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
2026-10-22 14:08 ` Golani, Mitulkumar Ajitkumar
2026-10-22 3:32 ` ✓ CI.KUnit: success for Implement Wa_14021768792 to bypass m_n ratio limit (rev11) Patchwork
2026-10-22 4:10 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-22 7:39 ` ✗ 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=sashiko-outbox-180972@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