summaryrefslogtreecommitdiffstats
path: root/src/amd/common
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-05-15 11:10:31 +0200
committerNicolai Hähnle <[email protected]>2017-05-16 16:11:53 +0200
commit3accda4b82a2b3df84d28c095d3ab8810acf613b (patch)
treeb22bbc155a6eec7dadf3df4972a55215de5b581b /src/amd/common
parent0ca5bdb330d6b928c1320e5829906b195bd2c4b8 (diff)
ac/debug: handle index field in SET_*_REG correctly
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r--src/amd/common/ac_debug.c8
1 files changed, 7 insertions, 1 deletions
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);
}