Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Paz Zcharya <pazz@chromium.org>
Subject: Re: [PATCH 5/8] drm/i915: Extract lrr_params_changed()
Date: Mon, 20 Jan 2025 18:50:42 +0200	[thread overview]
Message-ID: <87tt9tpgyl.fsf@intel.com> (raw)
In-Reply-To: <20250116201637.22486-6-ville.syrjala@linux.intel.com>

On Thu, 16 Jan 2025, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Pull the "do we actually need a LRR update?" checks into a small
> helper for clarity.
>
> Cc: Paz Zcharya <pazz@chromium.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index fa398d7d1baa..9b42d980ed7e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6081,6 +6081,13 @@ static int intel_modeset_checks(struct intel_atomic_state *state)
>  	return 0;
>  }
>  
> +static bool lrr_params_changed(const struct drm_display_mode *old_adjusted_mode,
> +			       const struct drm_display_mode *new_adjusted_mode)
> +{
> +	return old_adjusted_mode->crtc_vblank_end != new_adjusted_mode->crtc_vblank_end ||
> +		old_adjusted_mode->crtc_vtotal != new_adjusted_mode->crtc_vtotal;
> +}
> +
>  static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_state,
>  				     struct intel_crtc_state *new_crtc_state)
>  {
> @@ -6101,8 +6108,8 @@ static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_sta
>  				   &new_crtc_state->dp_m_n))
>  		new_crtc_state->update_m_n = false;
>  
> -	if ((old_crtc_state->hw.adjusted_mode.crtc_vtotal == new_crtc_state->hw.adjusted_mode.crtc_vtotal &&
> -	     old_crtc_state->hw.adjusted_mode.crtc_vblank_end == new_crtc_state->hw.adjusted_mode.crtc_vblank_end))
> +	if (!lrr_params_changed(&old_crtc_state->hw.adjusted_mode,
> +				&new_crtc_state->hw.adjusted_mode))
>  		new_crtc_state->update_lrr = false;
>  
>  	if (intel_crtc_needs_modeset(new_crtc_state))

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-01-20 16:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 20:16 [PATCH 0/8] drm/i915: Handle vblank delay vs. fastboot and finish DSB plane update enabling Ville Syrjala
2025-01-16 20:16 ` [PATCH 1/8] drm/i915: Keep TRANS_VBLANK.vblank_start==0 on ADL+ even when doing LRR updates Ville Syrjala
2025-01-20 16:48   ` Jani Nikula
2025-01-21 14:38     ` Ville Syrjälä
2025-01-16 20:16 ` [PATCH 2/8] drm/i915: Handle interlaced modes in intel_set_transcoder_timings_lrr() Ville Syrjala
2025-01-20 16:49   ` Jani Nikula
2025-01-16 20:16 ` [PATCH 3/8] drm/i915: Update TRANS_SET_CONTEXT_LATENCY during LRR updates Ville Syrjala
2025-01-20 16:49   ` Jani Nikula
2025-01-16 20:16 ` [PATCH 4/8] drm/i915: Warn if someone tries to use intel_set_transcoder_timings*() on DSI outputs Ville Syrjala
2025-01-20 16:50   ` Jani Nikula
2025-01-16 20:16 ` [PATCH 5/8] drm/i915: Extract lrr_params_changed() Ville Syrjala
2025-01-20 16:50   ` Jani Nikula [this message]
2025-01-16 20:16 ` [PATCH 6/8] drm/i915: Allow fastboot to fix up the vblank delay Ville Syrjala
2025-01-20 16:53   ` Jani Nikula
2025-01-20 19:21     ` Ville Syrjälä
2025-01-16 20:16 ` [PATCH 7/8] drm/i915/dsb: Add support for triggering VRR push with DSB Ville Syrjala
2025-01-16 20:16 ` [PATCH 8/8] drm/i915/dsb: Allow DSB to perform commits when VRR is enabled Ville Syrjala
2025-01-17  1:54 ` ✗ i915.CI.BAT: failure for drm/i915: Handle vblank delay vs. fastboot and finish DSB plane update enabling Patchwork
2025-01-17 12:01 ` ✓ i915.CI.BAT: success for drm/i915: Handle vblank delay vs. fastboot and finish DSB plane update enabling (rev2) Patchwork
2025-01-19 13:06 ` ✗ i915.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=87tt9tpgyl.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=pazz@chromium.org \
    --cc=ville.syrjala@linux.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