panfrost: Add PAN_MESA_DEBUG=dump option

To dump all graphics memory via the new pandecode_dump_mappings function(),
since for Valhall I have to do this often enough to warrant a dynamic flag.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>
This commit is contained in:
Alyssa Rosenzweig 2022-01-28 16:18:34 -05:00 committed by Marge Bot
parent 28743a5556
commit 36a2b8d039
3 changed files with 5 additions and 0 deletions

View file

@ -644,6 +644,9 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch,
if (dev->debug & PAN_DBG_TRACE)
pandecode_jc(submit.jc, dev->gpu_id);
if (dev->debug & PAN_DBG_DUMP)
pandecode_dump_mappings();
/* Jobs won't be complete if blackhole rendering, that's ok */
if (!ctx->is_noop && dev->debug & PAN_DBG_SYNC)
pandecode_abort_on_fault(submit.jc, dev->gpu_id);

View file

@ -68,6 +68,7 @@ static const struct debug_named_value panfrost_debug_options[] = {
{"indirect", PAN_DBG_INDIRECT, "Use experimental compute kernel for indirect draws"},
{"linear", PAN_DBG_LINEAR, "Force linear textures"},
{"nocache", PAN_DBG_NO_CACHE, "Disable BO cache"},
{"dump", PAN_DBG_DUMP, "Dump all graphics memory"},
DEBUG_NAMED_VALUE_END
};

View file

@ -46,6 +46,7 @@
#define PAN_DBG_INDIRECT 0x0800
#define PAN_DBG_LINEAR 0x1000
#define PAN_DBG_NO_CACHE 0x2000
#define PAN_DBG_DUMP 0x4000
struct panfrost_device;