drm/i915: Reduce combo PHY log spam
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 2 May 2023 14:39:06 +0000 (17:39 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 13 Sep 2023 14:10:34 +0000 (17:10 +0300)
We always check whether combo PHYs need to be re-initialized
after disabling DC states, which leads to log spam. Switch things
around so that we only log something when we actually have to
re-initialized a PHY.

The log spam was exacerbated by commit 41b4c7fe72b6 ("drm/i915:
Disable DC states for all commits") since we now disable DC
states far more often.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230502143906.2401-12-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
drivers/gpu/drm/i915/display/intel_combo_phy.c

index e2a220c..143d669 100644 (file)
@@ -114,10 +114,6 @@ static bool icl_verify_procmon_ref_values(struct drm_i915_private *dev_priv,
 
        procmon = icl_get_procmon_ref_values(dev_priv, phy);
 
-       drm_dbg_kms(&dev_priv->drm,
-                   "Combo PHY %c Voltage/Process Info : %s\n",
-                   phy_name(phy), procmon->name);
-
        ret = check_phy_reg(dev_priv, phy, ICL_PORT_COMP_DW1(phy),
                            (0xff << 16) | 0xff, procmon->dw1);
        ret &= check_phy_reg(dev_priv, phy, ICL_PORT_COMP_DW9(phy),
@@ -312,14 +308,17 @@ static void icl_combo_phys_init(struct drm_i915_private *dev_priv)
        enum phy phy;
 
        for_each_combo_phy(dev_priv, phy) {
+               const struct icl_procmon *procmon;
                u32 val;
 
-               if (icl_combo_phy_verify_state(dev_priv, phy)) {
-                       drm_dbg(&dev_priv->drm,
-                               "Combo PHY %c already enabled, won't reprogram it.\n",
-                               phy_name(phy));
+               if (icl_combo_phy_verify_state(dev_priv, phy))
                        continue;
-               }
+
+               procmon = icl_get_procmon_ref_values(dev_priv, phy);
+
+               drm_dbg(&dev_priv->drm,
+                       "Initializing combo PHY %c (Voltage/Process Info : %s)\n",
+                       phy_name(phy), procmon->name);
 
                if (!has_phy_misc(dev_priv, phy))
                        goto skip_phy_misc;