All of 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
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 15/15] drm/i915/dp: Allow PCON DSC modes through the FRL bw check
Date: Fri, 04 Dec 2026 09:53:59 +0000	[thread overview]
Message-ID: <sashiko-outbox-249549@kernel.org> (raw)
In-Reply-To: <20261204085746.391918-16-ankit.k.nautiyal@intel.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] drm/i915/dp: PCON DSC mode_valid misses per-mode DP DSC and
  FEC checks
- [Medium] drm/i915/dp: FRL training skips rate reduction for PCON DSC
  modes
- [Medium] drm/i915/dp: PCON DSC compute omits sink/PCON format, bpc,
  and PPS caps
--

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

drm/i915/dp: Allow PCON DSC modes through the FRL bw check

This commit updates intel_dp_mode_valid_downstream() to accept modes that
exceed uncompressed HDMI FRL bandwidth when both connector DP DSC and PCON
HDMI DSC encoding are available, and removes the corresponding FIXME comment
in intel_dp_frl_bw_valid().

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 94744ead1a6e9..be40a882e90da 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c

[ ... ]

> @@ -1339,12 +1338,22 @@ intel_dp_mode_valid_downstream(struct intel_connector *connector,
>  {
>  	struct intel_dp *intel_dp = intel_attached_dp(connector);
>  	int bpc = 8; /* Assume 8bpc for the DP++/HDMI/DVI TMDS/FRL bw check */
> +	enum drm_mode_status status;
>  
>  	if (intel_dp->dfp.max_dotclock &&
>  	    target_clock > intel_dp->dfp.max_dotclock)
>  		return MODE_CLOCK_HIGH;
>  
> -	return intel_dp_hdmi_bw_valid(intel_dp, target_clock, bpc, sink_format, true);
> +	status = intel_dp_hdmi_bw_valid(intel_dp, target_clock, bpc, sink_format, true);
> +	if (status != MODE_CLOCK_HIGH)
> +		return status;
> +
> +	/* The PCON may be able to compress the stream for the HDMI link */
> +	if (intel_dp_has_dsc(connector) &&
> +	    intel_dp_hdmi_dsc_possible(intel_dp, mode, target_clock, bpc, sink_format))
> +		return MODE_OK;
> +
> +	return status;
>  }

[Severity: Medium]
Is checking intel_dp_has_dsc() sufficient here to guarantee that DP DSC can
be enabled for the mode?

intel_dp_has_dsc() only checks static connector capabilities and skips FEC
support, intel_dp_mode_valid_with_dsc(), joiner needs, and DSC bubble
dotclock limits.  In intel_dp_mode_valid_format(), a mode that fits the DP
link uncompressed still reaches here even when local dsc is false.

At modeset time, intel_dp_compute_formats() with respect_downstream_limits
set requires DP DSC and fails, for example in intel_dp_supports_dsc() without
FEC.  intel_dp_compute_config() then falls back to ignoring downstream limits
and either fails with -EINVAL or drives an out-of-spec uncompressed FRL link.

[Severity: Medium]
Does switching from an uncompressed mode to one of these PCON DSC modes leave
the HDMI FRL link running above the sink's DSC_Max_FRL_Rate?

intel_dp_pcon_compute_config() selects the lower dsc_max_frl_rate for PCON
DSC streams, but intel_dp_check_frl_training() skips retraining whenever
frl.trained_rate_gbps >= pcon_config.frl_rate_gbps.
intel_dp_pcon_is_frl_trained() similarly accepts any higher trained mask.

On an HDMI 2.1 sink where dsc_max_frl_rate is below max_frl_rate (such as
40 Gbps vs 48 Gbps), switching from an uncompressed mode to a PCON DSC mode
leaves the FRL link above the sink's DSC limit, which can cause the sink to
reject or corrupt the compressed stream.

[Severity: Medium]
Can intel_dp_hdmi_dsc_possible() accept YCbCr 4:2:0 or deep-color modes that
exceed the HDMI sink's or PCON's DSC encoder capabilities?

intel_dp_pcon_dsc_enc_compute() never checks sink_format against
hdmi.dsc_cap.native_420 or DP_PCON_DSC_ENC_COLOR_FMT_CAP, nor bpc against
hdmi.dsc_cap.bpc_supported or DP_PCON_DSC_ENC_COLOR_DEPTH_CAP.

intel_dp_pcon_can_encode_dsc() also omits DP_PCON_DSC_ENCODER_SUPPORTED and
DP_PCON_DSC_PPS_ENC_OVERRIDE, even though intel_dp_pcon_dsc_configure()
programs PPS override parameters.

On a sink that advertises DSC 1.2 without Native 4:2:0 DSC, or only 8 bpc DSC
while supporting 10/12 bpc uncompressed, unsupported modes pass validation
and get programmed into the PCON, causing blank or corrupted output.

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

  reply	other threads:[~2026-12-04  9:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  8:57 [PATCH v5 00/15] DP-HDMI PCON DSC fixes Ankit Nautiyal
2026-12-04  8:57 ` [PATCH v5 01/15] drm/i915/dp: Forget the PCON FRL training state on a long HPD Ankit Nautiyal
2026-12-04  9:45   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 02/15] drm/i915/dp: Account for FRL 16b/18b encoding overhead Ankit Nautiyal
2026-12-04  9:36   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 03/15] drm/i915/hdmi: Clamp the target_bpp only when it equals the link bpp Ankit Nautiyal
2026-12-04  8:57 ` [PATCH v5 04/15] drm/i915/dp: Add PCON DSC state to crtc_state Ankit Nautiyal
2026-12-04  9:43   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 05/15] drm/dp: Add a helper to disable the PCON DSC encoder Ankit Nautiyal
2026-12-04  8:57 ` [PATCH v5 06/15] drm/i915/dp: Compute the PCON DSC operation Ankit Nautiyal
2026-12-04  9:38   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 07/15] drm/i915/dp: Disable the PCON DSC encoder unless it is needed Ankit Nautiyal
2026-12-04  9:38   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 08/15] drm/i915/dp: Clamp PCON DSC bpp to the FRL link bandwidth Ankit Nautiyal
2026-12-04  9:33   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 09/15] drm/i915/dp: Add a helper for the FRL payload bandwidth Ankit Nautiyal
2026-12-04  8:57 ` [PATCH v5 10/15] drm/i915/dp: Compute the PCON DSC encoder parameters Ankit Nautiyal
2026-12-04  9:52   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 11/15] drm/i915/dp: Retrain the PCON FRL link from the link check work Ankit Nautiyal
2026-12-04  9:52   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 12/15] drm/i915/dp: Store the PCON FRL rate in the crtc state Ankit Nautiyal
2026-12-04 10:00   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 13/15] drm/i915/dp: Use the FRL rate of the stream on the HDMI link Ankit Nautiyal
2026-12-04  9:58   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 14/15] drm/i915/dp: Pick the bpc for a PCON DSC stream Ankit Nautiyal
2026-12-04  9:58   ` sashiko-bot
2026-12-04  8:57 ` [PATCH v5 15/15] drm/i915/dp: Allow PCON DSC modes through the FRL bw check Ankit Nautiyal
2026-12-04  9:53   ` sashiko-bot [this message]
2026-12-04  9:31 ` ✓ CI.KUnit: success for DP-HDMI PCON DSC fixes (rev5) Patchwork
2026-12-04 10:10 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-04 11:05 ` ✗ i915.CI.BAT: 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-249549@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.