All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arun R Murthy" <arun.r.murthy@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 6/7] drm/i915/display: Program and enable the DP symbol based timing generator
Date: Tue, 03 Nov 2026 10:23:10 +0000	[thread overview]
Message-ID: <sashiko-outbox-195038@kernel.org> (raw)
In-Reply-To: <20261103-vlk-64036-dp-symbol-tg-v4-6-6cf8a588b54c@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915/display: invalid CMTG MMIO write in intel_set_transcoder_timings()
--

commit d5e98872efc6064e978436ee34bbcfdf86c29006
Author: Arun R Murthy <arun.r.murthy@intel.com>

drm/i915/display: Program and enable the DP symbol based timing generator

This commit programs and enables the DP link layer symbol based timing
generator, including the 128-bit Data M/N registers, HACT/HTOTAL/CHUNK_SIZE
timing registers, and TRANSCONF configuration and state readout.

> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 15117b715e1d5..d450b34b8035a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c

[ ... ]

> @@ -2936,6 +2996,17 @@ void intel_set_transcoder_timings(const struct intel_crtc_state *crtc_state,
>  		intel_de_write(display, DP_MIN_HBLANK_CTL(transcoder),
>  			       crtc_state->min_hblank);
>  	}
> +
> +	if (crtc_state->dp_symbol_tg.enable) {
> +		const struct intel_dp_symbol_tg *tg = &crtc_state->dp_symbol_tg;
> +
> +		intel_de_write(display, TRANS_LLSYM_HACT(display, transcoder),
> +			       TRANS_LLSYM_HACT_VAL(tg->hactive - 1));
> +		intel_de_write(display, TRANS_LLSYM_HTOTAL(display, transcoder),
> +			       TRANS_LLSYM_HTOTAL_VAL(tg->htotal - 1));
> +		intel_de_write(display, TRANS_LLSYM_CHUNK_SIZE(display, transcoder),
> +			       TRANS_LLSYM_CHUNK_SIZE_VAL(tg->chunk_size));
> +	}
>  }

[Severity: Medium]
Can this write to non-existent CMTG MMIO registers when
intel_set_transcoder_timings() is called for TRANSCODER_CMTG0 or
TRANSCODER_CMTG1?

During modeset and DC state restore on display version 35,
hsw_configure_cpu_transcoder() and intel_cmtg_restore() call
intel_cmtg_set_timings() -> intel_set_transcoder_timings(crtc_state,
cmtg_transcoder) when cpu_transcoder is TRANSCODER_A or TRANSCODER_B on an
eDP output:

drivers/gpu/drm/i915/display/intel_cmtg.c:intel_cmtg_set_timings() {
	enum transcoder cmtg_transcoder = to_cmtg_transcoder(crtc_state->cpu_transcoder);
	...
	if (type == LRR)
		intel_set_transcoder_timings_lrr(crtc_state, cmtg_transcoder);
	else
		intel_set_transcoder_timings(crtc_state, cmtg_transcoder);
}

When an eDP panel operates at a 128b/132b UHBR link rate without MSO
splitter, intel_dp_compute_symbol_tg() sets crtc_state->dp_symbol_tg.enable
to true.

Just above this block in intel_set_transcoder_timings(), the
DP_MIN_HBLANK_CTL write checks that transcoder is not a CMTG transcoder:

	if (DISPLAY_VER(display) >= 30 &&
	    transcoder != TRANSCODER_CMTG0 &&
	    transcoder != TRANSCODER_CMTG1) {
		intel_de_write(display, DP_MIN_HBLANK_CTL(transcoder),
			       crtc_state->min_hblank);
	}

Without a similar check on transcoder here, _MMIO_TRANS2() translates
TRANS_LLSYM_HACT, TRANS_LLSYM_HTOTAL, and TRANS_LLSYM_CHUNK_SIZE using the
CMTG base offset and writes to unclaimed register offsets 0x6f0dc..0x6f0e4
(or 0x6f1dc..0x6f1e4).

Should this block also check transcoder != TRANSCODER_CMTG0 &&
transcoder != TRANSCODER_CMTG1 before writing the TRANS_LLSYM_* registers?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-vlk-64036-dp-symbol-tg-v4-0-6cf8a588b54c@intel.com?part=6

  reply	other threads:[~2026-11-03 10:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  9:58 [PATCH v4 0/7] drm/i915/dp: Add support for the DP symbol based timing generator Arun R Murthy
2026-11-03  9:58 ` [PATCH v4 1/7] drm/i915/dp: Factor out the DSC slice count and link bpp lookup Arun R Murthy
2026-11-03  9:58 ` [PATCH v4 2/7] drm/i915/display: Add the DP link layer symbol timing generator registers Arun R Murthy
2026-11-03  9:58 ` [PATCH v4 3/7] drm/i915/display: Add the DP symbol timing generator crtc state Arun R Murthy
2026-11-03  9:58 ` [PATCH v4 4/7] drm/i915/display: Add HAS_DP_SYMBOL_TG() Arun R Murthy
2026-11-03  9:58 ` [PATCH v4 5/7] drm/i915/dp: Compute the DP symbol based timing generator parameters Arun R Murthy
2026-11-03  9:58 ` [PATCH v4 6/7] drm/i915/display: Program and enable the DP symbol based timing generator Arun R Murthy
2026-11-03 10:23   ` sashiko-bot [this message]
2026-11-03  9:58 ` [PATCH v4 7/7] drm/i915/dp: Don't limit the Link M/N ratio with the symbol " Arun R Murthy
2026-11-04  1:30   ` Kandpal, Suraj
2026-11-03 10:13 ` ✓ CI.KUnit: success for drm/i915/dp: Add support for the DP symbol based timing generator (rev3) Patchwork
2026-11-03 10:49 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-03 11:21 ` ✓ i915.CI.BAT: " Patchwork
2026-11-03 14:30 ` ✗ i915.CI.Full: failure " Patchwork
2026-11-03 19:18 ` ✗ Xe.CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-11-04  3:24 [PATCH v4 0/7] drm/i915/dp: Add support for the DP symbol based timing generator Arun R Murthy
2026-11-04  3:24 ` [PATCH v4 6/7] drm/i915/display: Program and enable " Arun R Murthy

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-195038@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=arun.r.murthy@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.