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
Subject: Re: [PATCH 20/29] drm/i915/dp: Use the FRL rate of the stream on the HDMI link
Date: Fri, 20 Nov 2026 14:43:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-225402@kernel.org> (raw)
In-Reply-To: <20261120140729.466177-21-ankit.k.nautiyal@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/dp: FRL link not retrained down to DSC max rate on
  DSC modeset
--

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

drm/i915/dp: Use the FRL rate of the stream on the HDMI link

This commit selects the regular max FRL rate when the HDMI link carries an
uncompressed stream and the sink's DSC max FRL rate when the PCON encodes
DSC for the HDMI link, storing the chosen rate in
crtc_state->pcon_config.frl_rate_gbps.

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 61e59c2631ee3..cea90ef761c3c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c

[ ... ]

> @@ -2930,8 +2937,8 @@ intel_dp_pcon_compute_config(struct intel_dp *intel_dp,
>  	if (!intel_dp_is_hdmi_2_1_sink(intel_dp))
>  		return 0;
>  
> -	crtc_state->pcon_config.frl_rate_gbps =
> -		min(intel_dp->dfp.pcon_max_frl_bw, intel_dp_hdmi_sink_max_frl(intel_dp));
> +	/* The HDMI link carries an uncompressed stream, unless the PCON compresses it */
> +	crtc_state->pcon_config.frl_rate_gbps = intel_dp_pcon_max_frl_rate(intel_dp, false);
>  
>  	if (crtc_state->dsc.compression_enable)
>  		crtc_state->pcon_config.dsc_op = INTEL_PCON_DSC_DECODE;
> @@ -2959,6 +2966,7 @@ intel_dp_pcon_compute_config(struct intel_dp *intel_dp,
>  	}
>  
>  	crtc_state->pcon_config.dsc_op = INTEL_PCON_DSC_DECODE_ENCODE;
> +	crtc_state->pcon_config.frl_rate_gbps = intel_dp_pcon_max_frl_rate(intel_dp, true);
>  
>  	return 0;
>  }

[Severity: Medium]
When a sink's DSC max FRL rate is lower than its uncompressed max FRL
rate, will switching from an uncompressed mode to a mode using
INTEL_PCON_DSC_DECODE_ENCODE fail to retrain the FRL link down to the
lower crtc_state->pcon_config.frl_rate_gbps?

The uncompressed modeset trains the link at the higher uncompressed rate
and records it in intel_dp->frl.trained_rate_gbps.  On a later DSC
modeset, crtc_state->pcon_config.frl_rate_gbps is set to the lower DSC
rate, but both intel_dp_check_frl_training() and
intel_dp_pcon_is_frl_trained() skip retraining whenever the currently
trained rate is greater than or equal to the requested rate:

drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_check_frl_training() {
    ...
	/* A link trained at a lower rate than the stream needs has to be retrained */
	if (intel_dp->frl.is_trained &&
	    intel_dp->frl.trained_rate_gbps >= crtc_state->pcon_config.frl_rate_gbps)
		return;
    ...
}

drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_pcon_is_frl_trained() {
	if (drm_dp_pcon_hdmi_link_active(&intel_dp->aux) &&
	    drm_dp_pcon_hdmi_link_mode(&intel_dp->aux, frl_trained_mask) == DP_PCON_HDMI_MODE_FRL &&
	    *frl_trained_mask >= max_frl_bw_mask)
		return true;
    ...
}

As a result, the HDMI link remains at the higher uncompressed FRL rate,
exceeding the sink's DSC max FRL rate limit and mismatching the FRL
bandwidth used by intel_dp_pcon_dsc_enc_compute().

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

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

Thread overview: 43+ 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 [this message]
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
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
2026-11-20 14:33 ` ✗ CI.checkpatch: warning for DP-HDMI PCON DSC fixes (rev4) Patchwork
2026-11-20 14:35 ` ✓ CI.KUnit: success " Patchwork
2026-11-20 15:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-20 17:31 ` ✓ i915.CI.BAT: " 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-225402@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 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.