Skip to contentSkip to conversation

i915: Simplify mmio handling & add new DG2 shadow table

PATCH Superseded Matt Roper 3 participants 17 messages Sep 10, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Matt Roper

author
#0 lore raw

cover i915: Simplify mmio handling & add new DG2 shadow table

Our uncore MMIO functions for reading/writing registers have become very complicated over time. There's significant macro magic used to generate several nearly-identical functions that only really differ in terms of which platform-specific shadow register table they should check on write operations. We can significantly simplify our MMIO handlers by storing a reference to the current platform's shadow table within the 'struct intel_uncore' the same way we already do for forcewake; this allows us to consolidate the multiple variants of each 'write' function down to just a single 'fwtable' version that gets the shadow table out of the uncore struct rather than hardcoding the name of a specific platform's table. We can do similar consolidation on the MMIO read side by creating a single-entry forcewake table to replace the open-coded range check they had been using previously.

The final patch of the series adds a new shadow table for DG2; this becomes quite clean and simple now, given the refactoring in the first five patches.

Matt Roper (6):
drm/i915/uncore: Convert gen6/gen7 read operations to fwtable drm/i915/uncore: Associate shadow table with uncore drm/i915/uncore: Replace gen8 write functions with general fwtable drm/i915/uncore: Drop gen11/gen12 mmio write handlers drm/i915/uncore: Drop gen11 mmio read handlers drm/i915/dg2: Add DG2-specific shadow register table

 drivers/gpu/drm/i915/intel_uncore.c           | 190 ++++++++++--------
 drivers/gpu/drm/i915/intel_uncore.h           |   7 +
 drivers/gpu/drm/i915/selftests/intel_uncore.c |   1 +
 3 files changed, 110 insertions(+), 88 deletions(-)
Signature · 1 line
2.25.4
author
#1 lore raw

PATCH 1/6 drm/i915/uncore: Convert gen6/gen7 read operations to fwtable

On gen6-gen8 (except vlv/chv) we don't use a forcewake lookup table; we simply check whether the register offset is < 0x40000, and return FORCEWAKE_RENDER if it is. To prepare for upcoming refactoring, let's define a single-entry forcewake table from [0x0, 0x3ffff] and switch these platforms over to use the fwtable reader functions.

---
 drivers/gpu/drm/i915/intel_uncore.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +8 -3
index f9767054dbdf..7f92f12d95f2 100644
@@ -1064,6 +1064,10 @@ gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
 	__fwd; \
 })
 
+static const struct intel_forcewake_range __gen6_fw_ranges[] = {
+	GEN_FW_RANGE(0x0, 0x3ffff, FORCEWAKE_RENDER),
+};
+
 /* *Must* be sorted by offset ranges! See intel_fw_table_check(). */
 static const struct intel_forcewake_range __chv_fw_ranges[] = {
 	GEN_FW_RANGE(0x2000, 0x3fff, FORCEWAKE_RENDER),
@@ -1623,7 +1627,6 @@ __gen_read(func, 64)
 
 __gen_reg_read_funcs(gen11_fwtable);
 __gen_reg_read_funcs(fwtable);
-__gen_reg_read_funcs(gen6);
 
 #undef __gen_reg_read_funcs
 #undef GEN6_READ_FOOTER
@@ -2111,15 +2114,17 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (GRAPHICS_VER(i915) == 8) {
+		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen6_fw_ranges);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen8);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen6);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (IS_VALLEYVIEW(i915)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __vlv_fw_ranges);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (IS_GRAPHICS_VER(i915, 6, 7)) {
+		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen6_fw_ranges);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen6);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	}
 
 	uncore->pmic_bus_access_nb.notifier_call = i915_pmic_bus_access_notifier;
Signature · 1 line
2.25.4
#2 lore raw

Re: [Intel-gfx] [PATCH 1/6] drm/i915/uncore: Convert gen6/gen7 read operations to fwtable

Quoted 16 lines · Matt Roper

On gen6-gen8 (except vlv/chv) we don't use a forcewake lookup table; we simply check whether the register offset is < 0x40000, and return FORCEWAKE_RENDER if it is. To prepare for upcoming refactoring, let's define a single-entry forcewake table from [0x0, 0x3ffff] and switch these platforms over to use the fwtable reader functions.

---
  drivers/gpu/drm/i915/intel_uncore.c | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +0 -0
index f9767054dbdf..7f92f12d95f2 100644

drivers/gpu/drm/i915/intel_uncore.c gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) · line 1066

Quoted 3 lines
drivers/gpu/drm/i915/intel_uncore.c +0 -0
@@ -1064,6 +1064,10 @@ gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
  	__fwd; \
  })
 

Is __gen6_reg_read_fw_domains left orphaned somewhere around here or in a later patch?

Regards,

Tvrtko

Quoted 36 lines
drivers/gpu/drm/i915/intel_uncore.c +8 -3
+static const struct intel_forcewake_range __gen6_fw_ranges[] = {
+	GEN_FW_RANGE(0x0, 0x3ffff, FORCEWAKE_RENDER),
+};
+
  /* *Must* be sorted by offset ranges! See intel_fw_table_check(). */
  static const struct intel_forcewake_range __chv_fw_ranges[] = {
  	GEN_FW_RANGE(0x2000, 0x3fff, FORCEWAKE_RENDER),
@@ -1623,7 +1627,6 @@ __gen_read(func, 64)
 
  __gen_reg_read_funcs(gen11_fwtable);
  __gen_reg_read_funcs(fwtable);
-__gen_reg_read_funcs(gen6);
 
  #undef __gen_reg_read_funcs
  #undef GEN6_READ_FOOTER
@@ -2111,15 +2114,17 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
  		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (GRAPHICS_VER(i915) == 8) {
+		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen6_fw_ranges);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen8);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen6);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (IS_VALLEYVIEW(i915)) {
  		ASSIGN_FW_DOMAINS_TABLE(uncore, __vlv_fw_ranges);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6);
  		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (IS_GRAPHICS_VER(i915, 6, 7)) {
+		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen6_fw_ranges);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen6);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	}
 
  	uncore->pmic_bus_access_nb.notifier_call = i915_pmic_bus_access_notifier;
author
#3 lore raw

PATCH 2/6 drm/i915/uncore: Associate shadow table with uncore

In reply to Matt Roper

Store a reference to a platform's shadow table inside the uncore, the same as we do with the forcewake table. This will allow us to use a single set of functions that operate on the shadow table reference rather than generating lots of nearly-identical functions via macros that differ only in terms of the table that they reference.

---
 drivers/gpu/drm/i915/intel_uncore.c | 40 ++++++++++++++++++++---------
 drivers/gpu/drm/i915/intel_uncore.h |  7 +++++
 2 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +28 -12
index 7f92f12d95f2..159880e3e77d 100644
@@ -1036,17 +1036,19 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)
 		return 0;
 }
 
