From: Rob Clark Date: Sun, 28 Nov 2021 16:58:45 +0000 (-0800) Subject: freedreno/crashdec: Basing GMU log decoding X-Git-Tag: upstream/22.3.5~15257 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=145b0711fcb494eacdb8917b02d0b9e884621852;p=platform%2Fupstream%2Fmesa.git freedreno/crashdec: Basing GMU log decoding Looks like each entry is four dwords, with the second dword being a timestamp. Signed-off-by: Rob Clark Part-of: --- diff --git a/src/freedreno/decode/crashdec.c b/src/freedreno/decode/crashdec.c index 1ebf74d..1da27c6 100644 --- a/src/freedreno/decode/crashdec.c +++ b/src/freedreno/decode/crashdec.c @@ -249,6 +249,35 @@ decode_ringbuffer(void) } /* + * Decode GMU log + */ + +static void +decode_gmu_log(void) +{ + uint64_t iova; + uint32_t size; + + foreach_line_in_section (line) { + if (startswith(line, " iova:")) { + parseline(line, " iova: %" PRIx64, &iova); + } else if (startswith(line, " size:")) { + parseline(line, " size: %u", &size); + } else if (startswith(line, " data: !!ascii85 |")) { + void *buf = popline_ascii85(size / 4); + + dump_hex_ascii(buf, size, 1); + + free(buf); + + continue; + } + + printf("%s", line); + } +} + +/* * Decode HFI queues */ @@ -746,6 +775,8 @@ decode(void) decode_bos(); } else if (startswith(line, "ringbuffer:")) { decode_ringbuffer(); + } else if (startswith(line, "gmu-log:")) { + decode_gmu_log(); } else if (startswith(line, "gmu-hfi:")) { decode_gmu_hfi(); } else if (startswith(line, "registers:")) {