diff options
author | Eric Anholt <[email protected]> | 2018-06-27 16:58:55 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-30 14:29:01 -0700 |
commit | 2df6f1a3dfcec9abc256c4648484e704b62d5210 (patch) | |
tree | 606172ecc0fa9a81210bb3779f1a02510853acc1 /src/broadcom | |
parent | c6449e33e3b3ec9ea0509aa7c91d1127c81ef1e5 (diff) |
v3d: Include commands to run the BCL and RCL in CLIF dumps.
Diffstat (limited to 'src/broadcom')
-rw-r--r-- | src/broadcom/clif/clif_dump.c | 35 | ||||
-rw-r--r-- | src/broadcom/clif/clif_dump.h | 3 | ||||
-rw-r--r-- | src/broadcom/clif/clif_private.h | 14 |
3 files changed, 46 insertions, 6 deletions
diff --git a/src/broadcom/clif/clif_dump.c b/src/broadcom/clif/clif_dump.c index a637ba5999f..9562686c6d3 100644 --- a/src/broadcom/clif/clif_dump.c +++ b/src/broadcom/clif/clif_dump.c @@ -24,6 +24,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "drm-uapi/v3d_drm.h" #include "clif_dump.h" #include "clif_private.h" #include "util/list.h" @@ -202,11 +203,6 @@ clif_process_worklist(struct clif_dump *clif) } } -void clif_dump(struct clif_dump *clif) -{ - clif_process_worklist(clif); -} - void clif_dump_add_cl(struct clif_dump *clif, uint32_t start, uint32_t end) { @@ -217,6 +213,35 @@ clif_dump_add_cl(struct clif_dump *clif, uint32_t start, uint32_t end) } void +clif_dump(struct clif_dump *clif, const struct drm_v3d_submit_cl *submit) +{ + clif_dump_add_cl(clif, submit->bcl_start, submit->bcl_end); + clif_dump_add_cl(clif, submit->rcl_start, submit->rcl_end); + + clif_process_worklist(clif); + + out(clif, "@add_bin 0\n "); + out_address(clif, submit->bcl_start); + out(clif, "\n "); + out_address(clif, submit->bcl_end); + out(clif, "\n "); + out_address(clif, submit->qma); + out(clif, "\n %d\n ", submit->qms); + out_address(clif, submit->qts); + out(clif, "\n"); + out(clif, "@wait_bin_all_cores\n"); + + out(clif, "@add_render 0\n "); + out_address(clif, submit->rcl_start); + out(clif, "\n "); + out_address(clif, submit->rcl_end); + out(clif, "\n "); + out_address(clif, submit->qma); + out(clif, "\n"); + out(clif, "@wait_render_all_cores\n"); +} + +void clif_dump_add_bo(struct clif_dump *clif, const char *name, uint32_t offset, uint32_t size, void *vaddr) { diff --git a/src/broadcom/clif/clif_dump.h b/src/broadcom/clif/clif_dump.h index f0a8f9a1f14..8de3a2cbea4 100644 --- a/src/broadcom/clif/clif_dump.h +++ b/src/broadcom/clif/clif_dump.h @@ -29,10 +29,11 @@ struct v3d_device_info; struct clif_dump; +struct drm_v3d_submit_cl; struct clif_dump *clif_dump_init(const struct v3d_device_info *devinfo, FILE *output, bool pretty); -void clif_dump(struct clif_dump *clif); +void clif_dump(struct clif_dump *clif, const struct drm_v3d_submit_cl *submit); void clif_dump_destroy(struct clif_dump *clif); void clif_dump_add_bo(struct clif_dump *clif, const char *name, diff --git a/src/broadcom/clif/clif_private.h b/src/broadcom/clif/clif_private.h index 8753ba229f8..109701c3bc7 100644 --- a/src/broadcom/clif/clif_private.h +++ b/src/broadcom/clif/clif_private.h @@ -105,4 +105,18 @@ out(struct clif_dump *clif, const char *fmt, ...) va_end(args); } +static inline void +out_address(struct clif_dump *clif, uint32_t addr) +{ + struct clif_bo *bo = clif_lookup_bo(clif, addr); + if (bo) { + out(clif, "[%s+0x%08x] /* 0x%08x */", + bo->name, addr - bo->offset, addr); + } else if (addr) { + out(clif, "/* XXX: BO unknown */ 0x%08x", addr); + } else { + out(clif, "[null]"); + } +} + #endif /* CLIF_PRIVATE_H */ |