Skip to contentSkip to conversation

quick_dump: Add VLV DPIO registers

PATCH Superseded [email protected] 1 participant 1 message Jun 25, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 quick_dump: Add VLV DPIO registers

From: Ville Syrjälä <[email protected]>

Add the names of all VLV DPIO registers.

Implement a quick and hacky solution to make the tool "detect" DPIO registers by checking if the file name contains the string "dpio".

---
 tools/quick_dump/Makefile.am   |  2 +-
 tools/quick_dump/quick_dump.py | 13 +++++++----
 tools/quick_dump/valleyview    |  1 +
 tools/quick_dump/vlv_dpio.txt  | 53 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+), 5 deletions(-)
 create mode 100644 tools/quick_dump/vlv_dpio.txt
tools/quick_dump/Makefile.am +1 -1
index afd6814..cc19987 100644
@@ -25,7 +25,7 @@ EXTRA_DIST =  \
 	      base_display.txt base_interrupt.txt base_other.txt base_power.txt base_rings.txt \
 	      gen6_other.txt sandybridge \
 	      gen7_other.txt ivybridge \
-	      vlv_display.txt valleyview \
+	      vlv_display.txt vlv_dpio.txt valleyview \
 	      quick_dump.py \
 	      reg_access.py \
 	      chipset.i chipset.py
tools/quick_dump/quick_dump.py +9 -4
index 6111b5d..2631b03 100755
@@ -8,12 +8,15 @@ import subprocess
 import chipset
 import reg_access as reg
 
-def parse_file(file):
+def parse_file(file, is_dpio):
 	print('{0:^10s} | {1:^28s} | {2:^10s}'. format('offset', file.name, 'value'))
 	print('-' * 54)
 	for line in file:
 		register = ast.literal_eval(line)
-		val = reg.read(register[1])
+		if is_dpio:
+			val = reg.dpio_read(register[1])
+		else:
+			val = reg.read(register[1])
 		intreg = int(register[1], 16)
 		print('{0:#010x} | {1:<28} | {2:#010x}'.format(intreg, register[0], val))
 	print('')
@@ -38,7 +41,8 @@ if args.baseless == False:
 		for name in files:
 			if name.startswith(("base_")):
 				file = open(name.rstrip(), 'r')
-				parse_file(file)
+				is_dpio = 'dpio' in name.lower()
+				parse_file(file, is_dpio)
 
 if args.autodetect:
 	pci_dev = chipset.intel_get_pci_device()
@@ -59,4 +63,5 @@ if args.profile == None:
 
 for extra in args.profile:
 	extra_file = open(extra.rstrip(), 'r')
-	parse_file(extra_file)
+	is_dpio = 'dpio' in extra.lower()
+	parse_file(extra_file, is_dpio)
tools/quick_dump/valleyview +1 -0
index 4d7dee1..6b6e16c 100644
@@ -5,3 +5,4 @@ base_other.txt
 base_power.txt
 base_rings.txt
 gen7_other.txt
+vlv_dpio.txt
tools/quick_dump/vlv_dpio.txt new file +53 -0

53 lines not on this page · raw message

Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx