Skip to contentSkip to conversation

Add ability to halt waves when reading rings.

PATCH New Tom St Denis 1 participant 1 message Aug 14, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add ability to halt waves when reading rings.

Perhaps not terribly useful for debugging UMDs but useful for developing umr as it lets me inspect semi-valid IBs and write the ring decoding logic...

---
 src/app/ring_read.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
src/app/ring_read.c +8 -1
index 401a1ac87b8d..1e569875f779 100644
@@ -61,6 +61,9 @@ void umr_read_ring(struct umr_asic *asic, char *ringpath)
 		enable_decoder = 0;
 	}
 
+	if (asic->options.halt_waves)
+		umr_sq_cmd_halt_waves(asic, UMR_SQ_CMD_HALT);
+
 	/* determine file size */
 	ringsize = lseek(fd, 0, SEEK_END) - 12;
 	lseek(fd, 0, SEEK_SET);
@@ -69,7 +72,7 @@ void umr_read_ring(struct umr_asic *asic, char *ringpath)
 	if (!ring_data) {
 		close(fd);
 		perror("Could not allocate ring data");
-		return;
+		goto end;
 	}
 	read(fd, ring_data, ringsize + 12);
 	close(fd);
@@ -142,4 +145,8 @@ void umr_read_ring(struct umr_asic *asic, char *ringpath)
 		free(pdecoder);
 		pdecoder = ppdecoder;
 	}
+
+end:
+	if (asic->options.halt_waves)
+		umr_sq_cmd_halt_waves(asic, UMR_SQ_CMD_RESUME);
 }
Signature · 6 lines
2.12.0

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