From 1f7dfee1b4fdb8df0a4dbadcabea2aacfbe6b23b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 19 Jun 2019 08:55:03 -0700 Subject: [PATCH] panfrost/decode: Expand pointers in compute descriptor Just as an aid. Signed-off-by: Alyssa Rosenzweig --- .../drivers/panfrost/include/panfrost-job.h | 11 +++++++- src/gallium/drivers/panfrost/pandecode/decode.c | 30 +++++++++++++++++----- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h index 4b3c788..aaf6de7 100644 --- a/src/gallium/drivers/panfrost/include/panfrost-job.h +++ b/src/gallium/drivers/panfrost/include/panfrost-job.h @@ -1410,7 +1410,16 @@ struct mali_single_framebuffer { * of compute jobs. Superficially resembles a single framebuffer descriptor */ struct mali_compute_fbd { - u32 unknown[64]; + u32 unknown1[16]; + mali_ptr unknown2; + mali_ptr unknown3; + u32 unknown4[16]; + u32 unknown5[18]; + mali_ptr unknown6; + u32 unknown7[4]; + mali_ptr unknown8; + mali_ptr unknown9; + u32 unknown10[16]; } __attribute__((packed)); /* Format bits for the render target flags */ diff --git a/src/gallium/drivers/panfrost/pandecode/decode.c b/src/gallium/drivers/panfrost/pandecode/decode.c index 61e0a01..3757ee9 100644 --- a/src/gallium/drivers/panfrost/pandecode/decode.c +++ b/src/gallium/drivers/panfrost/pandecode/decode.c @@ -540,6 +540,20 @@ pandecode_replay_sfbd(uint64_t gpu_va, int job_no) } static void +pandecode_u32_slide(unsigned name, const u32 *slide, unsigned count) +{ + pandecode_log(".unknown%d = {", name); + + for (int i = 0; i < count; ++i) + printf("%X, ", slide[i]); + + pandecode_log("},\n"); +} + +#define SHORT_SLIDE(num) \ + pandecode_u32_slide(num, s->unknown ## num, ARRAY_SIZE(s->unknown ## num)) + +static void pandecode_compute_fbd(uint64_t gpu_va, int job_no) { struct pandecode_mapped_memory *mem = pandecode_find_mapped_gpu_mem_containing(gpu_va); @@ -548,12 +562,16 @@ pandecode_compute_fbd(uint64_t gpu_va, int job_no) pandecode_log("struct mali_compute_fbd framebuffer_%d = {\n", job_no); pandecode_indent++; - pandecode_log(".unknown = {"); - - for (int i = 0; i < sizeof(s->unknown) / sizeof(s->unknown[0]); ++i) - printf("%X, ", s->unknown[i]); - - pandecode_log("},\n"); + SHORT_SLIDE(1); + MEMORY_PROP(s, unknown2); + MEMORY_PROP(s, unknown3); + SHORT_SLIDE(4); + SHORT_SLIDE(5); + MEMORY_PROP(s, unknown6); + SHORT_SLIDE(7); + MEMORY_PROP(s, unknown8); + MEMORY_PROP(s, unknown9); + SHORT_SLIDE(10); pandecode_indent--; printf("},\n"); -- 2.7.4