-#define __is_X_shadowed(x) \
-static bool is_##x##_shadowed(u32 offset) \
-{ \
-	const struct i915_range *regs = x##_shadowed_regs; \
-	return BSEARCH(offset, regs, ARRAY_SIZE(x##_shadowed_regs), \
+static bool
+is_shadowed(struct intel_uncore *uncore, u32 offset)
+{
+	if (drm_WARN_ON(&uncore->i915->drm, !uncore->shadowed_reg_table))
+		return false;
+
+	return BSEARCH(offset,
+		       uncore->shadowed_reg_table,
+		       uncore->shadowed_reg_table_entries,
 		       mmio_range_cmp); \
 }
 
-__is_X_shadowed(gen8)
-__is_X_shadowed(gen11)
-__is_X_shadowed(gen12)
+
 
 static enum forcewake_domains
 gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
@@ -1057,7 +1059,7 @@ gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
 #define __gen8_reg_write_fw_domains(uncore, offset) \
 ({ \
 	enum forcewake_domains __fwd; \
-	if (NEEDS_FORCE_WAKE(offset) && !is_gen8_shadowed(offset)) \
+	if (NEEDS_FORCE_WAKE(offset) && !is_shadowed(uncore, offset)) \
 		__fwd = FORCEWAKE_RENDER; \
 	else \
 		__fwd = 0; \
@@ -1091,7 +1093,7 @@ static const struct intel_forcewake_range __chv_fw_ranges[] = {
 #define __fwtable_reg_write_fw_domains(uncore, offset) \
 ({ \
 	enum forcewake_domains __fwd = 0; \
-	if (NEEDS_FORCE_WAKE((offset)) && !is_gen8_shadowed(offset)) \
+	if (NEEDS_FORCE_WAKE((offset)) && !is_shadowed(uncore, offset)) \
 		__fwd = find_fw_domain(uncore, offset); \
 	__fwd; \
 })
@@ -1100,7 +1102,7 @@ static const struct intel_forcewake_range __chv_fw_ranges[] = {
 ({ \
 	enum forcewake_domains __fwd = 0; \
 	const u32 __offset = (offset); \
-	if (!is_gen11_shadowed(__offset)) \
+	if (!is_shadowed(uncore, __offset)) \
 		__fwd = find_fw_domain(uncore, __offset); \
 	__fwd; \
 })
@@ -1109,7 +1111,7 @@ static const struct intel_forcewake_range __chv_fw_ranges[] = {
 ({ \
 	enum forcewake_domains __fwd = 0; \
 	const u32 __offset = (offset); \
-	if (!is_gen12_shadowed(__offset)) \
+	if (!is_shadowed(uncore, __offset)) \
 		__fwd = find_fw_domain(uncore, __offset); \
 	__fwd; \
 })
@@ -1715,6 +1717,7 @@ __gen_write(func, 8) \
 __gen_write(func, 16) \
 __gen_write(func, 32)
 
+
 __gen_reg_write_funcs(gen12_fwtable);
 __gen_reg_write_funcs(gen11_fwtable);
 __gen_reg_write_funcs(fwtable);
@@ -1979,6 +1982,12 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)
 	(uncore)->fw_domains_table_entries = ARRAY_SIZE((d)); \
 }
 
+#define ASSIGN_SHADOW_TABLE(uncore, d) \
+{ \
+	(uncore)->shadowed_reg_table = d; \
+	(uncore)->shadowed_reg_table_entries = ARRAY_SIZE((d)); \
+}
+
 static int i915_pmic_bus_access_notifier(struct notifier_block *nb,
 					 unsigned long action, void *data)
 {
@@ -2091,30 +2100,37 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
 
 	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __dg2_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __xehp_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (GRAPHICS_VER(i915) >= 12) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen12_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (GRAPHICS_VER(i915) == 11) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen11_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen11_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen11_fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (IS_GRAPHICS_VER(i915, 9, 10)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen9_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen8_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (IS_CHERRYVIEW(i915)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __chv_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen8_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (GRAPHICS_VER(i915) == 8) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen6_fw_ranges);
+		ASSIGN_SHADOW_TABLE(uncore, gen8_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen8);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (IS_VALLEYVIEW(i915)) {
drivers/gpu/drm/i915/intel_uncore.h +7 -0
index 531665b08039..2f31c50eeae2 100644
@@ -142,6 +142,13 @@ struct intel_uncore {
 	const struct intel_forcewake_range *fw_domains_table;
 	unsigned int fw_domains_table_entries;
 
+	/*
+	 * Shadowed registers are special cases where we can safely write
+	 * to the register *without* grabbing forcewake.
+	 */
+	const struct i915_range *shadowed_reg_table;
+	unsigned int shadowed_reg_table_entries;
+
 	struct notifier_block pmic_bus_access_nb;
 	struct intel_uncore_funcs funcs;
 
Signature · 1 line
2.25.4
author
#4 lore raw

PATCH 3/6 drm/i915/uncore: Replace gen8 write functions with general fwtable

In reply to Matt Roper

Now that we have both a standard forcewake table (albeit a single-entry table) and the shadow table stored in the uncore, we can drop the gen8-specific write handlers in favor of the general fwtable version.

---
 drivers/gpu/drm/i915/intel_uncore.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +1 -12
index 159880e3e77d..80533cf24fe8 100644
@@ -1056,16 +1056,6 @@ gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
 	return FORCEWAKE_RENDER;
 }
 
-#define __gen8_reg_write_fw_domains(uncore, offset) \
-({ \
-	enum forcewake_domains __fwd; \
-	if (NEEDS_FORCE_WAKE(offset) && !is_shadowed(uncore, offset)) \
-		__fwd = FORCEWAKE_RENDER; \
-	else \
-		__fwd = 0; \
-	__fwd; \
-})
-
 static const struct intel_forcewake_range __gen6_fw_ranges[] = {
 	GEN_FW_RANGE(0x0, 0x3ffff, FORCEWAKE_RENDER),
 };
@@ -1721,7 +1711,6 @@ __gen_write(func, 32)
 __gen_reg_write_funcs(gen12_fwtable);
 __gen_reg_write_funcs(gen11_fwtable);
 __gen_reg_write_funcs(fwtable);
-__gen_reg_write_funcs(gen8);
 
 #undef __gen_reg_write_funcs
 #undef GEN6_WRITE_FOOTER
@@ -2131,7 +2120,7 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
 	} else if (GRAPHICS_VER(i915) == 8) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen6_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen8_shadowed_regs);
-		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen8);
+		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (IS_VALLEYVIEW(i915)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __vlv_fw_ranges);
Signature · 1 line
2.25.4
author
#5 lore raw

PATCH 4/6 drm/i915/uncore: Drop gen11/gen12 mmio write handlers

In reply to Matt Roper

Now that the reference to the shadow table is stored within the uncore, we don't need to generate separate fwtable, gen11_fwtable, and gen12_fwtable variants of the register write functions; a single 'fwtable' implementation will work for all of those platforms now.

Note that while consolidating down to __fwtable_reg_write_fw_domains() we drop the NEEDS_FORCE_WAKE() check. If an MMIO offset is outside that range on older platforms, it also won't be part of a range in the forcewake table, so a '0' will be returned anyway.

---
 drivers/gpu/drm/i915/intel_uncore.c | 54 +++++++++--------------------
 1 file changed, 16 insertions(+), 38 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +16 -38
index 80533cf24fe8..c181e74fbf43 100644
@@ -1081,23 +1081,6 @@ static const struct intel_forcewake_range __chv_fw_ranges[] = {
 };
 
 #define __fwtable_reg_write_fw_domains(uncore, offset) \
-({ \
-	enum forcewake_domains __fwd = 0; \
-	if (NEEDS_FORCE_WAKE((offset)) && !is_shadowed(uncore, offset)) \
-		__fwd = find_fw_domain(uncore, offset); \
-	__fwd; \
-})
-
-#define __gen11_fwtable_reg_write_fw_domains(uncore, offset) \
-({ \
-	enum forcewake_domains __fwd = 0; \
-	const u32 __offset = (offset); \
-	if (!is_shadowed(uncore, __offset)) \
-		__fwd = find_fw_domain(uncore, __offset); \
-	__fwd; \
-})
-
-#define __gen12_fwtable_reg_write_fw_domains(uncore, offset) \
 ({ \
 	enum forcewake_domains __fwd = 0; \
 	const u32 __offset = (offset); \
@@ -1685,34 +1668,29 @@ __gen6_write(8)
 __gen6_write(16)
 __gen6_write(32)
 
-#define __gen_write(func, x) \
+#define __gen_fwtable_write(x) \
 static void \
-func##_write##x(struct intel_uncore *uncore, i915_reg_t reg, u##x val, bool trace) { \
+fwtable_write##x(struct intel_uncore *uncore, i915_reg_t reg, u##x val, bool trace) { \
 	enum forcewake_domains fw_engine; \
 	GEN6_WRITE_HEADER; \
-	fw_engine = __##func##_reg_write_fw_domains(uncore, offset); \
+	fw_engine = __fwtable_reg_write_fw_domains(uncore, offset); \
 	if (fw_engine) \
 		__force_wake_auto(uncore, fw_engine); \
 	__raw_uncore_write##x(uncore, reg, val); \
 	GEN6_WRITE_FOOTER; \
 }
 
-#define __gen_reg_write_funcs(func) \
-static enum forcewake_domains \
-func##_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) { \
-	return __##func##_reg_write_fw_domains(uncore, i915_mmio_reg_offset(reg)); \
-} \
-\
-__gen_write(func, 8) \
-__gen_write(func, 16) \
-__gen_write(func, 32)
-
+static enum forcewake_domains
+fwtable_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
+{
+	return __fwtable_reg_write_fw_domains(uncore, i915_mmio_reg_offset(reg));
+}
 
-__gen_reg_write_funcs(gen12_fwtable);
-__gen_reg_write_funcs(gen11_fwtable);
-__gen_reg_write_funcs(fwtable);
+__gen_fwtable_write(8)
+__gen_fwtable_write(16)
+__gen_fwtable_write(32)
 
-#undef __gen_reg_write_funcs
+#undef __gen_fwtable_write
 #undef GEN6_WRITE_FOOTER
 #undef GEN6_WRITE_HEADER
 
@@ -2090,22 +2068,22 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
 	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __dg2_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
-		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable);
+		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __xehp_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
-		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable);
+		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (GRAPHICS_VER(i915) >= 12) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen12_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
-		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable);
+		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (GRAPHICS_VER(i915) == 11) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen11_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen11_shadowed_regs);
-		ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
 	} else if (IS_GRAPHICS_VER(i915, 9, 10)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen9_fw_ranges);
Signature · 1 line
2.25.4
author
#6 lore raw

PATCH 5/6 drm/i915/uncore: Drop gen11 mmio read handlers

In reply to Matt Roper

Consolidate down to just a single 'fwtable' implementation. For reads we don't need to worry about shadow tables. Also, the NEEDS_FORCE_WAKE() check we previously had in the fwtable implementation can be dropped --- if a register is outside that range on one of the old platforms, then it won't belong to any forcewake range and 0 will be returned anyway.

---
 drivers/gpu/drm/i915/intel_uncore.c | 45 +++++++++++------------------
 1 file changed, 17 insertions(+), 28 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +17 -28
index c181e74fbf43..95398cb69722 100644
@@ -935,14 +935,6 @@ static const struct intel_forcewake_range __vlv_fw_ranges[] = {
 };
 
 #define __fwtable_reg_read_fw_domains(uncore, offset) \
-({ \
-	enum forcewake_domains __fwd = 0; \
-	if (NEEDS_FORCE_WAKE((offset))) \
-		__fwd = find_fw_domain(uncore, offset); \
-	__fwd; \
-})
-
-#define __gen11_fwtable_reg_read_fw_domains(uncore, offset) \
 	find_fw_domain(uncore, offset)
 
 /* *Must* be sorted by offset! See intel_shadow_table_check(). */
@@ -1577,33 +1569,30 @@ static inline void __force_wake_auto(struct intel_uncore *uncore,
 		___force_wake_auto(uncore, fw_domains);
 }
 
-#define __gen_read(func, x) \
+#define __gen_fwtable_read(x) \
 static u##x \
-func##_read##x(struct intel_uncore *uncore, i915_reg_t reg, bool trace) { \
+fwtable_read##x(struct intel_uncore *uncore, i915_reg_t reg, bool trace) \
+{ \
 	enum forcewake_domains fw_engine; \
 	GEN6_READ_HEADER(x); \
-	fw_engine = __##func##_reg_read_fw_domains(uncore, offset); \
+	fw_engine = __fwtable_reg_read_fw_domains(uncore, offset); \
 	if (fw_engine) \
 		__force_wake_auto(uncore, fw_engine); \
 	val = __raw_uncore_read##x(uncore, reg); \
 	GEN6_READ_FOOTER; \
 }
 
-#define __gen_reg_read_funcs(func) \
-static enum forcewake_domains \
-func##_reg_read_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) { \
-	return __##func##_reg_read_fw_domains(uncore, i915_mmio_reg_offset(reg)); \
-} \
-\
-__gen_read(func, 8) \
-__gen_read(func, 16) \
-__gen_read(func, 32) \
-__gen_read(func, 64)
+static enum forcewake_domains
+fwtable_reg_read_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) {
+	return __fwtable_reg_read_fw_domains(uncore, i915_mmio_reg_offset(reg));
+}
 
