summaryrefslogtreecommitdiffstats
path: root/src/broadcom/cle/v3d_decoder.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-25 11:01:44 -0700
committerEric Anholt <[email protected]>2018-07-27 17:08:35 -0700
commite92959c4e03cf17b7cd829e2e56162604069abe6 (patch)
tree5bb1159faf3d7d1077dd313c016d7a52d43bdfe1 /src/broadcom/cle/v3d_decoder.c
parent77207e53806790e5edf3002a84d7105e646e22cb (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/v3d_decoder.c')
-rw-r--r--src/broadcom/cle/v3d_decoder.c7
1 files changed, 4 insertions, 3 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);
}