[Intel-gfx][PATCH 05/10] drm/i915/dp: Make MISSING_CASE backtrace i915 specific

Pankaj Bharadiya pankaj.laxminarayan.bharadiya at intel.com
Tue Feb 25 13:47:04 UTC 2020


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 at intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++-------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 0a5a9197f8f5..68e4faf5ff96 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1619,7 +1619,7 @@ static i915_reg_t g4x_aux_ctl_reg(struct intel_dp *intel_dp)
 	case AUX_CH_D:
 		return DP_AUX_CH_CTL(aux_ch);
 	default:
-		MISSING_CASE(aux_ch);
+		i915_MISSING_CASE(dev_priv, aux_ch);
 		return DP_AUX_CH_CTL(AUX_CH_B);
 	}
 }
@@ -1636,7 +1636,7 @@ static i915_reg_t g4x_aux_data_reg(struct intel_dp *intel_dp, int index)
 	case AUX_CH_D:
 		return DP_AUX_CH_DATA(aux_ch, index);
 	default:
-		MISSING_CASE(aux_ch);
+		i915_MISSING_CASE(dev_priv, aux_ch);
 		return DP_AUX_CH_DATA(AUX_CH_B, index);
 	}
 }
@@ -1655,7 +1655,7 @@ static i915_reg_t ilk_aux_ctl_reg(struct intel_dp *intel_dp)
 	case AUX_CH_D:
 		return PCH_DP_AUX_CH_CTL(aux_ch);
 	default:
-		MISSING_CASE(aux_ch);
+		i915_MISSING_CASE(dev_priv, aux_ch);
 		return DP_AUX_CH_CTL(AUX_CH_A);
 	}
 }
@@ -1674,7 +1674,7 @@ static i915_reg_t ilk_aux_data_reg(struct intel_dp *intel_dp, int index)
 	case AUX_CH_D:
 		return PCH_DP_AUX_CH_DATA(aux_ch, index);
 	default:
-		MISSING_CASE(aux_ch);
+		i915_MISSING_CASE(dev_priv, aux_ch);
 		return DP_AUX_CH_DATA(AUX_CH_A, index);
 	}
 }
@@ -1695,7 +1695,7 @@ static i915_reg_t skl_aux_ctl_reg(struct intel_dp *intel_dp)
 	case AUX_CH_G:
 		return DP_AUX_CH_CTL(aux_ch);
 	default:
-		MISSING_CASE(aux_ch);
+		i915_MISSING_CASE(dev_priv, aux_ch);
 		return DP_AUX_CH_CTL(AUX_CH_A);
 	}
 }
@@ -1716,7 +1716,7 @@ static i915_reg_t skl_aux_data_reg(struct intel_dp *intel_dp, int index)
 	case AUX_CH_G:
 		return DP_AUX_CH_DATA(aux_ch, index);
 	default:
-		MISSING_CASE(aux_ch);
+		i915_MISSING_CASE(dev_priv, aux_ch);
 		return DP_AUX_CH_DATA(AUX_CH_A, index);
 	}
 }
@@ -5417,7 +5417,7 @@ static bool ibx_digital_port_connected(struct intel_encoder *encoder)
 		bit = SDE_PORTD_HOTPLUG;
 		break;
 	default:
-		MISSING_CASE(encoder->hpd_pin);
+		i915_MISSING_CASE(dev_priv, encoder->hpd_pin);
 		return false;
 	}
 
@@ -5440,7 +5440,7 @@ static bool cpt_digital_port_connected(struct intel_encoder *encoder)
 		bit = SDE_PORTD_HOTPLUG_CPT;
 		break;
 	default:
-		MISSING_CASE(encoder->hpd_pin);
+		i915_MISSING_CASE(dev_priv, encoder->hpd_pin);
 		return false;
 	}
 
@@ -5482,7 +5482,7 @@ static bool g4x_digital_port_connected(struct intel_encoder *encoder)
 		bit = PORTD_HOTPLUG_LIVE_STATUS_G4X;
 		break;
 	default:
-		MISSING_CASE(encoder->hpd_pin);
+		i915_MISSING_CASE(dev_priv, encoder->hpd_pin);
 		return false;
 	}
 
@@ -5505,7 +5505,7 @@ static bool gm45_digital_port_connected(struct intel_encoder *encoder)
 		bit = PORTD_HOTPLUG_LIVE_STATUS_GM45;
 		break;
 	default:
-		MISSING_CASE(encoder->hpd_pin);
+		i915_MISSING_CASE(dev_priv, encoder->hpd_pin);
 		return false;
 	}
 
@@ -5568,7 +5568,7 @@ static bool bxt_digital_port_connected(struct intel_encoder *encoder)
 		bit = BXT_DE_PORT_HP_DDIC;
 		break;
 	default:
-		MISSING_CASE(encoder->hpd_pin);
+		i915_MISSING_CASE(dev_priv, encoder->hpd_pin);
 		return false;
 	}
 
@@ -5595,7 +5595,7 @@ static bool icp_digital_port_connected(struct intel_encoder *encoder)
 	else if (intel_phy_is_tc(dev_priv, phy))
 		return intel_tc_port_connected(dig_port);
 	else
-		MISSING_CASE(encoder->hpd_pin);
+		i915_MISSING_CASE(dev_priv, encoder->hpd_pin);
 
 	return false;
 }
@@ -5637,7 +5637,7 @@ static bool __intel_digital_port_connected(struct intel_encoder *encoder)
 	else if (IS_GEN(dev_priv, 5))
 		return ilk_digital_port_connected(encoder);
 
-	MISSING_CASE(INTEL_GEN(dev_priv));
+	i915_MISSING_CASE(dev_priv, INTEL_GEN(dev_priv));
 	return false;
 }
 
@@ -7090,7 +7090,7 @@ intel_dp_init_panel_power_sequencer_registers(struct intel_dp *intel_dp,
 			port_sel = PANEL_PORT_SELECT_DPD;
 			break;
 		default:
-			MISSING_CASE(port);
+			i915_MISSING_CASE(dev_priv, port);
 			break;
 		}
 	}
-- 
2.23.0



More information about the dri-devel mailing list