]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset block
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Mon, 24 Mar 2025 13:32:43 +0000 (19:02 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Tue, 25 Mar 2025 15:47:25 +0000 (21:17 +0530)
Since the vrr.guardband can now change for platforms that always use the
VRR Timing Generator, and it is unsafe to reprogram the guardband on the
fly, move the guardband and pipeline_full checks from the pure !fastboot
path and add a check for intel_vrr_always_use_vrr_tg().

For older platforms the vrr.guardband change happens when VRR Timing
generator is off. For the platforms that always use the VRR Timing
Generator, this will prevent reprogramming the vrr.guardband without a
full modeset. However, this will disrupt LRR functionality for these
platforms.

v2: Modify the check to avoid breaking the LRR on older platform.
(Ville)
v3: Correct the oversight of not removing the lines from the original
location. (Ville)

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/20250324133248.4071909-12-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_vrr.c
drivers/gpu/drm/i915/display/intel_vrr.h

index 5713a4d017d7ee7ab176a4772662699d1ce200d7..a2e6c01beeb5c7ff8f12888d862e9ca606746e02 100644 (file)
@@ -5387,8 +5387,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
                PIPE_CONF_CHECK_I(vrr.vmin);
                PIPE_CONF_CHECK_I(vrr.vmax);
                PIPE_CONF_CHECK_I(vrr.flipline);
-               PIPE_CONF_CHECK_I(vrr.pipeline_full);
-               PIPE_CONF_CHECK_I(vrr.guardband);
                PIPE_CONF_CHECK_I(vrr.vsync_start);
                PIPE_CONF_CHECK_I(vrr.vsync_end);
                PIPE_CONF_CHECK_LLI(cmrr.cmrr_m);
@@ -5396,6 +5394,11 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
                PIPE_CONF_CHECK_BOOL(cmrr.enable);
        }
 
+       if (!fastset || intel_vrr_always_use_vrr_tg(display)) {
+               PIPE_CONF_CHECK_I(vrr.pipeline_full);
+               PIPE_CONF_CHECK_I(vrr.guardband);
+       }
+
 #undef PIPE_CONF_CHECK_X
 #undef PIPE_CONF_CHECK_I
 #undef PIPE_CONF_CHECK_LLI
index 352b853c10eb334219e2d7c7d6489ff40e3fbeee..c57e0319d83c23304633679e7b284bf71485734c 100644 (file)
@@ -552,7 +552,6 @@ bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state)
        return intel_de_read(display, TRANS_PUSH(display, cpu_transcoder)) & TRANS_PUSH_SEND;
 }
 
-static
 bool intel_vrr_always_use_vrr_tg(struct intel_display *display)
 {
        if (!HAS_VRR(display))
index c95acf1ad238987ab82b286ad22a9bd1c680be9e..38bf9996b8831521df3673425748589d77fdfa50 100644 (file)
@@ -13,6 +13,7 @@ struct intel_atomic_state;
 struct intel_connector;
 struct intel_crtc_state;
 struct intel_dsb;
+struct intel_display;
 
 bool intel_vrr_is_capable(struct intel_connector *connector);
 bool intel_vrr_is_in_range(struct intel_connector *connector, int vrefresh);
@@ -39,5 +40,6 @@ bool intel_vrr_is_fixed_rr(const struct intel_crtc_state *crtc_state);
 void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state);
 void intel_vrr_transcoder_disable(const struct intel_crtc_state *crtc_state);
 void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state);
+bool intel_vrr_always_use_vrr_tg(struct intel_display *display);
 
 #endif /* __INTEL_VRR_H__ */