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 <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13937>
This commit is contained in:
Rob Clark 2021-11-28 08:58:45 -08:00 committed by Marge Bot
parent 8c654d02a3
commit 145b0711fc
1 changed files with 31 additions and 0 deletions

View File

@ -248,6 +248,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:")) {