[PATCH umr] fix typo in print_bits() for ring/ib decoding
Tom St Denis
tom.stdenis at amd.com
Thu Nov 30 11:48:09 UTC 2017
Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
src/lib/ring_decode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c
index dee1502cc788..c904df0e281c 100644
--- a/src/lib/ring_decode.c
+++ b/src/lib/ring_decode.c
@@ -395,7 +395,7 @@ static void print_bits(struct umr_asic *asic, uint32_t regno, uint32_t value, in
printf("\t\t\t\t\t\t\t\t\\----+ ");
else
printf("\t\t\t\t\t\t\t\t|----+ ");
- v = (value >> reg->bits[k].start) & (1UL << (reg->bits[k].stop - reg->bits[k].start));
+ v = (value >> reg->bits[k].start) & ((1ULL << ((reg->bits[k].stop + 1) - reg->bits[k].start)) - 1);
reg->bits[k].bitfield_print(asic, asic->asicname, ip->ipname, reg->regname, reg->bits[k].regname, reg->bits[k].start, reg->bits[k].stop, v);
}
}
@@ -805,6 +805,7 @@ static void print_decode_pm4(struct umr_asic *asic, struct umr_ring_decoder *dec
(unsigned long)decoder->pm4.cur_word++, name,
BLUE, (unsigned long)decoder->pm4.next_write_mem.addr_lo, RST,
YELLOW, (unsigned long)ib, RST);
+ print_bits(asic, decoder->pm4.next_write_mem.addr_lo, ib, 1);
// strip off IP name
name = strstr(name, ".");
--
2.12.0
More information about the amd-gfx
mailing list