Mesa (main): asahi/decode: Fix up high word
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jul 11 18:58:29 UTC 2021
Module: Mesa
Branch: main
Commit: 9854079d59c2d424367646f1c27ac2940b9b19e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9854079d59c2d424367646f1c27ac2940b9b19e5
Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date: Sat Jul 10 12:30:09 2021 -0400
asahi/decode: Fix up high word
Not sure what's happening here, there's some magic for sure.
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 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c
index a9fabdf74f8..a7bf8e4f355 100644
--- a/src/asahi/lib/decode.c
+++ b/src/asahi/lib/decode.c
@@ -217,6 +217,7 @@ agxdecode_map_read_write(void)
#define agxdecode_msg(str) fprintf(agxdecode_dump_stream, "// %s", str)
unsigned agxdecode_indent = 0;
+uint64_t pipeline_base = 0;
static void
agxdecode_dump_bo(struct agx_bo *bo, const char *name)
@@ -376,6 +377,8 @@ agxdecode_record(uint64_t va, size_t size, bool verbose)
}
DUMP_UNPACKED(BIND_PIPELINE, cmd, "Bind fragment pipeline\n");
+ } else if (size == 0) {
+ pipeline_base = va;
} else {
fprintf(agxdecode_dump_stream, "Record %" PRIx64 "\n", va);
hexdump(agxdecode_dump_stream, map, size, false);
@@ -408,6 +411,12 @@ agxdecode_cmd(const uint8_t *map, bool verbose)
} else if (map[1] == 0x00 && map[2] == 0x00) {
/* No need to explicitly dump the record */
agx_unpack(agxdecode_dump_stream, map, RECORD, cmd);
+
+ /* XXX: Why? */
+ if (pipeline_base && ((cmd.data >> 32) == 0)) {
+ cmd.data |= pipeline_base & 0xFF00000000ull;
+ }
+
struct agx_bo *mem = agxdecode_find_mapped_gpu_mem_containing(cmd.data);
if (mem)
More information about the mesa-commit
mailing list