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 <lionel.g.landwerlin@intel.com>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
This commit is contained in:
Lionel Landwerlin
2017-08-02 19:33:09 +01:00
parent 3ae5c57916
commit 1b369acdd8
+6 -4
View File
@@ -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)) {