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 v6 04/11] drm/i915/dp_mst: Limit M/N ratio for MST
Date: Wed, 21 Oct 2026 07:33:17 +0000 [thread overview]
Message-ID: <sashiko-outbox-179915@kernel.org> (raw)
In-Reply-To: <20261021071401.1161586-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 and compute_config_limits filter mismatch
--
commit 5b89059b3b94b9fbcca8f03ce951374211a9cdbc
Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
drm/i915/dp_mst: Limit M/N ratio for MST
This commit adds a Link M/N ratio check to mst_connector_mode_valid_ctx()
using intel_dp_mode_valid_m_n() to prune modes whose pixel clock exceeds
the hardware Link M/N ratio limit across all link configurations.
> 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]
Could there be a mismatch here between how mst_connector_mode_valid_ctx()
validates the M/N ratio and how intel_dp_compute_config_limits() filters
link configurations for MST?
In drivers/gpu/drm/i915/display/intel_dp_mst.c,
mst_connector_mode_valid_ctx() checks link bandwidth solely against
max_bw_config, whereas intel_dp_mode_valid_m_n() iterates over all link
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;
}
}
...
}
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() in
drivers/gpu/drm/i915/display/intel_dp.c, the MST path narrows
limits->link_config_filter to the single unfiltered max_config before
calling intel_dp_compute_m_n_ratio_limits():
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;
...
}
On a DP 2.x MST topology supporting both 128b/132b UHBR rates (where symbol
clock is rate * 10 / 32, e.g. 312.5 MHz for UHBR10 or 421.875 MHz for
UHBR13.5) and 8b/10b rates (where symbol clock is rate / 10, e.g. 810 MHz
for HBR3), a high-pixel-clock mode can exceed the M/N ratio limit at
max_bw_config (such as 4xUHBR10) while still passing
intel_dp_can_support_m_n() at HBR3.
Wouldn't that allow mst_connector_mode_valid_ctx() to return MODE_OK for a
mode that then fails atomic check in intel_dp_compute_config_limits() with
-EINVAL because only max_config was retained in limits->link_config_filter?
Should mst_connector_mode_valid_ctx() either check
intel_dp_can_support_m_n() against max_link_clock, or should
intel_dp_compute_m_n_ratio_limits() run before selecting max_config in
intel_dp_compute_config_limits()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261021071401.1161586-1-suraj.kandpal@intel.com?part=4
next prev parent reply other threads:[~2026-10-21 7:33 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 5:06 [PATCH v4 00/10] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-09-17 5:06 ` [PATCH v4 01/10] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-09-29 15:13 ` Golani, Mitulkumar Ajitkumar
2026-10-05 3:41 ` Kandpal, Suraj
2026-09-17 5:06 ` [PATCH v4 02/10] drm/i915/dp: Limit M/N ratio for DP SST Suraj Kandpal
2026-10-15 15:52 ` Golani, Mitulkumar Ajitkumar
2026-10-21 5:04 ` Kandpal, Suraj
2026-09-17 5:06 ` [PATCH v4 03/10] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-10-15 17:29 ` Golani, Mitulkumar Ajitkumar
2026-10-21 5:09 ` Kandpal, Suraj
2026-10-22 16:41 ` Golani, Mitulkumar Ajitkumar
2026-10-22 16:56 ` Kandpal, Suraj
2026-09-17 5:06 ` [PATCH v4 04/10] drm/i915/dp: Add M/N ratio check for DP link config Suraj Kandpal
2026-10-15 18:57 ` Golani, Mitulkumar Ajitkumar
2026-10-21 5:17 ` Kandpal, Suraj
2026-09-17 5:06 ` [PATCH v4 05/10] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-10-15 19:23 ` Golani, Mitulkumar Ajitkumar
2026-09-17 5:06 ` [PATCH v4 06/10] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-10-15 19:40 ` Golani, Mitulkumar Ajitkumar
2026-09-17 5:06 ` [PATCH v4 07/10] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-09-17 5:19 ` sashiko-bot
2026-09-17 5:57 ` Kandpal, Suraj
2026-10-15 20:37 ` Golani, Mitulkumar Ajitkumar
2026-10-21 5:33 ` Kandpal, Suraj
2026-09-17 5:06 ` [PATCH v4 08/10] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n " Suraj Kandpal
2026-10-15 20:24 ` Golani, Mitulkumar Ajitkumar
2026-10-21 5:42 ` Kandpal, Suraj
2026-09-17 5:06 ` [PATCH v4 09/10] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-09-17 5:06 ` [PATCH v4 10/10] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
2026-09-17 5:15 ` ✓ CI.KUnit: success for Implement Wa_14021768792 to bypass m_n ratio limit (rev9) Patchwork
2026-09-17 6:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-17 7:21 ` ✓ Xe.CI.FULL: " Patchwork
2026-10-21 7:06 ` [PATCH v5 00/10] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 01/11] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 02/11] drm/i915/dp: Limit M/N ratio for DP Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 03/11] drm/i915/display_wa: Add support for Wa_14014191401 Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 04/11] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 05/11] drm/i915/dp: Add M/N ratio check for DP link config Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 06/11] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 07/11] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 08/11] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 09/11] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n " Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 10/11] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-10-21 7:06 ` [PATCH v5 11/11] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 00/11] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 01/11] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 02/11] drm/i915/dp: Limit M/N ratio for DP Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 03/11] drm/i915/display_wa: Add support for Wa_14014191401 Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 04/11] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 05/11] drm/i915/dp: Add M/N ratio check for DP link config Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 06/11] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 07/11] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 08/11] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 09/11] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n " Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 10/11] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-10-21 7:08 ` [PATCH v5 11/11] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 00/11] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 01/11] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 02/11] drm/i915/dp: Limit M/N ratio for DP Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 03/11] drm/i915/display_wa: Add support for Wa_14014191401 Suraj Kandpal
2026-10-21 17:08 ` Golani, Mitulkumar Ajitkumar
2026-10-22 2:40 ` Kandpal, Suraj
2026-10-21 7:13 ` [PATCH v6 04/11] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-10-21 7:33 ` sashiko-bot [this message]
2026-10-21 7:13 ` [PATCH v6 05/11] drm/i915/dp: Add M/N ratio check for DP link config Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 06/11] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 07/11] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 08/11] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-10-21 7:13 ` [PATCH v6 09/11] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n " Suraj Kandpal
2026-10-21 7:14 ` [PATCH v6 10/11] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-10-21 7:14 ` [PATCH v6 11/11] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
-- strict thread matches above, loose matches on Subject: below --
2026-10-21 7:24 [PATCH v6 00/11] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-10-21 7:24 ` [PATCH v6 04/11] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
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-179915@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