From 3accda4b82a2b3df84d28c095d3ab8810acf613b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Mon, 15 May 2017 11:10:31 +0200 Subject: [PATCH] ac/debug: handle index field in SET_*_REG correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/amd/common/ac_debug.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c index 9d051f9159e..a8f81bf9a9b 100644 --- a/src/amd/common/ac_debug.c +++ b/src/amd/common/ac_debug.c @@ -132,9 +132,15 @@ void ac_dump_reg(FILE *file, unsigned offset, uint32_t value, static void ac_parse_set_reg_packet(FILE *f, uint32_t *ib, unsigned count, unsigned reg_offset) { - unsigned reg = (ib[1] << 2) + reg_offset; + unsigned reg = ((ib[1] & 0xFFFF) << 2) + reg_offset; + unsigned index = ib[1] >> 28; int i; + if (index != 0) { + print_spaces(f, INDENT_PKT); + fprintf(f, "INDEX = %u\n", index); + } + for (i = 0; i < count; i++) ac_dump_reg(f, reg + i*4, ib[2+i], ~0); } -- 2.30.2