Mesa (main): asahi/decode: Print some IOGPU stuff
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jul 11 18:58:29 UTC 2021
Module: Mesa
Branch: main
Commit: 05dc72f863fc8313d62bed671de055a038c8bc53
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=05dc72f863fc8313d62bed671de055a038c8bc53
Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date: Sun Jul 11 14:48:03 2021 -0400
asahi/decode: Print some IOGPU stuff
Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815>
---
src/asahi/lib/decode.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c
index 28719f628f2..eea80e43c22 100644
--- a/src/asahi/lib/decode.c
+++ b/src/asahi/lib/decode.c
@@ -455,6 +455,18 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
/* Before decoding anything, validate the map. Set bo->mapped fields */
agxdecode_validate_map(map->ptr.cpu);
+ /* Print the IOGPU stuff */
+ agx_unpack(agxdecode_dump_stream, cmdbuf->ptr.cpu, IOGPU_HEADER, cmd);
+ DUMP_UNPACKED(IOGPU_HEADER, cmd, "IOGPU Header\n");
+ assert(cmd.attachment_offset_1 == cmd.attachment_offset_2);
+
+ uint32_t *attachments = (uint32_t *) ((uint8_t *) cmdbuf->ptr.cpu + cmd.attachment_offset_1);
+ unsigned attachment_count = attachments[3];
+ for (unsigned i = 0; i < attachment_count; ++i) {
+ uint32_t *ptr = attachments + 4 + (i * AGX_IOGPU_ATTACHMENT_LENGTH / 4);
+ DUMP_CL(IOGPU_ATTACHMENT, ptr, "Attachment");
+ }
+
/* TODO: What else is in here? */
uint64_t *encoder = ((uint64_t *) cmdbuf->ptr.cpu) + 7;
agxdecode_stateful(*encoder, "Encoder", agxdecode_cmd, verbose);
More information about the mesa-commit
mailing list