[Intel-gfx][PATCH 02/10] drm/i915/display/cdclk: Make MISSING_CASE backtrace i915 specific

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i915_MISSING_CASE macro includes the device information in the
backtrace, so we know what device the warnings originate from.

Covert MISSING_CASE calls with i915 specific i915_MISSING_CASE variant
in functions where drm_i915_private struct pointer is readily
available.

The conversion was done automatically with below coccinelle semantic
patch.

@rule1@
identifier func, T;
@@
func(...) {
...
struct drm_i915_private *T = ...;
<...
-MISSING_CASE(
+i915_MISSING_CASE(T,
...)
...>
}

@rule2@
identifier func, T;
@@
func(struct drm_i915_private *T,...) {
<...
-MISSING_CASE(
+i915_MISSING_CASE(T,
...)
...>

}

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 0741d643455b..50d7415d0c4c 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -545,7 +545,7 @@ static void vlv_set_cdclk(struct drm_i915_private *dev_priv,
 	case 200000:
 		break;
 	default:
-		MISSING_CASE(cdclk);
+		i915_MISSING_CASE(dev_priv, cdclk);
 		return;
 	}
 
@@ -633,7 +633,7 @@ static void chv_set_cdclk(struct drm_i915_private *dev_priv,
 	case 200000:
 		break;
 	default:
-		MISSING_CASE(cdclk);
+		i915_MISSING_CASE(dev_priv, cdclk);
 		return;
 	}
 
@@ -762,7 +762,7 @@ static void bdw_set_cdclk(struct drm_i915_private *dev_priv,
 
 	switch (cdclk) {
 	default:
-		MISSING_CASE(cdclk);
+		i915_MISSING_CASE(dev_priv, cdclk);
 		/* fall through */
 	case 337500:
 		val |= LCPLL_CLK_FREQ_337_5_BDW;
@@ -868,7 +868,8 @@ static void skl_dpll0_update(struct drm_i915_private *dev_priv,
 		cdclk_config->vco = 8640000;
 		break;
 	default:
-		MISSING_CASE(val & DPLL_CTRL1_LINK_RATE_MASK(SKL_DPLL0));
+		i915_MISSING_CASE(dev_priv,
+				  val & DPLL_CTRL1_LINK_RATE_MASK(SKL_DPLL0));
 		break;
 	}
 }
@@ -902,7 +903,8 @@ static void skl_get_cdclk(struct drm_i915_private *dev_priv,
 			cdclk_config->cdclk = 617143;
 			break;
 		default:
-			MISSING_CASE(cdctl & CDCLK_FREQ_SEL_MASK);
+			i915_MISSING_CASE(dev_priv,
+					  cdctl & CDCLK_FREQ_SEL_MASK);
 			break;
 		}
 	} else {
@@ -920,7 +922,8 @@ static void skl_get_cdclk(struct drm_i915_private *dev_priv,
 			cdclk_config->cdclk = 675000;
 			break;
 		default:
-			MISSING_CASE(cdctl & CDCLK_FREQ_SEL_MASK);
+			i915_MISSING_CASE(dev_priv,
+					  cdctl & CDCLK_FREQ_SEL_MASK);
 			break;
 		}
 	}
@@ -1329,7 +1332,7 @@ static void icl_readout_refclk(struct drm_i915_private *dev_priv,
 
 	switch (dssm) {
 	default:
-		MISSING_CASE(dssm);
+		i915_MISSING_CASE(dev_priv, dssm);
 		/* fall through */
 	case ICL_DSSM_CDCLK_PLL_REFCLK_24MHz:
 		cdclk_config->ref = 24000;
@@ -1419,7 +1422,7 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,
 		div = 8;
 		break;
 	default:
-		MISSING_CASE(divider);
+		i915_MISSING_CASE(dev_priv, divider);
 		return;
 	}
 
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux