drm/i915: Disable VRR during seamless M/N changes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 1 Sep 2023 13:04:37 +0000 (16:04 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 20 Sep 2023 19:31:21 +0000 (22:31 +0300)
Make life less confusing by making sure VRR is disabled whenever
we do any drastic changes to the display timings, such as seamless
M/N changes.

Cc: Manasi Navare <navaremanasi@chromium.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901130440.2085-10-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <navaremanasi@chromium.org>
Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index d3c41bf4926351f7181b3ab0336ff95c5eaa6054..26b201d0e2cf9f2dd769a00926b7b1c3eafede91 100644 (file)
@@ -916,13 +916,15 @@ static bool planes_disabling(const struct intel_crtc_state *old_crtc_state,
 static bool vrr_enabling(const struct intel_crtc_state *old_crtc_state,
                         const struct intel_crtc_state *new_crtc_state)
 {
-       return is_enabling(vrr.enable, old_crtc_state, new_crtc_state);
+       return is_enabling(vrr.enable, old_crtc_state, new_crtc_state) ||
+               (new_crtc_state->vrr.enable && new_crtc_state->update_m_n);
 }
 
 static bool vrr_disabling(const struct intel_crtc_state *old_crtc_state,
                          const struct intel_crtc_state *new_crtc_state)
 {
-       return is_disabling(vrr.enable, old_crtc_state, new_crtc_state);
+       return is_disabling(vrr.enable, old_crtc_state, new_crtc_state) ||
+               (old_crtc_state->vrr.enable && new_crtc_state->update_m_n);
 }
 
 #undef is_disabling