[Intel-gfx] [PATCH 10/10] quick_dump: Use the register access library
Ben Widawsky
ben at bwidawsk.net
Sun Feb 3 01:08:02 CET 2013
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
tools/quick_dump/quick_dump.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/quick_dump/quick_dump.py b/tools/quick_dump/quick_dump.py
index 44aa2ba..5c88ef1 100755
--- a/tools/quick_dump/quick_dump.py
+++ b/tools/quick_dump/quick_dump.py
@@ -6,15 +6,13 @@ import sys
import ast
import subprocess
import chipset
+import reg_access as reg
def parse_file(file):
for line in file:
register = ast.literal_eval(line)
- value = subprocess.check_output(["../intel_reg_read", register[1]])
- value = value.decode('UTF-8') # convert the byte array to string
- value = value.rstrip() #dump the newline
- value = value.split(':') #output is 'addr : offset'
- print(value[0], "(", register[0], ")", value[1])
+ val = reg.read(register[1])
+ print(register[1], "(", register[0], ")", hex(val))
parser = argparse.ArgumentParser(description='Dumb register dumper.')
@@ -23,6 +21,9 @@ parser.add_argument('-a', '--autodetect', action='store_true', default=False, he
parser.add_argument('profile', nargs='?', type=argparse.FileType('r'), default=None)
args = parser.parse_args()
+if reg.init() == False:
+ sys.exit()
+
#parse anything named base_ these are assumed to apply for all gens.
if args.baseless == False:
for root, dirs, files in os.walk('.'):
--
1.8.1.2
More information about the Intel-gfx
mailing list