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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux