diff mbox

intel_reg_dumper: Decode TP1 to TP2 time in FDI_RX_MISC

Message ID 1345730020-9247-1-git-send-email-damien.lespiau@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Damien Lespiau Aug. 23, 2012, 1:53 p.m. UTC
From: Damien Lespiau <damien.lespiau@intel.com>

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/intel_reg.h          | 2 ++
 tools/intel_reg_dumper.c | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/lib/intel_reg.h b/lib/intel_reg.h
index fa9e866..42b684d 100644
--- a/lib/intel_reg.h
+++ b/lib/intel_reg.h
@@ -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
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index b27ae0d..0484bc3 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -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)