[Intel-gfx][PATCH 09/10] drm/i915/gt: Make MISSING_CASE backtrace i915 specific

Pankaj Bharadiya pankaj.laxminarayan.bharadiya at intel.com
Tue Feb 25 13:47:08 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/gt/intel_workarounds.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 887e0dc701f7..8a80a132f0fe 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -635,7 +635,7 @@ __intel_engine_init_ctx_wa(struct intel_engine_cs *engine,
 	else if (INTEL_GEN(i915) < 8)
 		return;
 	else
-		MISSING_CASE(INTEL_GEN(i915));
+		i915_MISSING_CASE(i915, INTEL_GEN(i915));
 
 	wa_init_finish(wal);
 }
@@ -965,7 +965,7 @@ gt_init_workarounds(struct drm_i915_private *i915, struct i915_wa_list *wal)
 	else if (INTEL_GEN(i915) <= 8)
 		return;
 	else
-		MISSING_CASE(INTEL_GEN(i915));
+		i915_MISSING_CASE(i915, INTEL_GEN(i915));
 }
 
 void intel_gt_init_workarounds(struct drm_i915_private *i915)
@@ -1296,7 +1296,7 @@ void intel_engine_init_whitelist(struct intel_engine_cs *engine)
 	else if (INTEL_GEN(i915) <= 8)
 		return;
 	else
-		MISSING_CASE(INTEL_GEN(i915));
+		i915_MISSING_CASE(i915, INTEL_GEN(i915));
 
 	wa_init_finish(w);
 }
-- 
2.23.0



More information about the dri-devel mailing list