drm/i915: Add some debug prints for intel_modeset_all_pipes()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 28 Sep 2022 06:08:13 +0000 (09:08 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 30 Sep 2022 13:01:28 +0000 (16:01 +0300)
Print out on which pipes, and for what reason, we are forcing a
full modeset.

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

index a12e86d..ad40135 100644 (file)
@@ -2769,7 +2769,7 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
        } else if (intel_cdclk_needs_modeset(&old_cdclk_state->actual,
                                             &new_cdclk_state->actual)) {
                /* All pipes must be switched off while we change the cdclk. */
-               ret = intel_modeset_all_pipes(state);
+               ret = intel_modeset_all_pipes(state, "CDCLK change");
                if (ret)
                        return ret;
 
index 4bcba61..8f20c11 100644 (file)
@@ -5937,7 +5937,8 @@ intel_verify_planes(struct intel_atomic_state *state)
                             plane_state->uapi.visible);
 }
 
-int intel_modeset_all_pipes(struct intel_atomic_state *state)
+int intel_modeset_all_pipes(struct intel_atomic_state *state,
+                           const char *reason)
 {
        struct drm_i915_private *dev_priv = to_i915(state->base.dev);
        struct intel_crtc *crtc;
@@ -5958,6 +5959,9 @@ int intel_modeset_all_pipes(struct intel_atomic_state *state)
                    drm_atomic_crtc_needs_modeset(&crtc_state->uapi))
                        continue;
 
+               drm_dbg_kms(&dev_priv->drm, "[CRTC:%d:%s] Full modeset due to %s\n",
+                           crtc->base.base.id, crtc->base.name, reason);
+
                crtc_state->uapi.mode_changed = true;
 
                ret = drm_atomic_add_affected_connectors(&state->base,
index ae06153..dc335e0 100644 (file)
@@ -683,7 +683,8 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915);
 void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915);
 void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915);
 void intel_display_resume(struct drm_device *dev);
-int intel_modeset_all_pipes(struct intel_atomic_state *state);
+int intel_modeset_all_pipes(struct intel_atomic_state *state,
+                           const char *reason);
 void intel_modeset_get_crtc_power_domains(struct intel_crtc_state *crtc_state,
                                          struct intel_power_domain_mask *old_domains);
 void intel_modeset_put_crtc_power_domains(struct intel_crtc *crtc,
index 01b0932..59e4fc6 100644 (file)
@@ -2486,7 +2486,7 @@ skl_compute_ddb(struct intel_atomic_state *state)
 
                if (old_dbuf_state->joined_mbus != new_dbuf_state->joined_mbus) {
                        /* TODO: Implement vblank synchronized MBUS joining changes */
-                       ret = intel_modeset_all_pipes(state);
+                       ret = intel_modeset_all_pipes(state, "MBUS joining change");
                        if (ret)
                                return ret;
                }