Skip to contentSkip to conversation

Fix ring offset to dword instead of bytes

PATCH In review Tom St Denis 2 participants 2 messages Mar 8, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix ring offset to dword instead of bytes

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.

---
 src/app/ring_read.c | 3 +++
 1 file changed, 3 insertions(+)
src/app/ring_read.c +3 -0
index 970310b9bf52..d6b3df58be4d 100644
@@ -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;
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 19 lines · Tom St Denis

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.

---
 src/app/ring_read.c | 3 +++
 1 file changed, 3 insertions(+)
src/app/ring_read.c +0 -0
index 970310b9bf52..d6b3df58be4d 100644

src/app/ring_read.c void umr_read_ring(struct umr_asic *asic, char *ringpath) · line 105

Quoted 10 lines
src/app/ring_read.c +3 -0
@@ -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;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx