]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/display: Prepare for vblank_delay for LRR
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 16 Oct 2025 05:54:14 +0000 (11:24 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 16 Oct 2025 13:57:42 +0000 (19:27 +0530)
Update allow_vblank_delay_fastset() to permit vblank delay adjustments
during with LRR when VRR TG is always active.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20251016055415.2101347-11-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_display.c

index ceee5ae99c2cface6951ff0e4be9f77a2290cc3d..65a7da694ef6b3c0c941ca0ca0e6a8f20045dc06 100644 (file)
@@ -4958,9 +4958,15 @@ static bool allow_vblank_delay_fastset(const struct intel_crtc_state *old_crtc_s
         * Allow fastboot to fix up vblank delay (handled via LRR
         * codepaths), a bit dodgy as the registers aren't
         * double buffered but seems to be working more or less...
+        *
+        * Also allow this when the VRR timing generator is always on,
+        * and optimized guardband is used. In such cases,
+        * vblank delay may vary even without inherited state, but it's
+        * still safe as VRR guardband is still same.
         */
-       return HAS_LRR(display) && old_crtc_state->inherited &&
-               !intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DSI);
+       return HAS_LRR(display) &&
+              (old_crtc_state->inherited || intel_vrr_always_use_vrr_tg(display)) &&
+              !intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DSI);
 }
 
 bool