diff options
author | Eric Anholt <[email protected]> | 2018-06-25 11:01:44 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-27 17:08:35 -0700 |
commit | e92959c4e03cf17b7cd829e2e56162604069abe6 (patch) | |
tree | 5bb1159faf3d7d1077dd313c016d7a52d43bdfe1 /src/broadcom/cle | |
parent | 77207e53806790e5edf3002a84d7105e646e22cb (diff) |
v3d: Pass the whole clif_dump structure to v3d_print_group().
To generate CLIF files that the v3dv3 simulator can parse, we're going to
need to decode addresses, and for that we'll need the vaddr lookup
function from the clif structure from within v3d_decoder.
Diffstat (limited to 'src/broadcom/cle')
-rw-r--r-- | src/broadcom/cle/v3d_decoder.c | 7 | ||||
-rw-r--r-- | src/broadcom/cle/v3d_decoder.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c index a540b1cf559..de57e5f5acb 100644 --- a/src/broadcom/cle/v3d_decoder.c +++ b/src/broadcom/cle/v3d_decoder.c @@ -37,6 +37,7 @@ #include "v3d_decoder.h" #include "v3d_packet_helpers.h" #include "v3d_xml.h" +#include "broadcom/clif/clif_private.h" struct v3d_spec { uint32_t ver; @@ -924,17 +925,17 @@ v3d_field_iterator_next(struct v3d_field_iterator *iter) } void -v3d_print_group(FILE *outfile, struct v3d_group *group, +v3d_print_group(struct clif_dump *clif, struct v3d_group *group, uint64_t offset, const uint8_t *p, bool color) { struct v3d_field_iterator iter; v3d_field_iterator_init(&iter, group, p, color); while (v3d_field_iterator_next(&iter)) { - fprintf(outfile, " %s: %s\n", iter.name, iter.value); + fprintf(clif->out, " %s: %s\n", iter.name, iter.value); if (iter.struct_desc) { uint64_t struct_offset = offset + iter.offset; - v3d_print_group(outfile, iter.struct_desc, + v3d_print_group(clif, iter.struct_desc, struct_offset, &p[iter.offset], color); } diff --git a/src/broadcom/cle/v3d_decoder.h b/src/broadcom/cle/v3d_decoder.h index cca1d6fa64c..2987f3920a1 100644 --- a/src/broadcom/cle/v3d_decoder.h +++ b/src/broadcom/cle/v3d_decoder.h @@ -34,6 +34,7 @@ struct v3d_spec; struct v3d_group; struct v3d_field; +struct clif_dump; struct v3d_group *v3d_spec_find_struct(struct v3d_spec *spec, const char *name); struct v3d_spec *v3d_spec_load(const struct v3d_device_info *devinfo); @@ -139,7 +140,7 @@ void v3d_field_iterator_init(struct v3d_field_iterator *iter, bool v3d_field_iterator_next(struct v3d_field_iterator *iter); -void v3d_print_group(FILE *out, +void v3d_print_group(struct clif_dump *clif, struct v3d_group *group, uint64_t offset, const uint8_t *p, bool color); |