-__gen_reg_read_funcs(gen11_fwtable);
-__gen_reg_read_funcs(fwtable);
+__gen_fwtable_read(8)
+__gen_fwtable_read(16)
+__gen_fwtable_read(32)
+__gen_fwtable_read(64)
 
-#undef __gen_reg_read_funcs
+#undef __gen_fwtable_read
 #undef GEN6_READ_FOOTER
 #undef GEN6_READ_HEADER
 
@@ -2069,22 +2058,22 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __dg2_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __xehp_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (GRAPHICS_VER(i915) >= 12) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen12_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (GRAPHICS_VER(i915) == 11) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen11_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen11_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (IS_GRAPHICS_VER(i915, 9, 10)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen9_fw_ranges);
 		ASSIGN_SHADOW_TABLE(uncore, gen8_shadowed_regs);
Signature · 1 line
2.25.4
#7 lore raw

Re: [Intel-gfx] [PATCH 5/6] drm/i915/uncore: Drop gen11 mmio read handlers

Quoted 19 lines · Matt Roper

Consolidate down to just a single 'fwtable' implementation. For reads we don't need to worry about shadow tables. Also, the NEEDS_FORCE_WAKE() check we previously had in the fwtable implementation can be dropped --- if a register is outside that range on one of the old platforms, then it won't belong to any forcewake range and 0 will be returned anyway.

---
  drivers/gpu/drm/i915/intel_uncore.c | 45 +++++++++++------------------
  1 file changed, 17 insertions(+), 28 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +0 -0
index c181e74fbf43..95398cb69722 100644
@@ -935,14 +935,6 @@ static const struct intel_forcewake_range __vlv_fw_ranges[] = {
  };
 

drivers/gpu/drm/i915/intel_uncore.c static const struct intel_forcewake_range __vlv_fw_ranges[] = { · line 938

Quoted 10 lines
drivers/gpu/drm/i915/intel_uncore.c +0 -8
  #define __fwtable_reg_read_fw_domains(uncore, offset) \
-({ \
-	enum forcewake_domains __fwd = 0; \
-	if (NEEDS_FORCE_WAKE((offset))) \
-		__fwd = find_fw_domain(uncore, offset); \
-	__fwd; \
-})
-
-#define __gen11_fwtable_reg_read_fw_domains(uncore, offset) \
  	find_fw_domain(uncore, offset)

Looks like you can drop this macro and just call find_fw_domain or you think there is value to keep it?

Regards,

Tvrtko

Quoted 77 lines
drivers/gpu/drm/i915/intel_uncore.c +17 -20
  /* *Must* be sorted by offset! See intel_shadow_table_check(). */
@@ -1577,33 +1569,30 @@ static inline void __force_wake_auto(struct intel_uncore *uncore,
  		___force_wake_auto(uncore, fw_domains);
  }
 
-#define __gen_read(func, x) \
+#define __gen_fwtable_read(x) \
  static u##x \
-func##_read##x(struct intel_uncore *uncore, i915_reg_t reg, bool trace) { \
+fwtable_read##x(struct intel_uncore *uncore, i915_reg_t reg, bool trace) \
+{ \
  	enum forcewake_domains fw_engine; \
  	GEN6_READ_HEADER(x); \
-	fw_engine = __##func##_reg_read_fw_domains(uncore, offset); \
+	fw_engine = __fwtable_reg_read_fw_domains(uncore, offset); \
  	if (fw_engine) \
  		__force_wake_auto(uncore, fw_engine); \
  	val = __raw_uncore_read##x(uncore, reg); \
  	GEN6_READ_FOOTER; \
  }
 
-#define __gen_reg_read_funcs(func) \
-static enum forcewake_domains \
-func##_reg_read_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) { \
-	return __##func##_reg_read_fw_domains(uncore, i915_mmio_reg_offset(reg)); \
-} \
-\
-__gen_read(func, 8) \
-__gen_read(func, 16) \
-__gen_read(func, 32) \
-__gen_read(func, 64)
+static enum forcewake_domains
+fwtable_reg_read_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) {
+	return __fwtable_reg_read_fw_domains(uncore, i915_mmio_reg_offset(reg));
+}
 
