From: sashiko-bot@kernel.org
To: "Chaitanya Kumar Borah" <chaitanya.kumar.borah@intel.com>,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 12/14] drm/i915/dp: Apply the MSA WA to the Data M/N
Date: Mon, 30 Nov 2026 05:17:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-240393@kernel.org> (raw)
In-Reply-To: <20261130043253.2165877-13-chaitanya.kumar.borah@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/dp: unpopulated dsc.slice_config causes WARN in
intel_dp_msa_wa_compute_config()
--
commit d861175d9728b7781f564c9110b32c97237cc2d9
Author: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
drm/i915/dp: Apply the MSA WA to the Data M/N
This commit adjusts the Data M/N values for the MSA placement workaround
during DisplayPort config computation when audio is enabled.
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 75ddfa30a3c3e..0f7be06086448 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1858,6 +1858,46 @@ static bool intel_dp_msa_wa_link_config_valid(struct intel_dp *intel_dp,
> link_bpp_x16, dsc, &m_n) == 0;
> }
>
> +static int intel_dp_msa_wa_compute_config(struct intel_dp *intel_dp,
> + struct intel_crtc_state *crtc_state,
> + int link_bpp_x16)
> +{
> + struct intel_display *display = to_intel_display(intel_dp);
> + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
> + struct intel_link_m_n *m_n = &crtc_state->dp_m_n;
> + u32 data_m = m_n->data_m, data_n = m_n->data_n;
> + int ret;
> +
> + if (!intel_dp_msa_wa_needed(intel_dp,
> + intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST),
> + crtc_state->port_clock) ||
> + !crtc_state->has_audio)
> + return 0;
> +
> + /*
> + * The WA requires the Audio SDPs not to be split, as the HW always
> + * finishes a split SDP right before transmitting the MSA. SDP
> + * splitting is enabled only with 128b/132b, which the WA doesn't
> + * apply to.
> + */
> + drm_WARN_ON(display->drm, crtc_state->sdp_split_enable);
> +
> + ret = intel_dp_msa_wa_compute_m_n(crtc_state, crtc_state->port_clock,
> + crtc_state->lane_count, link_bpp_x16,
> + crtc_state->dsc.compression_enable, m_n);
> + /* The link configuration selection must have rejected such a config. */
> + if (drm_WARN_ON(display->drm, ret))
> + return ret;
[Severity: Medium]
Can intel_dp_msa_wa_compute_m_n() fail and trigger this drm_WARN_ON() on SST
DSC configurations even after link configuration selection accepted the
config?
intel_dp_msa_wa_compute_m_n() derives dsc_slice_count from
crtc_state->dsc.slice_config:
drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_msa_wa_compute_m_n() {
...
int dsc_slice_count = dsc ? intel_dsc_line_slice_count(&crtc_state->dsc.slice_config) : 0;
int active_bits = intel_dp_msa_wa_active_bits(adjusted_mode->crtc_hdisplay,
link_bpp_x16, lane_count,
dsc_slice_count);
However, in intel_dp_dsc_compute_config(), intel_dp_dsc_compute_pipe_bpp() ->
... -> dsc_compute_link_config() calls intel_dp_msa_wa_link_config_valid()
before intel_dp_dsc_get_slice_config() populates
pipe_config->dsc.slice_config:
drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_dsc_compute_config() {
...
if (!is_mst) {
ret = intel_dp_dsc_compute_pipe_bpp(intel_dp, pipe_config,
conn_state, limits);
if (ret) {
...
return ret;
}
}
if (!intel_dp_dsc_get_slice_config(connector, adjusted_mode->crtc_clock,
adjusted_mode->crtc_hdisplay, num_joined_pipes,
&pipe_config->dsc.slice_config))
return -EINVAL;
During link config validation, crtc_state->dsc.slice_config is still zeroed,
so dsc_slice_count is 0 and intel_dp_msa_wa_active_bits() omits DSC slice
padding, EOC symbols, and MSA_WA_DSC_OVRHD_BITS. When
intel_dp_msa_wa_compute_config() later runs with dsc.slice_config populated,
the larger active_bits can push Data M above MSA_WA_DATA_N and return
-ERANGE, triggering the warning and failing the modeset instead of selecting
a lower compressed BPP or higher link rate.
Populating pipe_config->dsc.slice_config before
intel_dp_dsc_compute_pipe_bpp() in intel_dp_dsc_compute_config() would ensure
both checks use the same slice count.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130043253.2165877-1-chaitanya.kumar.borah@intel.com?part=12
next prev parent reply other threads:[~2026-11-30 5:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 4:32 [PATCH 00/14] drm/i915/dp: Add the MSA placement Data M/N WA (Wa_14027342164) Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 01/14] drm/i915/dp: Add the MSA placement Data M/N WA computation Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 02/14] drm/i915/kunit: Export the MSA placement WA Data M/N helper for testing Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 03/14] drm/i915/kunit: Add MSA placement WA Data M/N tests Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 04/14] drm/xe/kunit: Build the MSA placement WA display tests Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 05/14] drm/i915/audio: Rename enable_audio_dsc_wa() Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 06/14] drm/i915/audio: Program Hblank Early for the MSA WA shift left Chaitanya Kumar Borah
2026-11-30 5:14 ` sashiko-bot
2026-11-30 4:32 ` [PATCH 07/14] drm/i915/dp: Move intel_dp_has_audio() and intel_dp_port_has_audio() up Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 08/14] drm/i915/dp: Account for the MSA WA in SST link config selection Chaitanya Kumar Borah
2026-11-30 5:06 ` sashiko-bot
2026-11-30 4:32 ` [PATCH 09/14] drm/i915/dp: Prune uncompressed modes failing the MSA WA Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 10/14] drm/i915/dp: Move intel_dp_mode_valid_format() and intel_dp_mode_valid() down Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 11/14] drm/i915/dp: Account for the MSA WA in DSC mode validation Chaitanya Kumar Borah
2026-11-30 4:32 ` [PATCH 12/14] drm/i915/dp: Apply the MSA WA to the Data M/N Chaitanya Kumar Borah
2026-11-30 5:17 ` sashiko-bot [this message]
2026-11-30 4:32 ` [PATCH 13/14] drm/i915/display: Enable Wa_14027342164 on Xe3p Chaitanya Kumar Borah
2026-11-30 5:12 ` sashiko-bot
2026-11-30 4:32 ` [PATCH 14/14] drm/i915/dp: Add a debugfs knob to disable the MSA placement WA Chaitanya Kumar Borah
2026-11-30 5:03 ` ✗ CI.checkpatch: warning for drm/i915/dp: Add the MSA placement Data M/N WA (Wa_14027342164) Patchwork
2026-11-30 5:04 ` ✗ CI.KUnit: 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-240393@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chaitanya.kumar.borah@intel.com \
--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