From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Imre Deak <imre.deak@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/dp: Fix DSC state computation
Date: Tue, 3 Mar 2026 08:35:31 +0530 [thread overview]
Message-ID: <67848086-3f56-407e-9726-d07bd03ef676@intel.com> (raw)
In-Reply-To: <20260302102838.1522499-1-imre.deak@intel.com>
On 3/2/2026 3:58 PM, Imre Deak wrote:
> When computing the encoder/CRTC state multiple times, such as during
> iteration over the possible pipe joiner configurations, it must be
> ensured that all state is explicitly initialized each time. At the
> moment, this is not guaranteed for the DSC/FEC state within the
> encoder/CRTC state. In one iteration trying a pipe joiner configuration,
> the DSC state may get initialized without computing the full
> CRTC/encoder state due to the given joiner configuration being
> impossible. When the same CRTC/encoder state is recomputed in a
> subsequent iteration, the previously set non-zero - now stale - DSC/FEC
> state may still be present, which is unexpected if a non-DSC
> configuration is being computed.
>
> This can lead to a DSC state mismatch error if multiple joiner
> configurations are evaluated and the working configuration ultimately
> turns out to be a non-DSC one.
>
> Follow the existing pattern and compute the full (DSC/FEC) state on all
> code paths (including now the non-DSC path as well) to fix the issue.
>
> Fixes: 1f1e3e5c65f6 ("drm/i915/dp: Rework pipe joiner logic in compute_config")
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/7512
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 13 +++++++++++++
> drivers/gpu/drm/i915/display/intel_dp.h | 1 +
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 ++
> 3 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 6c25c7595c48..2d9ce21e5bbe 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2457,6 +2457,17 @@ bool intel_dp_needs_8b10b_fec(const struct intel_crtc_state *crtc_state,
> return dsc_enabled_on_crtc || intel_dsc_enabled_on_link(crtc_state);
> }
>
> +void intel_dp_dsc_reset_config(struct intel_crtc_state *crtc_state)
> +{
> + crtc_state->fec_enable = false;
> +
> + crtc_state->dsc.compression_enable = false;
> + crtc_state->dsc.compressed_bpp_x16 = 0;
> +
> + memset(&crtc_state->dsc.slice_config, 0, sizeof(crtc_state->dsc.slice_config));
> + memset(&crtc_state->dsc.config, 0, sizeof(crtc_state->dsc.config));
> +}
> +
> int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state,
> @@ -2888,6 +2899,8 @@ intel_dp_compute_link_for_joined_pipes(struct intel_encoder *encoder,
> bool dsc_needed, joiner_needs_dsc;
> int ret = 0;
>
> + intel_dp_dsc_reset_config(pipe_config);
> +
> joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes);
>
> dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index 57fac7fb837f..fbe43ca3d99f 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -75,6 +75,7 @@ int intel_dp_compute_config(struct intel_encoder *encoder,
> struct drm_connector_state *conn_state);
> bool intel_dp_needs_8b10b_fec(const struct intel_crtc_state *crtc_state,
> bool dsc_enabled_on_crtc);
> +void intel_dp_dsc_reset_config(struct intel_crtc_state *crtc_state);
> int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index e73ae4956f9b..90349819dcfb 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -610,6 +610,8 @@ static int mst_stream_compute_link_for_joined_pipes(struct intel_encoder *encode
> bool dsc_needed, joiner_needs_dsc;
> int ret = 0;
>
> + intel_dp_dsc_reset_config(pipe_config);
> +
> joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes);
>
> dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
prev parent reply other threads:[~2026-03-03 3:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 10:28 [PATCH] drm/i915/dp: Fix DSC state computation Imre Deak
2026-03-02 16:54 ` ✓ CI.KUnit: success for " Patchwork
2026-03-02 17:53 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-02 20:23 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-03 3:05 ` Nautiyal, Ankit K [this message]
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=67848086-3f56-407e-9726-d07bd03ef676@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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