Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ankit Nautiyal" <ankit.k.nautiyal@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 27/29] drm/i915/dp: Pick the DSC slice count for pass-through within the HDMI limits
Date: Fri, 20 Nov 2026 14:48:22 +0000	[thread overview]
Message-ID: <sashiko-outbox-225410@kernel.org> (raw)
In-Reply-To: <20261120140729.466177-28-ankit.k.nautiyal@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/dp: PCON pass-through DSC slice limits ignored in TU
  and min_hblank
--

commit 5df55e454ef968026d14526944396c73e571eb41
Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

drm/i915/dp: Pick the DSC slice count for pass-through within the HDMI limits

This commit populates the downstream DSC slice count limits from the HDMI
sink when passing a DSC 1.2a stream through a PCON.

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index b4f943d6401d4..3a53d23c4587c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2912,7 +2912,8 @@ intel_dp_dsc_compute_pipe_bpp_limits(struct intel_connector *connector,
>  
>  /*
>   * The stream of a PCON passing DSC through is not recompressed, so it has to
> - * fit the HDMI FRL link as is. Limit the compressed bpp of the DP stream.
> + * fit the HDMI link and be one the HDMI sink can decode as is. Limit the DSC
> + * parameters of the DP stream accordingly.
>   *
>   * This applies only if the HDMI link needs DSC and the DP stream is a DSC 1.2a
>   * stream, as passing it through is the only PCON operation possible then.
> @@ -2936,6 +2937,13 @@ intel_dp_pcon_dsc_compute_passthrough_limits(struct intel_dp *intel_dp,
>  				  true) == MODE_OK)
>  		return true;
>  
> +	if (!intel_dp_pcon_dsc_hdmi_slice_limits(connector, adjusted_mode,
> +						 adjusted_mode->crtc_clock,
> +						 crtc_state->sink_format,
> +						 &limits->dfp_dsc.min_slices,
> +						 &limits->dfp_dsc.max_slices))
> +		return false;

[Severity: Medium]
Do the TU and min_hblank calculations still ignore limits->dfp_dsc when
the HDMI sink requires a larger minimum slice count than the DP sink?

In intel_dp_dsc_compute_config(), intel_dp_dsc_compute_pipe_bpp() runs
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,
					   limits->dfp_dsc.min_slices,
					   limits->dfp_dsc.max_slices,
					   &pipe_config->dsc.slice_config))
		return -EINVAL;
}

On a UHBR link, intel_dp_dsc_compute_pipe_bpp() ->
dsc_compute_link_config() -> intel_dp_mtp_tu_compute_config() obtains the
slice count via intel_dp_dsc_get_slice_count(), which hardcodes
dfp_min_slices = 0 and dfp_max_slices = INT_MAX (and on non-UHBR links,
dsc_compute_link_config() reads
intel_dsc_line_slice_count(&pipe_config->dsc.slice_config) while
slice_config is still zeroed).  Later in intel_dp_compute_config(),
intel_dp_compute_min_hblank() also calls intel_dp_dsc_get_slice_count()
instead of using
intel_dsc_line_slice_count(&crtc_state->dsc.slice_config).

As a result, symbol cycles, link M/N, TU, and min_hblank are computed for
the unconstrained DP slice count rather than the slice count programmed in
pipe_config->dsc.slice_config.  Computing pipe_config->dsc.slice_config
before intel_dp_dsc_compute_pipe_bpp() and reading
intel_dsc_line_slice_count(&crtc_state->dsc.slice_config) in the downstream
callers would keep these calculations consistent.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261120140729.466177-1-ankit.k.nautiyal@intel.com?part=27

  reply	other threads:[~2026-11-20 14:49 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 14:07 [PATCH 00/29] DP-HDMI PCON DSC fixes Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 01/29] drm/i915/hdmi: Split the intel_hdmi_dsc_get_bpp() Ankit Nautiyal
2026-11-20 14:32   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 02/29] drm/i915/dp: Fix FRL BW check for HDMI2.1 DFP Ankit Nautiyal
2026-11-20 14:34   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 03/29] drm/i915/dp: Add a wrapper to check frl/tmds downstream constraints Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 04/29] drm/i915/dp: Use the common downstream bw check in compute_bpc Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 05/29] drm/i915/hdmi: Expose DSC min/max bpp helpers Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 06/29] drm/i915/hdmi: Add helper to check if DSC chunksize fits the sink limits Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 07/29] drm/i915/hdmi: Pass pixel clock to DSC slice helper Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 08/29] drm/i915/dp: Account for FRL 16b/18b encoding overhead Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 09/29] drm/i915/hdmi: Clamp the target_bpp only when it equals the link bpp Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 10/29] drm/i915/dp: Add PCON DSC state to crtc_state Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 11/29] drm/dp: Add a helper to disable the PCON DSC encoder Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 12/29] drm/i915/dp: Compute the PCON DSC operation Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 13/29] drm/i915/dp: Disable the PCON DSC encoder unless it is needed Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 14/29] drm/i915/dp: Clamp PCON DSC bpp to the FRL link bandwidth Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 15/29] drm/i915/dp: Add a helper for the DSC stream version Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 16/29] drm/i915/dp: Add a helper for the FRL payload bandwidth Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 17/29] drm/i915/dp: Compute the PCON DSC encoder parameters Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 18/29] drm/i915/dp: Retrain the PCON FRL link from the link check work Ankit Nautiyal
2026-11-20 14:46   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 19/29] drm/i915/dp: Store the PCON FRL rate in the crtc state Ankit Nautiyal
2026-11-20 14:39   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 20/29] drm/i915/dp: Use the FRL rate of the stream on the HDMI link Ankit Nautiyal
2026-11-20 14:43   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 21/29] drm/i915/dp: Allow PCON DSC modes through the FRL bw check Ankit Nautiyal
2026-11-20 14:48   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 22/29] drm/i915/dp: Enable DSC pass-through in the PCON Ankit Nautiyal
2026-11-20 14:38   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 23/29] drm/i915/dp: Limit the DP link bpp for DSC pass-through to the FRL bandwidth Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 24/29] drm/i915/dp: Select DSC pass-through in the PCON for DSC 1.2a streams Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 25/29] drm/i915/dp: Allow limiting the DSC slice count for the downstream device Ankit Nautiyal
2026-11-20 14:41   ` sashiko-bot
2026-11-20 14:07 ` [PATCH 26/29] drm/i915/dp: Check the HDMI sink slice limits for DSC pass-through Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 27/29] drm/i915/dp: Pick the DSC slice count for pass-through within the HDMI limits Ankit Nautiyal
2026-11-20 14:48   ` sashiko-bot [this message]
2026-11-20 14:07 ` [PATCH 28/29] drm/i915/dp: Limit the compressed bpp for pass-through to the HDMI sink Ankit Nautiyal
2026-11-20 14:07 ` [PATCH 29/29] drm/i915/dp: Accept DSC 1.2a pass-through modes in the PCON mode check Ankit Nautiyal

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-225410@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ankit.k.nautiyal@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