aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/pandecode/decode.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-02-18 07:43:51 -0500
committerAlyssa Rosenzweig <[email protected]>2020-02-18 08:44:59 -0500
commit4122f747ac67eca4c27ffa8d7e91d7d0c3cb02a8 (patch)
tree939ce29294ab71a51590e7af7a655aeade29bb4b /src/panfrost/pandecode/decode.c
parentb684ba6ce7fc6cabf42132559192e1065891e67a (diff)
pan/decode: Add `minimal` mode
We would like a mode to skip decoding job payloads so we can just inspect for faults. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
Diffstat (limited to 'src/panfrost/pandecode/decode.c')
-rw-r--r--src/panfrost/pandecode/decode.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 4cf7df2c74a..7e46014f3fa 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -2821,8 +2821,17 @@ pandecode_fragment_job(const struct pandecode_mapped_memory *mem,
static int job_descriptor_number = 0;
+/* Entrypoint to start tracing. jc_gpu_va is the GPU address for the first job
+ * in the chain; later jobs are found by walking the chain. Bifrost is, well,
+ * if it's bifrost or not. GPU ID is the more finegrained ID (at some point, we
+ * might wish to combine this with the bifrost parameter) because some details
+ * are model-specific even within a particular architecture. Minimal traces
+ * *only* examine the job descriptors, skipping printing entirely if there is
+ * no faults, and only descends into the payload if there are faults. This is
+ * useful for looking for faults without the overhead of invasive traces. */
+
int
-pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
+pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id, bool minimal)
{
struct mali_job_descriptor_header *h;
@@ -2853,6 +2862,10 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
if (first)
start_number = job_no;
+ /* If the job is good to go, skip it in minimal mode */
+ if (minimal && (h->exception_status == 0x0 || h->exception_status == 0x1))
+ continue;
+
pandecode_log("struct mali_job_descriptor_header job_%"PRIx64"_%d = {\n", jc_gpu_va, job_no);
pandecode_indent++;
@@ -2891,12 +2904,6 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
pandecode_indent--;
pandecode_log("};\n");
- /* Do not touch the field yet -- decode the payload first, and
- * don't touch that either. This is essential for the uploads
- * to occur in sequence and therefore be dynamically allocated
- * correctly. Do note the size, however, for that related
- * reason. */
-
switch (h->job_type) {
case JOB_TYPE_WRITE_VALUE: {
struct mali_payload_write_value *s = payload;