-__gen_reg_read_funcs(gen11_fwtable);
-__gen_reg_read_funcs(fwtable);
+__gen_fwtable_read(8)
+__gen_fwtable_read(16)
+__gen_fwtable_read(32)
+__gen_fwtable_read(64)
 
-#undef __gen_reg_read_funcs
+#undef __gen_fwtable_read
  #undef GEN6_READ_FOOTER
  #undef GEN6_READ_HEADER
 
@@ -2069,22 +2058,22 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
  		ASSIGN_FW_DOMAINS_TABLE(uncore, __dg2_fw_ranges);
  		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
  		ASSIGN_FW_DOMAINS_TABLE(uncore, __xehp_fw_ranges);
  		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (GRAPHICS_VER(i915) >= 12) {
  		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen12_fw_ranges);
  		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (GRAPHICS_VER(i915) == 11) {
  		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen11_fw_ranges);
  		ASSIGN_SHADOW_TABLE(uncore, gen11_shadowed_regs);
  		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
-		ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable);
+		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
  	} else if (IS_GRAPHICS_VER(i915, 9, 10)) {
  		ASSIGN_FW_DOMAINS_TABLE(uncore, __gen9_fw_ranges);
  		ASSIGN_SHADOW_TABLE(uncore, gen8_shadowed_regs);
author
#8 lore raw

PATCH 6/6 drm/i915/dg2: Add DG2-specific shadow register table

In reply to Matt Roper

We thought the DG2 table of shadowed registers would be the same as the gen12/xehp table, but it turns out that there are a few minor differences that require us to define a new DG2-specific table:
* One register is removed (0xC4D4)
* One register is added (0xC4E0)

---
 drivers/gpu/drm/i915/intel_uncore.c           | 41 ++++++++++++++++++-
 drivers/gpu/drm/i915/selftests/intel_uncore.c |  1 +
 2 files changed, 41 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uncore.c +40 -1
index 95398cb69722..088d9b9d1224 100644
@@ -1018,6 +1018,45 @@ static const struct i915_range gen12_shadowed_regs[] = {
 	{ .start = 0x1F8510, .end = 0x1F8550 },
 };
 
+static const struct i915_range dg2_shadowed_regs[] = {
+	{ .start =   0x2030, .end =   0x2030 },
+	{ .start =   0x2510, .end =   0x2550 },
+	{ .start =   0xA008, .end =   0xA00C },
+	{ .start =   0xA188, .end =   0xA188 },
+	{ .start =   0xA278, .end =   0xA278 },
+	{ .start =   0xA540, .end =   0xA56C },
+	{ .start =   0xC4C8, .end =   0xC4C8 },
+	{ .start =   0xC4E0, .end =   0xC4E0 },
+	{ .start =   0xC600, .end =   0xC600 },
+	{ .start =   0xC658, .end =   0xC658 },
+	{ .start =  0x22030, .end =  0x22030 },
+	{ .start =  0x22510, .end =  0x22550 },
+	{ .start = 0x1C0030, .end = 0x1C0030 },
+	{ .start = 0x1C0510, .end = 0x1C0550 },
+	{ .start = 0x1C4030, .end = 0x1C4030 },
+	{ .start = 0x1C4510, .end = 0x1C4550 },
+	{ .start = 0x1C8030, .end = 0x1C8030 },
+	{ .start = 0x1C8510, .end = 0x1C8550 },
+	{ .start = 0x1D0030, .end = 0x1D0030 },
+	{ .start = 0x1D0510, .end = 0x1D0550 },
+	{ .start = 0x1D4030, .end = 0x1D4030 },
+	{ .start = 0x1D4510, .end = 0x1D4550 },
+	{ .start = 0x1D8030, .end = 0x1D8030 },
+	{ .start = 0x1D8510, .end = 0x1D8550 },
+	{ .start = 0x1E0030, .end = 0x1E0030 },
+	{ .start = 0x1E0510, .end = 0x1E0550 },
+	{ .start = 0x1E4030, .end = 0x1E4030 },
+	{ .start = 0x1E4510, .end = 0x1E4550 },
+	{ .start = 0x1E8030, .end = 0x1E8030 },
+	{ .start = 0x1E8510, .end = 0x1E8550 },
+	{ .start = 0x1F0030, .end = 0x1F0030 },
+	{ .start = 0x1F0510, .end = 0x1F0550 },
+	{ .start = 0x1F4030, .end = 0x1F4030 },
+	{ .start = 0x1F4510, .end = 0x1F4550 },
+	{ .start = 0x1F8030, .end = 0x1F8030 },
+	{ .start = 0x1F8510, .end = 0x1F8550 },
+};
+
 static int mmio_range_cmp(u32 key, const struct i915_range *range)
 {
 	if (key < range->start)
@@ -2056,7 +2095,7 @@ static int uncore_forcewake_init(struct intel_uncore *uncore)
 
 	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55)) {
 		ASSIGN_FW_DOMAINS_TABLE(uncore, __dg2_fw_ranges);
-		ASSIGN_SHADOW_TABLE(uncore, gen12_shadowed_regs);
+		ASSIGN_SHADOW_TABLE(uncore, dg2_shadowed_regs);
 		ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable);
 		ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable);
 	} else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
drivers/gpu/drm/i915/selftests/intel_uncore.c +1 -0
index 22ef2c87df1a..bc8128170a99 100644
@@ -68,6 +68,7 @@ static int intel_shadow_table_check(void)
 		{ gen8_shadowed_regs, ARRAY_SIZE(gen8_shadowed_regs) },
 		{ gen11_shadowed_regs, ARRAY_SIZE(gen11_shadowed_regs) },
 		{ gen12_shadowed_regs, ARRAY_SIZE(gen12_shadowed_regs) },
+		{ dg2_shadowed_regs, ARRAY_SIZE(dg2_shadowed_regs) },
 	};
 	const struct i915_range *range;
 	unsigned int i, j;
Signature · 1 line
2.25.4
#9 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for i915: Simplify mmio handling & add new DG2 shadow table

In reply to Matt Roper
== Series Details ==

== Series Details ==

Series: i915: Simplify mmio handling & add new DG2 shadow table
URL : https://patchwork.freedesktop.org/series/94534/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
9184ecd8873a drm/i915/uncore: Convert gen6/gen7 read operations to fwtable
2d9ea1a952fa drm/i915/uncore: Associate shadow table with uncore
-:42: CHECK:LINE_SPACING: Please don't use multiple blank lines
#42: FILE: drivers/gpu/drm/i915/intel_uncore.c:1051:

+

-:86: CHECK:LINE_SPACING: Please don't use multiple blank lines #86: FILE: drivers/gpu/drm/i915/intel_uncore.c:1720:

+

-:94: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'uncore' - possible side-effects? #94: FILE: drivers/gpu/drm/i915/intel_uncore.c:1985:
+#define ASSIGN_SHADOW_TABLE(uncore, d) \
+{ \
+ (uncore)->shadowed_reg_table = d; \
+ (uncore)->shadowed_reg_table_entries = ARRAY_SIZE((d)); \
+}

-:94: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects? #94: FILE: drivers/gpu/drm/i915/intel_uncore.c:1985:
+#define ASSIGN_SHADOW_TABLE(uncore, d) \
+{ \
+ (uncore)->shadowed_reg_table = d; \
+ (uncore)->shadowed_reg_table_entries = ARRAY_SIZE((d)); \
+}

total: 0 errors, 0 warnings, 4 checks, 128 lines checked
2a61c25b475a drm/i915/uncore: Replace gen8 write functions with general fwtable 60268645b0c1 drm/i915/uncore: Drop gen11/gen12 mmio write handlers bc9eef9ef981 drm/i915/uncore: Drop gen11 mmio read handlers
-:39: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #39: FILE: drivers/gpu/drm/i915/intel_uncore.c:1572:
+#define __gen_fwtable_read(x) \
static u##x \
+fwtable_read##x(struct intel_uncore *uncore, i915_reg_t reg, bool trace) \
+{ \
enum forcewake_domains fw_engine; \
GEN6_READ_HEADER(x); \
+ fw_engine = __fwtable_reg_read_fw_domains(uncore, offset); \
if (fw_engine) \
__force_wake_auto(uncore, fw_engine); \
val = __raw_uncore_read##x(uncore, reg); \
GEN6_READ_FOOTER; \
}

