Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Suraj Kandpal" <suraj.kandpal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 07/10] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10
Date: Thu, 17 Sep 2026 05:19:02 +0000	[thread overview]
Message-ID: <20260917051903.2F6171F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917050649.871960-8-suraj.kandpal@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915/display: TGDDA workaround state leaks to HDMI modesets
--

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

    drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10
    
    To support a Link M/N ratio between 10.0 and 15.0, for some BMG
    ultrajoiner cases we need Wa_14021768792.
    
    To bypass the hardware limitation within the Timing Generator DDA
    (TGDDA), we need to program the LINKM and LINKN registers as defined in
    the WA. Along with this we also need the relevant bits in HDMI_EMP_DATA
    and CHICKEN_TRANS.

> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 6d2025e109956..1e9d8943626a7 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
[ ... ]
> @@ -2738,6 +2749,26 @@ bool intel_cpu_transcoder_has_m2_n2(struct intel_display *display,
>  	return IS_DISPLAY_VER(display, 5, 7) || display->platform.cherryview;
>  }
>  
> +static void bmg_enhanced_tgdda_write(struct intel_crtc *crtc,
> +				     enum transcoder transcoder,
> +				     const struct intel_link_m_n *m_n)
> +{
> +	struct intel_display *display = to_intel_display(crtc);
> +	bool enable = m_n->bypass_m_n_ratio_limit && m_n->link_n;
> +	u32 link_m_frac = enable ? m_n->link_m % m_n->link_n : 0;
> +
> +	if (!intel_display_wa(display, INTEL_DISPLAY_WA_14021768792))
> +		return;
> +
> +	intel_de_rmw(display, HDMI_EMP_DATA(display, transcoder),
> +		     HDMI_EMP_DATA_LINK_M_FRAC_MASK,
> +		     REG_FIELD_PREP(HDMI_EMP_DATA_LINK_M_FRAC_MASK, link_m_frac));
> +
> +	intel_de_rmw(display, CHICKEN_TRANS(display, transcoder),
> +		     DP_ENHANCED_TGDDA_ENABLE,
> +		     enable ? DP_ENHANCED_TGDDA_ENABLE : 0);
> +}
> +
>  void intel_cpu_transcoder_set_m1_n1(struct intel_crtc *crtc,
>  				    enum transcoder transcoder,
>  				    const struct intel_link_m_n *m_n)
> @@ -2745,6 +2776,8 @@ void intel_cpu_transcoder_set_m1_n1(struct intel_crtc *crtc,
>  	struct intel_display *display = to_intel_display(crtc);
>  	enum pipe pipe = crtc->pipe;
>  
> +	bmg_enhanced_tgdda_write(crtc, transcoder, m_n);
> +
>  	if (DISPLAY_VER(display) >= 5)

[Severity: Medium]
The commit message states that CHICKEN_TRANS and HDMI_EMP_DATA "are explicitly
cleared when the mechanism is not in use, so that state cannot leak from a
previous modeset." Does this clearing logic work if the transcoder is repurposed
for HDMI?

The clearing logic is placed in bmg_enhanced_tgdda_write(), which is called
exclusively from intel_cpu_transcoder_set_m1_n1().

Looking at hsw_configure_cpu_transcoder(), intel_cpu_transcoder_set_m1_n1() is
only called for DP and FDI encoders:

    } else if (intel_crtc_has_dp_encoder(crtc_state)) {
        intel_cpu_transcoder_set_m1_n1(crtc, cpu_transcoder,
                                       &crtc_state->dp_m_n);
        intel_cpu_transcoder_set_m2_n2(crtc, cpu_transcoder,
                                       &crtc_state->dp_m2_n2);
    }

If a transcoder is first used for DisplayPort (triggering the workaround and
setting DP_ENHANCED_TGDDA_ENABLE) and subsequently repurposed for HDMI,
intel_cpu_transcoder_set_m1_n1() is completely skipped.

Will the Transcoder's Timing Generator DDA remain in the enhanced DP workaround
mode and potentially corrupt HDMI timings?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260917050649.871960-1-suraj.kandpal@intel.com?part=7

  reply	other threads:[~2026-09-17  5:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17  5:06 [PATCH v4 00/10] Implement Wa_14021768792 to bypass m_n ratio limit Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 01/10] drm/i915/display: Add helper to compute link M/N ratio for reuse Suraj Kandpal
2026-09-29 15:13   ` Golani, Mitulkumar Ajitkumar
2026-10-05  3:41     ` Kandpal, Suraj
2026-09-17  5:06 ` [PATCH v4 02/10] drm/i915/dp: Limit M/N ratio for DP SST Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 03/10] drm/i915/dp_mst: Limit M/N ratio for MST Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 04/10] drm/i915/dp: Add M/N ratio check for DP link config Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 05/10] drm/i915/display: Add bits for link_n_extended for DISPLAY >= 14 Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 06/10] drm/i915/display_wa: Add support for Wa_14021768792 Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 07/10] drm/i915/display: Add bits for Wa_14021768792 for linkm/n ratio > 10 Suraj Kandpal
2026-09-17  5:19   ` sashiko-bot [this message]
2026-09-17  5:57     ` Kandpal, Suraj
2026-09-17  5:06 ` [PATCH v4 08/10] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n " Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 09/10] drm/i915/dp: Extend intel_dp_can_support_m_n() for BMG M/N bypass Suraj Kandpal
2026-09-17  5:06 ` [PATCH v4 10/10] drm/i915/dp: Bump the max Link M/N ratio to 22 for DISPLAY_VER >= 35 Suraj Kandpal
2026-09-17  5:15 ` ✓ CI.KUnit: success for Implement Wa_14021768792 to bypass m_n ratio limit (rev9) Patchwork
2026-09-17  6:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-17  7:21 ` ✓ Xe.CI.FULL: " 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=20260917051903.2F6171F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=suraj.kandpal@intel.com \
    /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