[PATCH umr] Fix ring offset to dword instead of bytes

Tom St Denis tstdenis82 at gmail.com
Wed Mar 8 16:31:39 UTC 2017


This allows you to specify (say)

-R gfx[16:32] to read words 16 through 32 which is
consistent with how the data is presented.

This patch also correctly enables the PM4 decoder
when specifying a range of words.

Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
 src/app/ring_read.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/app/ring_read.c b/src/app/ring_read.c
index 970310b9bf52..d6b3df58be4d 100644
--- a/src/app/ring_read.c
+++ b/src/app/ring_read.c
@@ -96,7 +96,10 @@ void umr_read_ring(struct umr_asic *asic, char *ringpath)
 		} else {
 			sscanf(from, "%"SCNu32, &start);
 			sscanf(to, "%"SCNu32, &end);
+			start *= 4;
+			end *= 4;
 			use_decoder = 1;
+			decoder.pm4.cur_opcode = 0xFFFFFFFF;
 		}
 	}
 	end %= ringsize;
-- 
2.11.0



More information about the amd-gfx mailing list