[Intel-gfx] [PATCH i-g-t 2/3] tools/intel_reg: Dump fence registers on ILK

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Fri Aug 5 08:39:28 UTC 2016


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Currently ILK doesn't get its fences dumped. Let's fix that.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tools/intel_reg_decode.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/intel_reg_decode.c b/tools/intel_reg_decode.c
index 0dbabe81ca3d..2d79290a4b58 100644
--- a/tools/intel_reg_decode.c
+++ b/tools/intel_reg_decode.c
@@ -743,7 +743,7 @@ DEBUGSTRING(i810_debug_965_fence_start)
 	int pitch = ((val & 0xffc) >> 2) * 128 + 128;
 	unsigned int offset = val & 0xfffff000;
 
-	if (!IS_GEN4(devid))
+	if (!IS_GEN4(devid) && !IS_GEN5(devid))
 		return 0;
 
 	return z_snprintf(result, len, "%s, %c tile walk, %4d pitch, 0x%08x start",
@@ -1012,6 +1012,10 @@ static const struct reg_debug intel_debug_regs[] = {
 	DEFINEFENCE_945(14),
 	DEFINEFENCE_945(15),
 
+	DEFINEREG(INST_PM),
+};
+
+static const struct reg_debug i965_fences[] = {
 #define DEFINEFENCE_965(i) \
 	{ FENCE_NEW+i*8, "FENCE START " #i, i810_debug_965_fence_start }, \
 	{ FENCE_NEW+i*8+4, "FENCE END " #i, i810_debug_965_fence_end }
@@ -1032,8 +1036,6 @@ static const struct reg_debug intel_debug_regs[] = {
 	DEFINEFENCE_965(13),
 	DEFINEFENCE_965(14),
 	DEFINEFENCE_965(15),
-
-	DEFINEREG(INST_PM),
 };
 
 DEBUGSTRING(ironlake_debug_rr_hw_ctl)
@@ -2594,6 +2596,11 @@ static bool is_gen56ivb(uint32_t devid, uint32_t pch)
 	return IS_GEN5(devid) || IS_GEN6(devid) || IS_IVYBRIDGE(devid);
 }
 
+static bool is_gen45(uint32_t devid, uint32_t pch)
+{
+	return IS_GEN4(devid) || IS_GEN5(devid);
+}
+
 static bool is_945gm(uint32_t devid, uint32_t pch)
 {
 	return IS_945GM(devid);
@@ -2614,6 +2621,7 @@ static struct {
 } known_registers[] = {
 	DECLARE_REGS("Gen2",	intel_debug_regs,	is_gen234),
 	DECLARE_REGS("i945GM",	i945gm_mi_regs,		is_945gm),
+	DECLARE_REGS("Gen4",	i965_fences,		is_gen45),
 	DECLARE_REGS("Gen5",	ironlake_debug_regs,	is_gen56ivb),
 	DECLARE_REGS("Gen6",	gen6_rp_debug_regs,	is_gen6_plus),
 	DECLARE_REGS("Gen6+",	gen6_fences,		is_gen6_plus),
-- 
2.7.4



More information about the Intel-gfx mailing list