-:64: ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line #64: FILE: drivers/gpu/drm/i915/intel_uncore.c:1585:
+static enum forcewake_domains
+fwtable_reg_read_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) {

total: 2 errors, 0 warnings, 0 checks, 86 lines checked 2c15e729f1d8 drm/i915/dg2: Add DG2-specific shadow register table

#10 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for i915: Simplify mmio handling & add new DG2 shadow table

In reply to Matt Roper
== Series Details ==

== Series Details ==

Series: i915: Simplify mmio handling & add new DG2 shadow table
URL : https://patchwork.freedesktop.org/series/94534/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/gt/intel_reset.c:1392:5: warning: context imbalance in 'intel_gt_reset_trylock' - different lock contexts for basic block
+drivers/gpu/drm/i915/i915_perf.c:1442:15: warning: memset with byte count of 16777216
+drivers/gpu/drm/i915/i915_perf.c:1496:15: warning: memset with byte count of 16777216
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read16' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read32' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read64' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read8' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write16' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write32' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write8' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write16' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write32' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write8' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read16' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read32' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read64' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read8' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen8_write16' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen8_write32' - different lock contexts for basic block
-./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen8_write8' - different lock contexts for basic block
#11 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for i915: Simplify mmio handling & add new DG2 shadow table

In reply to Matt Roper
== Series Details ==

== Series Details ==

Series: i915: Simplify mmio handling & add new DG2 shadow table
URL : https://patchwork.freedesktop.org/series/94534/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10566 -> Patchwork_21010
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/index.html

Known issues
------------

Here are the changes found in Patchwork_21010 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-kbl-7567u: NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-kbl-7567u/igt@amdgpu/[email protected]

* igt@fbdev@write:
- fi-bdw-gvtdvm: NOTRUN -> [SKIP][2] ([fdo#109271]) +5 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-bdw-gvtdvm/igt@[email protected]

* igt@gem_exec_parallel@engines@userptr:
- fi-pnv-d510: [PASS][3] -> [INCOMPLETE][4] ([i915#299])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-pnv-d510/igt@gem_exec_parallel@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-pnv-d510/igt@gem_exec_parallel@[email protected]

* igt@gem_exec_suspend@basic-s0:
- fi-bdw-gvtdvm: NOTRUN -> [INCOMPLETE][5] ([i915#146])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-bdw-gvtdvm/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- fi-kbl-guc: [PASS][6] -> [FAIL][7] ([i915#2203] / [i915#579])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-kbl-guc/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-kbl-guc/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-bsw-kefka: [PASS][8] -> [INCOMPLETE][9] ([i915#2940])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-bsw-kefka/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-bsw-kefka/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_lrc:
- fi-rkl-guc: [PASS][10] -> [DMESG-WARN][11] ([i915#3958])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@late_gt_pm:
- fi-bsw-nick: [PASS][12] -> [DMESG-FAIL][13] ([i915#2927] / [i915#3428])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html

* igt@runner@aborted:
- fi-pnv-d510: NOTRUN -> [FAIL][14] ([i915#2403] / [i915#2722])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-pnv-d510/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [FAIL][15] ([fdo#109271] / [i915#1436] / [i915#3428])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-bsw-kefka/igt@[email protected]
- fi-bsw-nick: NOTRUN -> [FAIL][16] ([fdo#109271] / [i915#1436] / [i915#3428])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-bsw-nick/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@module-reload:
- fi-kbl-7567u: [DMESG-WARN][17] -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-kbl-7567u/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-kbl-7567u/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- {fi-hsw-gt1}: [DMESG-WARN][19] ([i915#3303]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/fi-hsw-gt1/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/fi-hsw-gt1/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#2203]: https://gitlab.freedesktop.org/drm/intel/issues/2203
[i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#2927]: https://gitlab.freedesktop.org/drm/intel/issues/2927
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#299]: https://gitlab.freedesktop.org/drm/intel/issues/299
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
[i915#3958]: https://gitlab.freedesktop.org/drm/intel/issues/3958
[i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579

Participating hosts (44 -> 39)
------------------------------

Additional (1): fi-bdw-gvtdvm
Missing (6): bat-dg1-6 bat-dg1-5 fi-bsw-cyan bat-adlp-4 fi-bdw-samus bat-jsl-1

Build changes
-------------

* Linux: CI_DRM_10566 -> Patchwork_21010

CI-20190529: 20190529
CI_DRM_10566: 8c2d4adb2cd72ea1fae0c95562362319406f6d8e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6203: 64452a46b57ca4ef35eb65a547df8ed1b131e8f0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21010: 2c15e729f1d81620e6c3d8873da217755cee720b @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

2c15e729f1d8 drm/i915/dg2: Add DG2-specific shadow register table bc9eef9ef981 drm/i915/uncore: Drop gen11 mmio read handlers 60268645b0c1 drm/i915/uncore: Drop gen11/gen12 mmio write handlers 2a61c25b475a drm/i915/uncore: Replace gen8 write functions with general fwtable 2d9ea1a952fa drm/i915/uncore: Associate shadow table with uncore 9184ecd8873a drm/i915/uncore: Convert gen6/gen7 read operations to fwtable

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/index.html

#12 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for i915: Simplify mmio handling & add new DG2 shadow table

In reply to Matt Roper
== Series Details ==

== Series Details ==

Series: i915: Simplify mmio handling & add new DG2 shadow table
URL : https://patchwork.freedesktop.org/series/94534/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10566_full -> Patchwork_21010_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_21010_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_21010_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_21010_full:

### IGT changes ###

#### Possible regressions ####

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
- shard-iclb: [PASS][1] -> [SKIP][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-iclb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb2/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_21010_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_persistence@legacy-engines-hostile-preempt:
- shard-snb: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1099]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-snb5/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-kbl: [PASS][4] -> [FAIL][5] ([i915#2846])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-kbl2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl2/igt@[email protected]

* igt@gem_exec_fair@basic-none@vcs0:
- shard-kbl: [PASS][6] -> [FAIL][7] ([i915#2842]) +1 similar issue
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-kbl4/igt@gem_exec_fair@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl2/igt@gem_exec_fair@[email protected]
- shard-apl: [PASS][8] -> [FAIL][9] ([i915#2842])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-apl2/igt@gem_exec_fair@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl8/igt@gem_exec_fair@[email protected]

* igt@gem_exec_suspend@basic-s0:
- shard-tglb: [PASS][10] -> [INCOMPLETE][11] ([i915#456]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-tglb8/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb7/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-big-copy-odd:
- shard-iclb: [PASS][12] -> [FAIL][13] ([i915#2428])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-iclb8/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb6/igt@[email protected]

* igt@gem_pread@exhaustion:
- shard-apl: NOTRUN -> [WARN][14] ([i915#2658])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@[email protected]

* igt@gem_render_copy@y-tiled-to-vebox-yf-tiled:
- shard-skl: NOTRUN -> [SKIP][15] ([fdo#109271]) +9 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl7/igt@[email protected]

* igt@gem_softpin@evict-snoop:
- shard-tglb: NOTRUN -> [SKIP][16] ([fdo#109312])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@gem_userptr_blits@dmabuf-sync:
- shard-apl: NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#3323])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@[email protected]

* igt@gem_userptr_blits@input-checking:
- shard-apl: NOTRUN -> [DMESG-WARN][18] ([i915#3002])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@[email protected]

* igt@gem_userptr_blits@vma-merge:
- shard-skl: NOTRUN -> [FAIL][19] ([i915#3318])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl7/igt@[email protected]

* igt@gen3_mixed_blits:
- shard-kbl: NOTRUN -> [SKIP][20] ([fdo#109271]) +57 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl2/igt@gen3_mixed_blits.html

* igt@gen7_exec_parse@basic-offset:
- shard-tglb: NOTRUN -> [SKIP][21] ([fdo#109289])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@gen9_exec_parse@bb-start-cmd:
- shard-tglb: NOTRUN -> [SKIP][22] ([i915#2856]) +1 similar issue
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][23] -> [FAIL][24] ([i915#454])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-iclb7/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb6/igt@[email protected]

* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
- shard-apl: NOTRUN -> [SKIP][25] ([fdo#109271] / [i915#1937])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@i915_pm_lpsp@[email protected]

* igt@i915_pm_rpm@dpms-non-lpsp:
- shard-tglb: NOTRUN -> [SKIP][26] ([fdo#111644] / [i915#1397] / [i915#2411])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp-stress:
- shard-apl: NOTRUN -> [SKIP][27] ([fdo#109271]) +293 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@[email protected]

* igt@i915_query@query-topology-unsupported:
- shard-tglb: NOTRUN -> [SKIP][28] ([fdo#109302])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@i915_selftest@live@gt_lrc:
- shard-tglb: NOTRUN -> [DMESG-FAIL][29] ([i915#2373])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@gt_pm:
- shard-tglb: NOTRUN -> [DMESG-FAIL][30] ([i915#1759] / [i915#2291])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@i915_selftest@live@gt_pm.html

* igt@kms_big_fb@linear-8bpp-rotate-90:
- shard-tglb: NOTRUN -> [SKIP][31] ([fdo#111614])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-apl: NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#3777]) +1 similar issue
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl3/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip:
- shard-tglb: NOTRUN -> [SKIP][33] ([fdo#111615])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][34] ([i915#3689] / [i915#3886]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
- shard-kbl: NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3886]) +4 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl2/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-a-random-ccs-data-yf_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][36] ([i915#3689]) +3 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@kms_ccs@pipe-a-random-ccs-data-yf_tiled_ccs.html

* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][37] ([fdo#109271] / [i915#3886]) +11 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs.html

* igt@kms_cdclk@mode-transition:
- shard-tglb: NOTRUN -> [SKIP][38] ([i915#3742])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@kms_chamelium@hdmi-aspect-ratio:
- shard-tglb: NOTRUN -> [SKIP][39] ([fdo#109284] / [fdo#111827]) +4 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@kms_chamelium@hdmi-edid-change-during-suspend:
- shard-apl: NOTRUN -> [SKIP][40] ([fdo#109271] / [fdo#111827]) +22 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl2/igt@[email protected]

* igt@kms_chamelium@vga-hpd-without-ddc:
- shard-kbl: NOTRUN -> [SKIP][41] ([fdo#109271] / [fdo#111827]) +5 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl4/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-ctm-blue-to-red:
- shard-snb: NOTRUN -> [SKIP][42] ([fdo#109271] / [fdo#111827]) +14 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-snb6/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-gamma:
- shard-iclb: NOTRUN -> [SKIP][43] ([fdo#109284] / [fdo#111827]) +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb5/igt@[email protected]

* igt@kms_content_protection@lic:
- shard-apl: NOTRUN -> [TIMEOUT][44] ([i915#1319]) +1 similar issue
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-32x32-offscreen:
- shard-tglb: NOTRUN -> [SKIP][45] ([i915#3319]) +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-512x512-offscreen:
- shard-tglb: NOTRUN -> [SKIP][46] ([fdo#109279] / [i915#3359])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-max-size-sliding:
- shard-glk: NOTRUN -> [SKIP][47] ([fdo#109271])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-glk9/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-32x10-rapid-movement:
- shard-tglb: NOTRUN -> [SKIP][48] ([i915#3359]) +1 similar issue
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][49] -> [DMESG-WARN][50] ([i915#180])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-apl1/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl7/igt@[email protected]

* igt@kms_cursor_legacy@cursorb-vs-flipb-atomic:
- shard-tglb: NOTRUN -> [SKIP][51] ([fdo#111825]) +21 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-skl: [PASS][52] -> [FAIL][53] ([i915#2346])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl7/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl9/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank@bc-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][54] -> [FAIL][55] ([i915#79])
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-glk9/igt@kms_flip@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-glk7/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-ts-check-interruptible@a-edp1:
- shard-skl: [PASS][56] -> [FAIL][57] ([i915#2122])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl7/igt@kms_flip@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl9/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
- shard-skl: NOTRUN -> [INCOMPLETE][58] ([i915#3699])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-msflip-blt:
- shard-snb: NOTRUN -> [SKIP][59] ([fdo#109271]) +289 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-snb5/igt@[email protected]

* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][60] -> [FAIL][61] ([i915#1188])
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl7/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl9/igt@[email protected]

* igt@kms_invalid_dotclock:
- shard-tglb: NOTRUN -> [SKIP][62] ([fdo#110577])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@kms_invalid_dotclock.html

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- shard-apl: NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#533]) +2 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl2/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [PASS][64] -> [DMESG-WARN][65] ([i915#180]) +1 similar issue
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-kbl2/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-kbl: NOTRUN -> [FAIL][66] ([fdo#108145] / [i915#265])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl7/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-apl: NOTRUN -> [FAIL][67] ([fdo#108145] / [i915#265]) +2 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl3/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][68] ([i915#265])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][69] -> [FAIL][70] ([fdo#108145] / [i915#265]) +1 similar issue
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl10/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl3/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-none:
- shard-tglb: NOTRUN -> [SKIP][71] ([i915#3536])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@kms_plane_lowres@pipe-c-tiling-none:
- shard-iclb: NOTRUN -> [SKIP][72] ([i915#3536])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb5/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
- shard-kbl: NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#658]) +1 similar issue
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl1/igt@[email protected]

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
- shard-apl: NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#658]) +4 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl2/igt@[email protected]

* igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
- shard-tglb: NOTRUN -> [SKIP][75] ([i915#2920])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: NOTRUN -> [SKIP][76] ([fdo#109441])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb5/igt@kms_psr@psr2_cursor_plane_onoff.html

* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][77] -> [SKIP][78] ([fdo#109441])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_gtt.html

* igt@kms_psr@psr2_sprite_plane_move:
- shard-tglb: NOTRUN -> [FAIL][79] ([i915#132] / [i915#3467])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@kms_psr@psr2_sprite_plane_move.html

* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: NOTRUN -> [DMESG-WARN][80] ([i915#180] / [i915#295])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl4/igt@[email protected]

* igt@kms_writeback@writeback-check-output:
- shard-kbl: NOTRUN -> [SKIP][81] ([fdo#109271] / [i915#2437])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl7/igt@[email protected]

* igt@nouveau_crc@pipe-b-source-outp-inactive:
- shard-tglb: NOTRUN -> [SKIP][82] ([i915#2530]) +1 similar issue
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@perf@polling-parameterized:
- shard-skl: [PASS][83] -> [FAIL][84] ([i915#1542])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl3/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl7/igt@[email protected]

* igt@prime_nv_pcopy@test3_2:
- shard-tglb: NOTRUN -> [SKIP][85] ([fdo#109291]) +1 similar issue
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@prime_nv_pcopy@test3_2.html

* igt@syncobj_timeline@single-wait-available-signaled:
- shard-glk: [PASS][86] -> [DMESG-WARN][87] ([i915#118] / [i915#95]) +1 similar issue
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-glk9/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-glk7/igt@[email protected]

* igt@sysfs_clients@fair-1:
- shard-apl: NOTRUN -> [SKIP][88] ([fdo#109271] / [i915#2994]) +2 similar issues
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-apl2/igt@[email protected]

* igt@sysfs_clients@recycle-many:
- shard-kbl: NOTRUN -> [SKIP][89] ([fdo#109271] / [i915#2994])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl7/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_persistence@many-contexts:
- {shard-rkl}: [FAIL][90] ([i915#2410]) -> [PASS][91] +2 similar issues
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-6/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-5/igt@[email protected]

* igt@gem_eio@in-flight-contexts-10ms:
- shard-tglb: [TIMEOUT][92] ([i915#3063]) -> [PASS][93]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-tglb1/igt@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb1/igt@[email protected]

* igt@gem_eio@unwedge-stress:
- shard-tglb: [TIMEOUT][94] ([i915#2369] / [i915#3063] / [i915#3648]) -> [PASS][95]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-tglb8/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- {shard-rkl}: [FAIL][96] ([i915#2846]) -> [PASS][97]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-2/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-1/igt@[email protected]

* igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [FAIL][98] ([i915#2842]) -> [PASS][99] +1 similar issue
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-tglb8/igt@gem_exec_fair@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-iclb: [FAIL][100] ([i915#2842]) -> [PASS][101]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-iclb4/igt@gem_exec_fair@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][102] ([i915#2842]) -> [PASS][103] +1 similar issue
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-glk1/igt@gem_exec_fair@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-glk6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [FAIL][104] ([i915#2849]) -> [PASS][105]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-iclb4/igt@gem_exec_fair@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-iclb7/igt@gem_exec_fair@[email protected]

* igt@gem_workarounds@suspend-resume:
- shard-kbl: [INCOMPLETE][106] ([i915#155]) -> [PASS][107]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-kbl4/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl2/igt@[email protected]

* igt@gen9_exec_parse@allowed-all:
- shard-glk: [DMESG-WARN][108] ([i915#1436] / [i915#716]) -> [PASS][109]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-glk5/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-glk9/igt@[email protected]

* igt@i915_pm_backlight@basic-brightness:
- {shard-rkl}: [SKIP][110] ([i915#3012]) -> [PASS][111]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-5/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- {shard-rkl}: [SKIP][112] ([fdo#109308]) -> [PASS][113]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp-stress-no-wait:
- {shard-rkl}: [SKIP][114] ([i915#1397]) -> [PASS][115]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-5/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-tglb: [INCOMPLETE][116] ([i915#2411] / [i915#456] / [i915#750]) -> [PASS][117]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-tglb7/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb3/igt@[email protected]

* igt@i915_pm_rpm@system-suspend-modeset:
- shard-skl: [INCOMPLETE][118] ([i915#151]) -> [PASS][119]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl3/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl7/igt@[email protected]

* igt@kms_big_fb@linear-32bpp-rotate-0:
- {shard-rkl}: [SKIP][120] ([i915#3638]) -> [PASS][121]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_big_fb@linear-max-hw-stride-64bpp-rotate-180:
- {shard-rkl}: [SKIP][122] ([i915#3721]) -> [PASS][123] +4 similar issues
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_big_fb@y-tiled-32bpp-rotate-270:
- {shard-rkl}: [SKIP][124] ([fdo#111614]) -> [PASS][125]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-5/igt@[email protected]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_color@pipe-b-ctm-0-25:
- {shard-rkl}: [SKIP][126] ([i915#1149] / [i915#1849] / [i915#4070]) -> [PASS][127] +3 similar issues
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_concurrent@pipe-b:
- {shard-rkl}: [SKIP][128] ([i915#1845] / [i915#4070]) -> [PASS][129]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-64x21-onscreen:
- {shard-rkl}: [SKIP][130] ([fdo#112022] / [i915#4070]) -> [PASS][131] +6 similar issues
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [DMESG-WARN][132] ([i915#180]) -> [PASS][133] +3 similar issues
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-kbl4/igt@[email protected]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-kbl4/igt@[email protected]
- shard-tglb: [INCOMPLETE][134] ([i915#2411] / [i915#456]) -> [PASS][135]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-tglb7/igt@[email protected]
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-tglb2/igt@[email protected]

* igt@kms_cursor_edge_walk@pipe-b-256x256-left-edge:
- {shard-rkl}: [SKIP][136] ([i915#1849] / [i915#4070]) -> [PASS][137] +4 similar issues
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-rkl-1/igt@[email protected]
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-rkl-6/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-skl: [FAIL][138] ([i915#2346] / [i915#533]) -> [PASS][139]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10566/shard-skl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/shard-skl10/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-atomic:
- {shard-rkl}: [SKIP][140] ([fdo#111825] /

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21010/index.html

#13 lore raw
In reply to Matt Roper
Quoted 14 lines · Matt Roper

Our uncore MMIO functions for reading/writing registers have become very complicated over time. There's significant macro magic used to generate several nearly-identical functions that only really differ in terms of which platform-specific shadow register table they should check on write operations. We can significantly simplify our MMIO handlers by storing a reference to the current platform's shadow table within the 'struct intel_uncore' the same way we already do for forcewake; this allows us to consolidate the multiple variants of each 'write' function down to just a single 'fwtable' version that gets the shadow table out of the uncore struct rather than hardcoding the name of a specific platform's table. We can do similar consolidation on the MMIO read side by creating a single-entry forcewake table to replace the open-coded range check they had been using previously.

Quoted 3 lines

The final patch of the series adds a new shadow table for DG2; this becomes quite clean and simple now, given the refactoring in the first five patches.

Tidy and it ends up saving kernel binary size.

However I am undecided yet, because one thing to note is that the trade off is source code and kernel text consolidation at the expense of more indirect calls at runtime and larger common read/write functions.

To expand, current code generates a bunch of per gen functions but in doing so it manages to inline a bunch of checks like NEEDS_FORCE_WAKE and BSEARCH (from find_fw_domain) so at runtime each platform mmio read/write does not have to do indirect calls to do lookups.

It may matter a lot in the grand scheme of things but this trade off is something to note in the cover letter I think.

Regards,

Tvrtko

Quoted 13 lines

Matt Roper (6):
drm/i915/uncore: Convert gen6/gen7 read operations to fwtable drm/i915/uncore: Associate shadow table with uncore drm/i915/uncore: Replace gen8 write functions with general fwtable drm/i915/uncore: Drop gen11/gen12 mmio write handlers drm/i915/uncore: Drop gen11 mmio read handlers drm/i915/dg2: Add DG2-specific shadow register table

  drivers/gpu/drm/i915/intel_uncore.c           | 190 ++++++++++--------
  drivers/gpu/drm/i915/intel_uncore.h           |   7 +
  drivers/gpu/drm/i915/selftests/intel_uncore.c |   1 +
  3 files changed, 110 insertions(+), 88 deletions(-)
author
#14 lore raw
Quoted 26 lines · Tvrtko Ursulin
Quoted 14 lines · Matt Roper

Our uncore MMIO functions for reading/writing registers have become very complicated over time. There's significant macro magic used to generate several nearly-identical functions that only really differ in terms of which platform-specific shadow register table they should check on write operations. We can significantly simplify our MMIO handlers by storing a reference to the current platform's shadow table within the 'struct intel_uncore' the same way we already do for forcewake; this allows us to consolidate the multiple variants of each 'write' function down to just a single 'fwtable' version that gets the shadow table out of the uncore struct rather than hardcoding the name of a specific platform's table. We can do similar consolidation on the MMIO read side by creating a single-entry forcewake table to replace the open-coded range check they had been using previously.

Quoted 3 lines

The final patch of the series adds a new shadow table for DG2; this becomes quite clean and simple now, given the refactoring in the first five patches.

Tidy and it ends up saving kernel binary size.

However I am undecided yet, because one thing to note is that the trade off is source code and kernel text consolidation at the expense of more indirect calls at runtime and larger common read/write functions.

Quoted 7 lines

To expand, current code generates a bunch of per gen functions but in doing so it manages to inline a bunch of checks like NEEDS_FORCE_WAKE and BSEARCH (from find_fw_domain) so at runtime each platform mmio read/write does not have to do indirect calls to do lookups.

It may matter a lot in the grand scheme of things but this trade off is something to note in the cover letter I think.

That's true. However it seems like if the extra indirect calls are good enough for our forcewake lookups (which are called more frequently and have to search through much larger tables) then using the same strategy for shadow registers should be less of a concern. Plus most of timing-critical parts of the code don't call through this at all; they just grab an explicit forcewake and then issue a bunch of *_fw() operations that skip all the per-register forcewake and shadow handling.

But you're right that this is something I should mention more clearly in the cover letter.

Matt

Quoted 18 lines

Regards,

Tvrtko

Quoted 13 lines

Matt Roper (6):
drm/i915/uncore: Convert gen6/gen7 read operations to fwtable drm/i915/uncore: Associate shadow table with uncore drm/i915/uncore: Replace gen8 write functions with general fwtable drm/i915/uncore: Drop gen11/gen12 mmio write handlers drm/i915/uncore: Drop gen11 mmio read handlers drm/i915/dg2: Add DG2-specific shadow register table

  drivers/gpu/drm/i915/intel_uncore.c           | 190 ++++++++++--------
  drivers/gpu/drm/i915/intel_uncore.h           |   7 +
  drivers/gpu/drm/i915/selftests/intel_uncore.c |   1 +
  3 files changed, 110 insertions(+), 88 deletions(-)
Signature · 5 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
#15 lore raw
Quoted 35 lines · Matt Roper
Quoted 26 lines · Tvrtko Ursulin
Quoted 14 lines · Matt Roper

Our uncore MMIO functions for reading/writing registers have become very complicated over time. There's significant macro magic used to generate several nearly-identical functions that only really differ in terms of which platform-specific shadow register table they should check on write operations. We can significantly simplify our MMIO handlers by storing a reference to the current platform's shadow table within the 'struct intel_uncore' the same way we already do for forcewake; this allows us to consolidate the multiple variants of each 'write' function down to just a single 'fwtable' version that gets the shadow table out of the uncore struct rather than hardcoding the name of a specific platform's table. We can do similar consolidation on the MMIO read side by creating a single-entry forcewake table to replace the open-coded range check they had been using previously.

Quoted 3 lines

The final patch of the series adds a new shadow table for DG2; this becomes quite clean and simple now, given the refactoring in the first five patches.

Tidy and it ends up saving kernel binary size.

However I am undecided yet, because one thing to note is that the trade off is source code and kernel text consolidation at the expense of more indirect calls at runtime and larger common read/write functions.

Quoted 7 lines

To expand, current code generates a bunch of per gen functions but in doing so it manages to inline a bunch of checks like NEEDS_FORCE_WAKE and BSEARCH (from find_fw_domain) so at runtime each platform mmio read/write does not have to do indirect calls to do lookups.

It may matter a lot in the grand scheme of things but this trade off is something to note in the cover letter I think.

Quoted 7 lines

That's true. However it seems like if the extra indirect calls are good enough for our forcewake lookups (which are called more frequently and have to search through much larger tables) then using the same strategy for shadow registers should be less of a concern. Plus most of timing-critical parts of the code don't call through this at all; they just grab an explicit forcewake and then issue a bunch of *_fw() operations that skip all the per-register forcewake and shadow handling.

With lookups you mean intel_uncore_forcewake_for_reg? Yeah I don't have a good idea of how many of those followed by "_fw" accessors we have vs "un-optimized" access. But it's a good point.

I was mostly coming from the point of view of old platforms like gen6, where with this series reads go from inlined checks (NEEDS_FORCE_WAKE) to always calling find_fw_domain. Just because it is a bit unfortunate to burden old CPUs (they are not getting any faster) with executing more code. It's not nice when old hardware gets slower and slower with software updates. :) But whether or not this case would at all be measurable.. probably not. Unless some compounding effects, like "death by thousand cuts", would come into play.

Regards,

Tvrtko

Quoted 25 lines

But you're right that this is something I should mention more clearly in the cover letter.

Matt

Quoted 18 lines

Regards,

Tvrtko

Quoted 13 lines

Matt Roper (6):
drm/i915/uncore: Convert gen6/gen7 read operations to fwtable drm/i915/uncore: Associate shadow table with uncore drm/i915/uncore: Replace gen8 write functions with general fwtable drm/i915/uncore: Drop gen11/gen12 mmio write handlers drm/i915/uncore: Drop gen11 mmio read handlers drm/i915/dg2: Add DG2-specific shadow register table

   drivers/gpu/drm/i915/intel_uncore.c           | 190 ++++++++++--------
   drivers/gpu/drm/i915/intel_uncore.h           |   7 +
   drivers/gpu/drm/i915/selftests/intel_uncore.c |   1 +
   3 files changed, 110 insertions(+), 88 deletions(-)
author
#16 lore raw
Quoted 49 lines · Tvrtko Ursulin
Quoted 35 lines · Matt Roper
Quoted 26 lines · Tvrtko Ursulin
Quoted 14 lines · Matt Roper

Our uncore MMIO functions for reading/writing registers have become very complicated over time. There's significant macro magic used to generate several nearly-identical functions that only really differ in terms of which platform-specific shadow register table they should check on write operations. We can significantly simplify our MMIO handlers by storing a reference to the current platform's shadow table within the 'struct intel_uncore' the same way we already do for forcewake; this allows us to consolidate the multiple variants of each 'write' function down to just a single 'fwtable' version that gets the shadow table out of the uncore struct rather than hardcoding the name of a specific platform's table. We can do similar consolidation on the MMIO read side by creating a single-entry forcewake table to replace the open-coded range check they had been using previously.

Quoted 3 lines

The final patch of the series adds a new shadow table for DG2; this becomes quite clean and simple now, given the refactoring in the first five patches.

Tidy and it ends up saving kernel binary size.

However I am undecided yet, because one thing to note is that the trade off is source code and kernel text consolidation at the expense of more indirect calls at runtime and larger common read/write functions.

Quoted 7 lines

To expand, current code generates a bunch of per gen functions but in doing so it manages to inline a bunch of checks like NEEDS_FORCE_WAKE and BSEARCH (from find_fw_domain) so at runtime each platform mmio read/write does not have to do indirect calls to do lookups.

It may matter a lot in the grand scheme of things but this trade off is something to note in the cover letter I think.

Quoted 7 lines

That's true. However it seems like if the extra indirect calls are good enough for our forcewake lookups (which are called more frequently and have to search through much larger tables) then using the same strategy for shadow registers should be less of a concern. Plus most of timing-critical parts of the code don't call through this at all; they just grab an explicit forcewake and then issue a bunch of *_fw() operations that skip all the per-register forcewake and shadow handling.

With lookups you mean intel_uncore_forcewake_for_reg? Yeah I don't have a good idea of how many of those followed by "_fw" accessors we have vs "un-optimized" access. But it's a good point.

Quoted 8 lines

I was mostly coming from the point of view of old platforms like gen6, where with this series reads go from inlined checks (NEEDS_FORCE_WAKE) to always calling find_fw_domain. Just because it is a bit unfortunate to burden old CPUs (they are not getting any faster) with executing more code. It's not nice when old hardware gets slower and slower with software updates. :) But whether or not this case would at all be measurable.. probably not. Unless some compounding effects, like "death by thousand cuts", would come into play.

Chris pointed out in an offline mail that NEEDS_FORCE_WAKE does cut cut out a lot of display MMIO lookups. So I think it might be worth adding that back, but also adding an "|| GEN11_BSD_RING_BASE" so that it will still be accurate for the newer platforms too.

But I think another thing to consider here would be that we might want to switch our intel_de_{read,write} wrappers to call raw mmio directly, to completely bypass forcewake and shadow logic.

Matt

Quoted 30 lines

Regards,

Tvrtko

Quoted 25 lines

But you're right that this is something I should mention more clearly in the cover letter.

Matt

Quoted 18 lines

Regards,

Tvrtko

Quoted 13 lines

Matt Roper (6):
drm/i915/uncore: Convert gen6/gen7 read operations to fwtable drm/i915/uncore: Associate shadow table with uncore drm/i915/uncore: Replace gen8 write functions with general fwtable drm/i915/uncore: Drop gen11/gen12 mmio write handlers drm/i915/uncore: Drop gen11 mmio read handlers drm/i915/dg2: Add DG2-specific shadow register table

   drivers/gpu/drm/i915/intel_uncore.c           | 190 ++++++++++--------
   drivers/gpu/drm/i915/intel_uncore.h           |   7 +
   drivers/gpu/drm/i915/selftests/intel_uncore.c |   1 +
   3 files changed, 110 insertions(+), 88 deletions(-)
Signature · 5 lines
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795