Skip to contentSkip to conversation

intel_reg_dumper: Decode TP1 to TP2 time in FDI_RX_MISC

PATCH New Damien Lespiau 1 participant 1 message Aug 23, 2012 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_reg_dumper: Decode TP1 to TP2 time in FDI_RX_MISC

From: Damien Lespiau <[email protected]>

---
 lib/intel_reg.h          | 2 ++
 tools/intel_reg_dumper.c | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
lib/intel_reg.h +2 -0
index fa9e866..42b684d 100644
@@ -3374,6 +3374,8 @@ typedef enum {
 #define FDI_RXA_MISC		0xf0010
 #define FDI_RXB_MISC		0xf1010
 #define FDI_RXC_MISC		0xf2010
+#define  FDI_RX_TP1_TO_TP2_SHIFT	(20)
+
 #define FDI_RXA_TUSIZE1		0xf0030
 #define FDI_RXA_TUSIZE2		0xf0038
 #define FDI_RXB_TUSIZE1		0xf1030
tools/intel_reg_dumper.c +5 -1
index b27ae0d..0484bc3 100644
@@ -1307,7 +1307,11 @@ DEBUGSTRING(ironlake_debug_rawclk_freq)
 
 DEBUGSTRING(ironlake_debug_fdi_rx_misc)
 {
-	snprintf(result, len, "FDI Delay %d", val & ((1 << 13) - 1));
+	const char *tp1_to_tp2[4] = {"16", "32", "48", "64"};
+
+	snprintf(result, len, "TP1 to TP2 time: %s, FDI Delay %d",
+		 tp1_to_tp2[(val >> FDI_RX_TP1_TO_TP2_SHIFT) & 3],
+		 val & ((1 << 13) - 1));
 }
 
 DEBUGSTRING(ironlake_debug_fdi_rx_debug)
Signature · 1 line
1.7.11.4