Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 10/15] drm/i915/vrr: Split out setting the guardband
Date: Thu, 26 Nov 2026 06:44:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-234893@kernel.org> (raw)
In-Reply-To: <20261126063459.863698-11-suraj.kandpal@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/i915/vrr: setter intel_vrr_guardband_val() named like a
  value getter
--

commit db54f00770dd52e82e61cd7ca35d6aebd9822459
Author: Suraj Kandpal <suraj.kandpal@intel.com>

drm/i915/vrr: Split out setting the guardband

This commit splits setting crtc_state->vrr.guardband and the derived
vblank start and pipeline full values out of intel_vrr_compute_guardband()
into a new intel_vrr_guardband_val() helper.

> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> index 47603c1412989..ad88034c23f89 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -620,22 +620,13 @@ static bool intel_vrr_use_optimized_guardband(const struct intel_crtc_state *crt
>  	return true;
>  }
>  
> -void intel_vrr_compute_guardband(struct intel_crtc_state *crtc_state)
> +void intel_vrr_guardband_val(struct intel_crtc_state *crtc_state, int guardband)
>  {
>  	struct intel_display *display = to_intel_display(crtc_state);
>  	struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
>  	struct drm_display_mode *pipe_mode = &crtc_state->hw.pipe_mode;
> -	int guardband;
>  
> -	if (!intel_vrr_possible(crtc_state))
> -		return;
> -
> -	if (intel_vrr_use_optimized_guardband(crtc_state))
> -		guardband = intel_vrr_compute_optimized_guardband(crtc_state);
> -	else
> -		guardband = crtc_state->vrr.vmin - adjusted_mode->crtc_vdisplay;
> -
> -	crtc_state->vrr.guardband = min(guardband, intel_vrr_max_guardband(crtc_state));
> +	crtc_state->vrr.guardband = guardband;

[Severity: Low]
This isn't a bug, but across i915 display, helpers without a verb or
ending in _val() (such as intel_vrr_vmin_vtotal() or
skl_plane_wm_reg_val()) are side-effect-free getters that return a value,
whereas void helpers that mutate state use a verb.  Since this sets
crtc_state->vrr.guardband and updates derived timing fields in crtc_state,
would a name like intel_vrr_set_guardband() be clearer?

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

  reply	other threads:[~2026-11-26  6:44 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 [this message]
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
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-234893@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