pan/decode: Dump scratchpad size if present
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 25 Feb 2020 20:40:46 +0000 (15:40 -0500)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 27 Feb 2020 15:31:06 +0000 (16:31 +0100)
This will help us narrow the size required for thread local storage.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>

src/panfrost/pandecode/decode.c

index 0a75e66351fddc9691576de42d934782dd79a21a..e5d77c9621ba28b4b5c4662431191b8bd02d72ec 100644 (file)
@@ -699,6 +699,14 @@ pandecode_shared_memory(const struct mali_shared_memory *desc, bool is_compute)
         MEMORY_PROP(desc, scratchpad);
         MEMORY_PROP(desc, shared_memory);
         MEMORY_PROP(desc, unknown1);
+
+        if (desc->scratchpad) {
+                struct pandecode_mapped_memory *smem =
+                        pandecode_find_mapped_gpu_mem_containing(desc->scratchpad);
+
+                pandecode_msg("scratchpad size %u\n", smem->length);
+        }
+
 }
 
 static struct pandecode_fbd