From: sashiko-bot@kernel.org
To: "Ankit Nautiyal" <ankit.k.nautiyal@intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 47/56] drm/i915/hdmi: Compute output format for HDMI FRL mode
Date: Mon, 12 Oct 2026 04:53:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-167640@kernel.org> (raw)
In-Reply-To: <20261012035806.3361439-48-ankit.k.nautiyal@intel.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] drm/i915/hdmi: out-of-spec TMDS fallback takes precedence over valid FRL modes
- [High] drm/i915/hdmi: FRL bypassed for modes exceeding sink TMDS limits
- [Medium] drm/i915/hdmi: FRL clock computation corrupts crtc_state->pipe_bpp on failure
- [Low] drm/i915: unconditional FRL enablement logging on error path
--
commit 53b28248132a15ea6972675cb5d3f48a3d13e3b3
Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
drm/i915/hdmi: Compute output format for HDMI FRL mode
If the source and sink support FRL, then compute output format
that can support HDMI FRL mode.
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
[ ... ]
> @@ -2648,13 +2672,23 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
> if (!intel_link_bw_compute_pipe_bpp(pipe_config))
> return -EINVAL;
>
> - /*
> - * Try to respect downstream TMDS clock limits first, if
> - * that fails assume the user might know something we don't.
> - */
> - ret = intel_hdmi_compute_formats(encoder, pipe_config, conn_state, true);
> - if (ret)
> - ret = intel_hdmi_compute_formats(encoder, pipe_config, conn_state, false);
> + if (HAS_HDMI_FRL(display) &&
> + intel_bios_hdmi_max_frl_rate(encoder->devdata) &&
> + intel_hdmi->has_sink_hdmi_21)
> + enable_frl = true;
> +
> + ret = intel_hdmi_compute_formats(encoder, pipe_config, conn_state, false);
> +
> + if (ret && enable_frl) {
[Severity: High]
Does this sequence bypass FRL completely for displays with low TMDS limits?
When connecting an HDMI 2.1 sink that supports FRL but has a lower max
TMDS clock than the mode requires, the call to intel_hdmi_compute_formats
with enable_frl=false will first fail the strict limit check, but then
internally fall back to ignoring downstream limits:
intel_hdmi_compute_formats() {
...
ret = _intel_hdmi_compute_formats(..., true, enable_frl);
if (ret)
ret = _intel_hdmi_compute_formats(..., false, enable_frl);
...
}
If the mode's clock is within the source's max TMDS capability, this
fallback succeeds and returns 0, masking the downstream limit failure.
Because ret evaluates to 0, this FRL configuration block is skipped,
and the driver outputs an out-of-spec TMDS signal instead of attempting
FRL.
Additionally, in intel_hdmi_compute_frl_config, there is a strict
check against max_rate:
intel_hdmi_compute_frl_config() {
...
for (i = 0; i < ARRAY_SIZE(rate); i++) {
if (rate[i] > max_rate)
continue;
...
}
This means the fallback mechanism to ignore downstream limits doesn't
actually allow users to override FRL bandwidth limits either. Could we
attempt FRL before falling back to out-of-spec TMDS formats?
> + ret = intel_hdmi_compute_formats(encoder, pipe_config, conn_state, true);
[Severity: Medium]
Can intel_hdmi_compute_formats corrupt crtc_state->pipe_bpp if the FRL
computation fails?
When FRL computation is attempted, it calls down to
intel_hdmi_compute_frl_clock which iterates over bpc:
intel_hdmi_compute_frl_clock() {
...
for (bpc = max_bpc; bpc >= 8; bpc -= 2) {
...
crtc_state->pipe_bpp = bpc * 3;
ret = intel_hdmi_compute_frl_config(encoder, crtc_state);
if (ret)
continue;
...
}
If the FRL computation fails across all iterations, crtc_state->pipe_bpp
remains permanently lowered (e.g., to 24). When
_intel_hdmi_compute_formats subsequently falls back to trying the YCBCR420
format, it reads this corrupted pipe_bpp to determine its starting max_bpc.
This artificially restricts the fallback to 8 BPC, skipping 10 and 12 BPC
which require less bandwidth under YCBCR420 and might have otherwise
succeeded.
> + drm_dbg_kms(display->drm,
> + "Enabling FRL mode with lanes = %d rate = %d\n",
> + pipe_config->frl.required_lanes,
> + pipe_config->frl.required_rate);
> + pipe_config->frl.enable = true;
> + lane_count = pipe_config->frl.required_lanes;
> + }
[Severity: Low]
Is it intentional that this block executes unconditionally, even if
intel_hdmi_compute_formats fails?
If the intel_hdmi_compute_formats call above returns a non-zero error
code, the code still executes this drm_dbg_kms claiming FRL is being
enabled with uninitialized or stale lane/rate values, and mutates
pipe_config->frl.enable. While the atomic check will subsequently reject
the mode and discard the state, the debug trace will misleadingly indicate
FRL mode was successfully computed before the mode rejection.
> +
> if (ret) {
> drm_dbg_kms(display->drm,
> "unsupported HDMI clock (%d kHz), rejecting mode\n",
> @@ -2677,7 +2711,7 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
> adjusted_mode->picture_aspect_ratio =
> conn_state->picture_aspect_ratio;
>
> - pipe_config->lane_count = 4;
> + pipe_config->lane_count = lane_count;
>
> if (scdc->scrambling.supported && source_supports_scrambling(encoder) &&
> !pipe_config->frl.enable) {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261012035806.3361439-1-ankit.k.nautiyal@intel.com?part=47
next prev parent reply other threads:[~2026-10-12 4:53 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 3:57 [PATCH v2 00/56] Enable HDMI FRL for MTL+ Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 01/56] drm/i915/hdmi: Parse FRL max link rate from VBT Ankit Nautiyal
2026-10-12 4:34 ` sashiko-bot
2026-10-12 8:01 ` Shankar, Uma
2026-10-12 8:10 ` Shankar, Uma
2026-10-12 3:57 ` [PATCH v2 02/56] drm/i915/hdmi: Add new data members for FRL configuration Ankit Nautiyal
2026-10-12 4:36 ` sashiko-bot
2026-10-12 8:35 ` Shankar, Uma
2026-10-12 3:57 ` [PATCH v2 03/56] drm/i915/hdmi: Add FRL link rate cap Ankit Nautiyal
2026-10-12 8:43 ` Shankar, Uma
2026-10-12 3:57 ` [PATCH v2 04/56] drm/drm_scdc_helper: Add SCDC helper funcs for FRL Ankit Nautiyal
2026-10-12 4:32 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 05/56] drm/i915/display: Add registers for HDMI FRL configuration Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 06/56] drm/i915/display: Add new members in crtc_state for " Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 07/56] drm/i915/intel_cx0_phy_regs: Add HDMI FRL SHIFT EN bit in PORT_BUF_CTL_1 Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 08/56] drm/i915/ddi: Update Transcoder/DDI registers with the frl bits Ankit Nautiyal
2026-10-12 4:35 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 09/56] drm/i915/hdmi: Enable Scrambling only for TMDS mode Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 10/56] drm/i915/ddi: Simplify intel_ddi_enable() Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 11/56] drm/i915/ddi: Factor out common transcoder/vblank enable sequence Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 12/56] drm/i915/ddi: Update HDMI modeset sequence for MTL+ Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 13/56] drm/i915/hdmi: Add function to prepare registers for FRL mode Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 14/56] drm/i915/hdmi: Add functions for FRL training state machine Ankit Nautiyal
2026-10-12 4:49 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 15/56] drm/i915/intel_hdmi: Add helper to disable FRL Ankit Nautiyal
2026-10-12 4:44 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 16/56] drm/i915/hdmi: Reduce FRL rate cap on rate change during training Ankit Nautiyal
2026-10-12 4:47 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 17/56] drm/i915/hdmi: Introduce intel_hdmi_frl_level() for per-lane TxFFE Ankit Nautiyal
2026-10-12 4:49 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 18/56] drm/i915/hdmi: Drive per-lane TxFFE during FRL link training Ankit Nautiyal
2026-10-12 4:34 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 19/56] drm/i915/ltphy: Add PLL tables for HDMI FRL Ankit Nautiyal
2026-10-12 4:26 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 20/56] drm/i915/ltphy: Add safegaurd when calculation HDMI FRL state Ankit Nautiyal
2026-10-12 4:40 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 21/56] drm/i915/ltphy: Calculate port clock for HDMI FRL Ankit Nautiyal
2026-10-12 4:35 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 22/56] drm/i915/ltphy: Verify HDMI FRL tables Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 23/56] drm/i915/ddi_buf: Add Vswing table for HDMI FRL Ankit Nautiyal
2026-10-12 4:33 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 24/56] drm/i915/hdmi: Add provision for FRL mode while computing output format Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 25/56] drm/i915/cx0: Add helper to check if the FRL rate is valid Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 26/56] drm/i915/lt_phy: " Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 27/56] drm/i915/hdmi_frl_dfm_regs: Define DFM registers Ankit Nautiyal
2026-10-12 4:35 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 28/56] drm/i915/hdmi_frl_dfm: Define frl_dfm structure Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 29/56] drm/i915/hdmi_frl_dfm: Add non dsc frl capacity computation helpers Ankit Nautiyal
2026-10-12 4:48 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 30/56] drm/i915/hdmi_frl_dfm: Add support for DFM calculation with DSC Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 31/56] drm/i915/hdmi: Add helper to write FRL CFG register Ankit Nautiyal
2026-10-12 4:33 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 32/56] drm/i915/hdmi_frl_dfm: Add helpers to read/write FRL DFM registers Ankit Nautiyal
2026-10-12 4:42 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 33/56] drm/i915/hdmi: Rename port clock limit to specify tmds clock Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 34/56] drm/i915/hdmi: Rename port clock valid " Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 35/56] drm/i915/hdmi: Rename mode " Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 36/56] drm/i915/hdmi: Validate FRL modes in mode_valid using the FRL DFM Ankit Nautiyal
2026-10-12 4:49 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 37/56] drm/i915/hdmi: Add FRL port clock valid Ankit Nautiyal
2026-10-12 4:56 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 38/56] drm/i915/hdmi: Add FRL clock computation based on DFM Ankit Nautiyal
2026-10-12 4:51 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 39/56] drm/i915/hdmi: Add support for sending uevent to user for FRL training failure Ankit Nautiyal
2026-10-12 4:49 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 40/56] drm/i915/ddi: Wire FRL into the HDMI DDI enable/disable path Ankit Nautiyal
2026-10-12 4:54 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 41/56] drm/i915/ltphy: Fix HDMI FRL per-lane TX mapping Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 42/56] drm/i915/hdmi: Add read out for FRL state Ankit Nautiyal
2026-10-12 4:51 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 43/56] drm/i915/hdmi: Compute FRL Link M/N Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 44/56] drm/i915/hdmi_frl_dfm: Write and read back " Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 45/56] drm/i915/hdmi: Use the real pixel clock as crtc_clock for FRL Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 46/56] drm/i915/display: Add FRL members to the state checker Ankit Nautiyal
2026-10-12 4:54 ` sashiko-bot
2026-10-12 3:57 ` [PATCH v2 47/56] drm/i915/hdmi: Compute output format for HDMI FRL mode Ankit Nautiyal
2026-10-12 4:53 ` sashiko-bot [this message]
2026-10-12 3:57 ` [PATCH v2 48/56] drm/i915/hdmi: Add a helper to check non DSC audio support for HDMI FRL Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 49/56] drm/i915/audio: Add the mode pruning logic " Ankit Nautiyal
2026-10-12 3:57 ` [PATCH v2 50/56] drm/i915/hdmi: Enable FRL based mode clock valid Ankit Nautiyal
2026-10-12 4:58 ` sashiko-bot
2026-10-12 3:58 ` [PATCH v2 51/56] drm/i915/joiner: Prepare to move joiner helpers to a new file Ankit Nautiyal
2026-10-12 3:58 ` [PATCH v2 52/56] drm/i915/joiner: Move joiner candidate helpers to intel_joiner.c Ankit Nautiyal
2026-10-12 3:58 ` [PATCH v2 53/56] drm/i915/joiner: Move joiner pipe mask helper " Ankit Nautiyal
2026-10-12 4:51 ` sashiko-bot
2026-10-12 3:58 ` [PATCH v2 54/56] drm/i915/hdmi: Iterate through joiner candidates in compute_config path Ankit Nautiyal
2026-10-12 3:58 ` [PATCH v2 55/56] drm/i915/hdmi: Iterate through joiner candidates in mode_valid path Ankit Nautiyal
2026-10-12 4:53 ` sashiko-bot
2026-10-12 3:58 ` [PATCH v2 56/56] drm/i915/hdmi: Allow Pipe joiner for HDMI Ankit Nautiyal
2026-10-12 5:01 ` sashiko-bot
2026-10-12 4:59 ` ✗ CI.checkpatch: warning for Enable HDMI FRL for MTL+ (rev2) Patchwork
2026-10-12 5:01 ` ✓ CI.KUnit: success " Patchwork
2026-10-12 5:39 ` ✓ i915.CI.BAT: " Patchwork
2026-10-12 5:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-12 7:12 ` ✗ Xe.CI.FULL: 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-167640@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.