asahi: Decode resource allocation requests
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 3 Apr 2022 14:34:00 +0000 (10:34 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 22 May 2022 21:11:08 +0000 (17:11 -0400)
We already know much of this structure, let's pretty print to simplify
our traces.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>

src/asahi/lib/io.h

index 8a4d058..6577559 100644 (file)
@@ -187,6 +187,18 @@ agx_memory_type_name(uint32_t type)
        }
 }
 
+struct agx_allocate_resource_req {
+   uint32_t unk0[5];
+   uint32_t mode;
+   uint32_t unk6[6];
+   uint64_t cpu_fixed;
+   uint64_t cpu_fixed_2;
+   uint32_t size;
+   uint32_t unk17[3];
+   uint32_t flags;
+   uint32_t unk21[3];
+} __attribute__((packed));
+
 struct agx_allocate_resource_resp {
    /* Returned GPU virtual address */
    uint64_t gpu_va;