drm/i915/lrr: Include SCL in lrr_params_changed()

If SCL is changing we need to take the LRR codepath to update
it during a fastset. Account for that in lrr_params_changed().

The current code will only notice the SCL change if the position
of the delayed vblank also changes. But that might not happen
when using the VRR timing generator because the delayed vblank
is then defined by the guardband instead of the SCL.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251020185038.4272-3-ville.syrjala@linux.intel.com
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
This commit is contained in:
Ville Syrjälä
2025-10-20 21:50:18 +03:00
parent aa88371928
commit d239335e3c

View File

@@ -5711,12 +5711,16 @@ 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)
static bool lrr_params_changed(const struct intel_crtc_state *old_crtc_state,
const struct intel_crtc_state *new_crtc_state)
{
const struct drm_display_mode *old_adjusted_mode = &old_crtc_state->hw.adjusted_mode;
const struct drm_display_mode *new_adjusted_mode = &new_crtc_state->hw.adjusted_mode;
return old_adjusted_mode->crtc_vblank_start != new_adjusted_mode->crtc_vblank_start ||
old_adjusted_mode->crtc_vblank_end != new_adjusted_mode->crtc_vblank_end ||
old_adjusted_mode->crtc_vtotal != new_adjusted_mode->crtc_vtotal;
old_adjusted_mode->crtc_vtotal != new_adjusted_mode->crtc_vtotal ||
old_crtc_state->set_context_latency != new_crtc_state->set_context_latency;
}
static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_state,
@@ -5742,8 +5746,7 @@ 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 (!lrr_params_changed(&old_crtc_state->hw.adjusted_mode,
&new_crtc_state->hw.adjusted_mode))
if (!lrr_params_changed(old_crtc_state, new_crtc_state))
new_crtc_state->update_lrr = false;
if (intel_crtc_needs_modeset(new_crtc_state))