]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/i915/cdclk: Indicate whether CDCLK change happens during pre or post plane update
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 2 Apr 2024 15:50:06 +0000 (18:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 4 Apr 2024 13:27:04 +0000 (16:27 +0300)
Currently we just get a plain "Changing CDCLK to ..." in the
logs. It would actually be interesting to see whether we're
doing the programming during the pre or post plane phase of
the commit. Include that information in the debug message.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240402155016.13733-5-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_cdclk.c

index 8d937e77f91a5c2b63f86b804abebbabc7473cc8..ed8d9ee094b8542ff0b0341cb331d7f52bd9d4c3 100644 (file)
@@ -2434,18 +2434,9 @@ static void intel_pcode_notify(struct drm_i915_private *i915,
                        ret);
 }
 
-/**
- * intel_set_cdclk - Push the CDCLK configuration to the hardware
- * @dev_priv: i915 device
- * @cdclk_config: new CDCLK configuration
- * @pipe: pipe with which to synchronize the update
- *
- * Program the hardware based on the passed in CDCLK state,
- * if necessary.
- */
 static void intel_set_cdclk(struct drm_i915_private *dev_priv,
                            const struct intel_cdclk_config *cdclk_config,
-                           enum pipe pipe)
+                           enum pipe pipe, const char *context)
 {
        struct intel_encoder *encoder;
 
@@ -2455,7 +2446,7 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv,
        if (drm_WARN_ON_ONCE(&dev_priv->drm, !dev_priv->display.funcs.cdclk->set_cdclk))
                return;
 
-       intel_cdclk_dump_config(dev_priv, cdclk_config, "Changing CDCLK to");
+       intel_cdclk_dump_config(dev_priv, cdclk_config, context);
 
        for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
                struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
@@ -2628,7 +2619,8 @@ intel_set_cdclk_pre_plane_update(struct intel_atomic_state *state)
 
        drm_WARN_ON(&i915->drm, !new_cdclk_state->base.changed);
 
-       intel_set_cdclk(i915, &cdclk_config, pipe);
+       intel_set_cdclk(i915, &cdclk_config, pipe,
+                       "Pre changing CDCLK to");
 }
 
 /**
@@ -2663,7 +2655,8 @@ intel_set_cdclk_post_plane_update(struct intel_atomic_state *state)
 
        drm_WARN_ON(&i915->drm, !new_cdclk_state->base.changed);
 
-       intel_set_cdclk(i915, &new_cdclk_state->actual, pipe);
+       intel_set_cdclk(i915, &new_cdclk_state->actual, pipe,
+                       "Post changing CDCLK to");
 }
 
 static int intel_pixel_rate_to_cdclk(const struct intel_crtc_state *crtc_state)