From: Lionel Landwerlin Date: Wed, 2 Aug 2017 18:33:09 +0000 (+0100) Subject: intel: common: print out all dword with field spanning multiple dwords X-Git-Tag: upstream/18.1.0~4581 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b369acdd83c853eede3e484251a42980f1f7b30;p=platform%2Fupstream%2Fmesa.git intel: common: print out all dword with field spanning multiple dwords For example, we were skipping Dword 3 in this PIPE_CONTROL : 0x000ce130: 0x7a000004: PIPE_CONTROL DWord Length: 4 0x000ce134: 0x00000010 : Dword 1 Flush LLC: false Destination Address Type: 0 (PPGTT) LRI Post Sync Operation: 0 (No LRI Operation) Store Data Index: 0 Command Streamer Stall Enable: false Global Snapshot Count Reset: false TLB Invalidate: false Generic Media State Clear: false Post Sync Operation: 0 (No Write) Depth Stall Enable: false Render Target Cache Flush Enable: false Instruction Cache Invalidate Enable: false Texture Cache Invalidation Enable: false Indirect State Pointers Disable: false Notify Enable: false Pipe Control Flush Enable: false DC Flush Enable: false VF Cache Invalidation Enable: true Constant Cache Invalidation Enable: false State Cache Invalidation Enable: false Stall At Pixel Scoreboard: false Depth Cache Flush Enable: false 0x000ce138: 0x00000000 : Dword 2 Address: 0x00000000 0x000ce140: 0x00000000 : Dword 4 Immediate Data: 0 Signed-off-by: Lionel Landwerlin Reviewed-by: Scott D Phillips --- diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index cdeb464..acd0908 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -943,10 +943,11 @@ gen_field_iterator_next(struct gen_field_iterator *iter) static void print_dword_header(FILE *outfile, - struct gen_field_iterator *iter, uint64_t offset) + struct gen_field_iterator *iter, + uint64_t offset, uint32_t dword) { fprintf(outfile, "0x%08"PRIx64": 0x%08x : Dword %d\n", - offset + 4 * iter->dword, iter->p[iter->dword], iter->dword); + offset + 4 * dword, iter->p[dword], dword); } static bool @@ -968,12 +969,13 @@ gen_print_group(FILE *outfile, struct gen_group *group, uint64_t offset, const uint32_t *p, bool color) { struct gen_field_iterator iter; - int last_dword = 0; + int last_dword = -1; gen_field_iterator_init(&iter, group, p, color); while (gen_field_iterator_next(&iter)) { if (last_dword != iter.dword) { - print_dword_header(outfile, &iter, offset); + for (int i = last_dword + 1; i <= iter.dword; i++) + print_dword_header(outfile, &iter, offset, i); last_dword = iter.dword; } if (!is_header_field(group, iter.field)) {