]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/lrr: Include SCL in lrr_params_changed()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Oct 2025 18:50:18 +0000 (21:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 24 Oct 2025 20:54:40 +0000 (23:54 +0300)
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>
drivers/gpu/drm/i915/display/intel_display.c

index 09d3eb422ad4cd6879bd5273dc04fc425cca8c64..490b4f2907e163b0223ba2dad77d532af94776fc 100644 (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))