Commit e812cc3d authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Decode replay-replay-chains

parent 9fd1a609
......@@ -18,6 +18,12 @@
#include <stdio.h>
#include <memory.h>
#define MEMORY_PROP(p) {\
char *a = pointer_as_memory_reference(v->p); \
panwrap_prop("%s = %s", #p, a); \
free(a); \
}
extern char* replace_fragment;
extern char* replace_vertex;
......@@ -373,11 +379,7 @@ void panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header
panwrap_log("struct mali_payload_vertex_tiler vertex_tiler_%d = {\n", job_no);
panwrap_indent++;
#define MEMORY_PROP(p) {\
char *a = pointer_as_memory_reference(v->p); \
panwrap_prop("%s = %s", #p, a); \
free(a); \
}
panwrap_prop("unk0 = 0x%" PRIx32, v->unk0);
panwrap_prop("unk1 = 0x%" PRIx32, v->unk1);
......@@ -414,8 +416,6 @@ void panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header
panwrap_indent--;
panwrap_log("};\n");
#undef MEMORY_PROP
TOUCH(mem, payload, *v, "vertex_tiler", job_no);
/* TODO: Isn't this an -M-FBD? What's the difference? */
......@@ -864,3 +864,27 @@ void panwrap_replay_jc(mali_ptr jc_gpu_va)
}
} while ((jc_gpu_va = ((u64) (uintptr_t) h->next_job) & (((u64)1<<55) - 1)));
}
void panwrap_replay_soft_replay(mali_ptr jc_gpu_va)
{
struct mali_jd_replay_jc *v;
do {
struct panwrap_mapped_memory *mem =
panwrap_find_mapped_gpu_mem_containing(jc_gpu_va);
v = PANWRAP_PTR(mem, jc_gpu_va, typeof(*v));
int job_no = job_descriptor_number++;
panwrap_log("struct mali_jd_replay_jc soft_replay_%d = {\n", job_no);
panwrap_indent++;
MEMORY_PROP(next);
MEMORY_PROP(jc);
panwrap_indent--;
panwrap_log("};\n");
TOUCH(mem, jc_gpu_va, *v, "soft_replay", job_no);
} while ((jc_gpu_va = v->next));
}
......@@ -21,5 +21,6 @@
void panwrap_trace_hw_chain(mali_ptr jc_gpu_va);
void panwrap_replay_jc(mali_ptr jc_gpu_va);
void panwrap_replay_soft_replay(mali_ptr jc_gpu_va);
#endif /* !PANWRAP_DECODER_H */
......@@ -637,6 +637,8 @@ static void emit_atoms(void *ptr) {
if (!(a->core_req & MALI_JD_REQ_SOFT_JOB))
panwrap_replay_jc(a->jc);
else if (a->core_req & MALI_JD_REQ_SOFT_REPLAY)
panwrap_replay_soft_replay(a->jc);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment