From: sashiko-bot@kernel.org
To: "Suraj Kandpal" <suraj.kandpal@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 11/15] drm/i915/pipelock: Equalize the guardband across a pipelock group
Date: Thu, 26 Nov 2026 06:49:43 +0000 [thread overview]
Message-ID: <sashiko-outbox-234903@kernel.org> (raw)
In-Reply-To: <20261126063459.863698-12-suraj.kandpal@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/pipelock: negative bit shift in
pipelock_group_guardband()
--
commit b42870c545a16f2b3393a7945560d4d31fa9bd29
Author: Suraj Kandpal <suraj.kandpal@intel.com>
drm/i915/pipelock: Equalize the guardband across a pipelock group
This commit drops the guardband equality check from
intel_pipelock_compatible() and raises each tile's VRR guardband to the
maximum across its pipelock group before running DP late config.
> diff --git a/drivers/gpu/drm/i915/display/intel_pipelock.c b/drivers/gpu/drm/i915/display/intel_pipelock.c
> index 23b6db074385d..276a7bfa7c4bf 100644
> --- a/drivers/gpu/drm/i915/display/intel_pipelock.c
> +++ b/drivers/gpu/drm/i915/display/intel_pipelock.c
[ ... ]
> @@ -92,14 +93,38 @@ bool intel_pipelock_compatible(const struct intel_crtc_state *crtc_state1,
> crtc_state1->vrr.vmin == crtc_state2->vrr.vmin &&
> crtc_state1->vrr.vmax == crtc_state2->vrr.vmax &&
> crtc_state1->vrr.flipline == crtc_state2->vrr.flipline &&
> - crtc_state1->vrr.guardband == crtc_state2->vrr.guardband &&
> crtc_state1->infoframes.enable == crtc_state2->infoframes.enable &&
> intel_dpll_compare_hw_state(display, &crtc_state1->dpll_hw_state,
> &crtc_state2->dpll_hw_state);
> }
>
> -void intel_pipelock_compute_config(struct intel_crtc_state *crtc_state)
> +static int pipelock_group_guardband(struct intel_atomic_state *state, u16 transcoders)
> {
> + const struct intel_crtc_state *crtc_state;
> + struct intel_crtc *crtc;
> + int guardband = 0;
> +
> + for_each_new_intel_crtc_in_state(state, crtc, crtc_state) {
> + if (transcoders & BIT(crtc_state->cpu_transcoder))
> + guardband = max_t(int, guardband, crtc_state->vrr.guardband);
> + }
[Severity: Medium]
Can BIT(crtc_state->cpu_transcoder) shift by a negative amount here when
a disabled CRTC is present in the atomic state?
In intel_atomic_check_config(), a disabled CRTC is reset by
intel_crtc_prepare_cleared_state() -> intel_crtc_state_reset() (which sets
cpu_transcoder to INVALID_TRANSCODER, i.e. -1) and then skips
intel_modeset_pipe_config(). Sibling loops such as
intel_cpu_transcoders_need_modeset() check crtc_state->hw.enable before
evaluating BIT(crtc_state->cpu_transcoder) to avoid undefined shift
behavior and UBSAN shift-out-of-bounds warnings.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126063459.863698-1-suraj.kandpal@intel.com?part=11
next prev parent reply other threads:[~2026-11-26 6:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 6:34 [PATCH 00/15] drm/i915/display: Sync tiled displays with pipelock Suraj Kandpal
2026-11-26 6:34 ` [PATCH 01/15] drm/i915/display: Rename port sync master/slave to primary/secondary Suraj Kandpal
2026-11-26 6:43 ` sashiko-bot
2026-11-26 6:34 ` [PATCH 02/15] drm/i915/display: Add HAS_PIPELOCK() Suraj Kandpal
2026-11-26 6:34 ` [PATCH 03/15] drm/i915/display: Add pipelock bits to TRANS_DDI_FUNC_CTL2 Suraj Kandpal
2026-11-26 8:45 ` Jani Nikula
2026-11-26 6:34 ` [PATCH 04/15] drm/i915/ddi: Program pipelock in TRANS_DDI_FUNC_CTL2 Suraj Kandpal
2026-11-26 6:34 ` [PATCH 05/15] drm/i915/ddi: Don't hold the DP link in idle with pipelock Suraj Kandpal
2026-11-26 6:34 ` [PATCH 06/15] drm/i915/display: Enable the pipelock primary before its secondaries Suraj Kandpal
2026-11-26 6:34 ` [PATCH 07/15] drm/i915/display: Read out and verify pipelock state Suraj Kandpal
2026-11-26 6:34 ` [PATCH 08/15] drm/i915/pipelock: Keep SSC, PSR and CMRR off on pipelock tiles Suraj Kandpal
2026-11-26 8:52 ` Jani Nikula
2026-11-26 9:14 ` Kandpal, Suraj
2026-11-26 6:34 ` [PATCH 09/15] drm/i915/pipelock: Compute pipelock groups for DP tiled displays Suraj Kandpal
2026-11-26 8:56 ` Jani Nikula
2026-11-26 9:16 ` Kandpal, Suraj
2026-11-26 6:34 ` [PATCH 10/15] drm/i915/vrr: Split out setting the guardband Suraj Kandpal
2026-11-26 6:44 ` sashiko-bot
2026-11-26 8:58 ` Jani Nikula
2026-11-26 9:17 ` Kandpal, Suraj
2026-11-26 6:34 ` [PATCH 11/15] drm/i915/pipelock: Equalize the guardband across a pipelock group Suraj Kandpal
2026-11-26 6:49 ` sashiko-bot [this message]
2026-11-26 6:34 ` [PATCH 12/15] drm/i915/dp: Apply link training fallback to the whole tile group Suraj Kandpal
2026-11-26 7:06 ` sashiko-bot
2026-11-26 6:34 ` [PATCH 13/15] drm/i915/display: Show transcoder sync state in i915_display_info Suraj Kandpal
2026-11-26 6:34 ` [PATCH 14/15] drm/i915/display: Use pipelock on PTL Suraj Kandpal
2026-11-26 6:54 ` sashiko-bot
2026-11-26 6:34 ` [PATCH 15/15] drm/i915/ddi: Disable port sync " Suraj Kandpal
2026-11-26 7:49 ` ✓ i915.CI.BAT: success for drm/i915/display: Sync tiled displays with pipelock 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-234903@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