When enabling LRR/seamless MN disable LOBF first and re-enable
afterwards.
- pre_plane_update: if LOBF was enabled, disable LOBF before the
  update_lrr/update_m_n transition.
- post_plane_update: Re-enable LOBF after the transition.

Signed-off-by: Ankit Nautiyal <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index ecbdc506a1fc..9ffccfdd0f0c 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1018,7 +1018,9 @@ static bool intel_crtc_lobf_enabling(const struct 
intel_crtc_state *old_crtc_sta
        if (!new_crtc_state->has_psr)
                return false;
 
-       return is_enabling(has_lobf, old_crtc_state, new_crtc_state);
+       return is_enabling(has_lobf, old_crtc_state, new_crtc_state) ||
+              (new_crtc_state->has_lobf &&
+               (new_crtc_state->update_lrr || new_crtc_state->update_m_n));
 }
 
 static bool intel_crtc_lobf_disabling(const struct intel_crtc_state 
*old_crtc_state,
@@ -1027,7 +1029,9 @@ static bool intel_crtc_lobf_disabling(const struct 
intel_crtc_state *old_crtc_st
        if (!new_crtc_state->hw.active)
                return false;
 
-       return is_disabling(has_lobf, old_crtc_state, new_crtc_state);
+       return is_disabling(has_lobf, old_crtc_state, new_crtc_state) ||
+               (old_crtc_state->has_lobf &&
+                (new_crtc_state->update_lrr || new_crtc_state->update_m_n));
 }
 
 #undef is_disabling
-- 
2.45.2

Reply via email to