dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
To: jani.nikula@linux.intel.com, daniel@ffwll.ch,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"José Roberto de Souza" <jose.souza@intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Imre Deak" <imre.deak@intel.com>
Cc: pankaj.laxminarayan.bharadiya@intel.com
Subject: [Intel-gfx][PATCH 03/10] drm/i915/display/ddi: Make MISSING_CASE backtrace i915 specific
Date: Tue, 25 Feb 2020 19:17:02 +0530	[thread overview]
Message-ID: <20200225134709.6153-4-pankaj.laxminarayan.bharadiya@intel.com> (raw)
In-Reply-To: <20200225134709.6153-1-pankaj.laxminarayan.bharadiya@intel.com>

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@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 9f7d1d7189ae..e060c5e2fbb1 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -873,7 +873,7 @@ cnl_get_buf_trans_hdmi(struct drm_i915_private *dev_priv, int *n_entries)
 		return cnl_ddi_translations_hdmi_1_05V;
 	} else {
 		*n_entries = 1; /* shut up gcc */
-		MISSING_CASE(voltage);
+		i915_MISSING_CASE(dev_priv, voltage);
 	}
 	return NULL;
 }
@@ -894,7 +894,7 @@ cnl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries)
 		return cnl_ddi_translations_dp_1_05V;
 	} else {
 		*n_entries = 1; /* shut up gcc */
-		MISSING_CASE(voltage);
+		i915_MISSING_CASE(dev_priv, voltage);
 	}
 	return NULL;
 }
@@ -916,7 +916,7 @@ cnl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
 			return cnl_ddi_translations_edp_1_05V;
 		} else {
 			*n_entries = 1; /* shut up gcc */
-			MISSING_CASE(voltage);
+			i915_MISSING_CASE(dev_priv, voltage);
 		}
 		return NULL;
 	} else {
@@ -1360,7 +1360,7 @@ static int hsw_ddi_calc_wrpll_link(struct drm_i915_private *dev_priv,
 		refclk = 2700;
 		break;
 	default:
-		MISSING_CASE(wrpll);
+		i915_MISSING_CASE(dev_priv, wrpll);
 		return 0;
 	}
 
@@ -1500,7 +1500,7 @@ static int icl_calc_tbt_pll_link(struct drm_i915_private *dev_priv,
 	case DDI_CLK_SEL_TBT_810:
 		return 810000;
 	default:
-		MISSING_CASE(val);
+		i915_MISSING_CASE(dev_priv, val);
 		return 0;
 	}
 }
@@ -1553,7 +1553,7 @@ static int icl_calc_mg_pll_link(struct drm_i915_private *dev_priv,
 		div1 = 7;
 		break;
 	default:
-		MISSING_CASE(pll_state->mg_clktop2_hsclkctl);
+		i915_MISSING_CASE(dev_priv, pll_state->mg_clktop2_hsclkctl);
 		return 0;
 	}
 
@@ -1841,7 +1841,7 @@ void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state,
 		temp |= DP_MSA_MISC_12_BPC;
 		break;
 	default:
-		MISSING_CASE(crtc_state->pipe_bpp);
+		i915_MISSING_CASE(dev_priv, crtc_state->pipe_bpp);
 		break;
 	}
 
@@ -2156,7 +2156,8 @@ static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder,
 
 		switch (tmp & TRANS_DDI_EDP_INPUT_MASK) {
 		default:
-			MISSING_CASE(tmp & TRANS_DDI_EDP_INPUT_MASK);
+			i915_MISSING_CASE(dev_priv,
+					  tmp & TRANS_DDI_EDP_INPUT_MASK);
 			/* fallthrough */
 		case TRANS_DDI_EDP_INPUT_A_ON:
 		case TRANS_DDI_EDP_INPUT_A_ONOFF:
@@ -3334,7 +3335,7 @@ icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port,
 		}
 		break;
 	default:
-		MISSING_CASE(pin_assignment);
+		i915_MISSING_CASE(dev_priv, pin_assignment);
 	}
 
 	if (INTEL_GEN(dev_priv) >= 12) {
-- 
2.23.0

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

  parent reply	other threads:[~2020-02-25 13:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 13:46 [Intel-gfx][PATCH 00/10] drm/i915: Introduce i915 based i915_MISSING_CASE macro and us it in i915 Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 01/10] drm/i915: Add i915 device based MISSING_CASE macro Pankaj Bharadiya
2020-02-25 14:01   ` Chris Wilson
2020-02-27  6:33     ` Laxminarayan Bharadiya, Pankaj
2020-02-27  8:29       ` Jani Nikula
2020-02-28  5:02         ` Laxminarayan Bharadiya, Pankaj
2020-02-25 13:47 ` [Intel-gfx][PATCH 02/10] drm/i915/display/cdclk: Make MISSING_CASE backtrace i915 specific Pankaj Bharadiya
2020-02-25 13:47 ` Pankaj Bharadiya [this message]
2020-02-25 13:47 ` [Intel-gfx][PATCH 04/10] drm/i915/display/display: " Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 05/10] drm/i915/dp: " Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 06/10] drm/i915/display/hdmi: " Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 07/10] drm/i915/display: " Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 08/10] drm/i915/gem: " Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 09/10] drm/i915/gt: " Pankaj Bharadiya
2020-02-25 13:47 ` [Intel-gfx][PATCH 10/10] drm/i915: " Pankaj Bharadiya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200225134709.6153-4-pankaj.laxminarayan.bharadiya@intel.com \
    --to=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=jose.souza@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).