drm/i915: Sanitize underrun reporting before turning off any pipes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 15 Jun 2022 17:48:51 +0000 (20:48 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Jun 2022 14:06:18 +0000 (17:06 +0300)
Make sure FIFO underrun reporting is flagged as disabled very
early during the state readout so that we don't get any
spurious FIFO underruns reports from intel_crtc_disable_noatomic().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220615174851.20658-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index 3fac545414b4527dc5d8c6c5fc739901e639d3e6..88658090ac583f91e6d83ea3b8776fc3cd4f844e 100644 (file)
@@ -9962,8 +9962,6 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
        if (crtc_state->hw.active && !intel_crtc_has_encoders(crtc) &&
            !intel_crtc_is_bigjoiner_slave(crtc_state))
                intel_crtc_disable_noatomic(crtc, ctx);
-
-       intel_sanitize_fifo_underrun_reporting(crtc_state);
 }
 
 static bool has_bogus_dpll_config(const struct intel_crtc_state *crtc_state)
@@ -10363,6 +10361,8 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
                struct intel_crtc_state *crtc_state =
                        to_intel_crtc_state(crtc->base.state);
 
+               intel_sanitize_fifo_underrun_reporting(crtc_state);
+
                drm_crtc_vblank_reset(&crtc->base);
 
                if (crtc_state->hw.active)