diff options
author | Lionel Landwerlin <[email protected]> | 2018-08-28 11:41:42 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-03-07 15:08:31 +0000 |
commit | acb50d6b1ff1b73a66e88862c99b65d87869e01d (patch) | |
tree | 902cd99aa632419a6fbb1e21ec87c7281982a5e0 /src/intel/tools | |
parent | ec526d6ba0bdb996416b7479330a424ff737df81 (diff) |
intel/decoders: handle decoding MI_BBS from ring
An MI_BATCH_BUFFER_START in the ring buffer acts as a second level
batchbuffer (aka jump back to ring buffer when running into a
MI_BATCH_BUFFER_END).
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/intel/tools')
-rw-r--r-- | src/intel/tools/aubinator.c | 4 | ||||
-rw-r--r-- | src/intel/tools/aubinator_error_decode.c | 2 | ||||
-rw-r--r-- | src/intel/tools/aubinator_viewer.cpp | 4 | ||||
-rw-r--r-- | src/intel/tools/aubinator_viewer.h | 2 | ||||
-rw-r--r-- | src/intel/tools/aubinator_viewer_decoder.cpp | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 1108604fdfe..e8c3db71f0e 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools/aubinator.c @@ -166,7 +166,7 @@ handle_execlist_write(void *user_data, enum drm_i915_gem_engine_class engine, ui batch_ctx.engine = engine; gen_print_batch(&batch_ctx, commands, MIN2(ring_buffer_tail - ring_buffer_head, ring_buffer_length), - ring_bo.addr + ring_buffer_head); + ring_bo.addr + ring_buffer_head, true); aub_mem_clear_bo_maps(&mem); } @@ -184,7 +184,7 @@ handle_ring_write(void *user_data, enum drm_i915_gem_engine_class engine, batch_ctx.get_bo = get_legacy_bo; batch_ctx.engine = engine; - gen_print_batch(&batch_ctx, data, data_len, 0); + gen_print_batch(&batch_ctx, data, data_len, 0, false); aub_mem_clear_bo_maps(&mem); } diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index bd578de48e4..049823ca463 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -612,7 +612,7 @@ read_data_file(FILE *file) batch_ctx.engine = class; gen_print_batch(&batch_ctx, sections[s].data, sections[s].dword_count * 4, - sections[s].gtt_offset); + sections[s].gtt_offset, false); } } diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index a0c611350fc..3eed5140ef2 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -702,7 +702,7 @@ display_batch_ring_write(void *user_data, enum drm_i915_gem_engine_class engine, window->uses_ppgtt = false; - aub_viewer_render_batch(&window->decode_ctx, data, data_len, 0); + aub_viewer_render_batch(&window->decode_ctx, data, data_len, 0, false); } static void @@ -737,7 +737,7 @@ display_batch_execlist_write(void *user_data, window->decode_ctx.engine = engine; aub_viewer_render_batch(&window->decode_ctx, commands, MIN2(ring_buffer_tail - ring_buffer_head, ring_buffer_length), - ring_buffer_start + ring_buffer_head); + ring_buffer_start + ring_buffer_head, true); } static void diff --git a/src/intel/tools/aubinator_viewer.h b/src/intel/tools/aubinator_viewer.h index 755df057699..16812925515 100644 --- a/src/intel/tools/aubinator_viewer.h +++ b/src/intel/tools/aubinator_viewer.h @@ -95,6 +95,6 @@ void aub_viewer_decode_ctx_init(struct aub_viewer_decode_ctx *ctx, void aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx, const void *batch, uint32_t batch_size, - uint64_t batch_addr); + uint64_t batch_addr, bool from_ring); #endif /* AUBINATOR_VIEWER_H */ diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp b/src/intel/tools/aubinator_viewer_decoder.cpp index 8e92ad03dd4..b946fb33e0c 100644 --- a/src/intel/tools/aubinator_viewer_decoder.cpp +++ b/src/intel/tools/aubinator_viewer_decoder.cpp @@ -892,7 +892,7 @@ struct custom_decoder info_decoders[] = { void aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx, const void *_batch, uint32_t batch_size, - uint64_t batch_addr) + uint64_t batch_addr, bool from_ring) { struct gen_group *inst; const uint32_t *p, *batch = (const uint32_t *) _batch, *end = batch + batch_size / sizeof(uint32_t); @@ -970,7 +970,7 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx, next_batch_addr); } else { aub_viewer_render_batch(ctx, next_batch.map, next_batch.size, - next_batch.addr); + next_batch.addr, false); } if (second_level) { /* MI_BATCH_BUFFER_START with "2nd Level Batch Buffer" set acts @@ -979,7 +979,7 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx, * MI_BATCH_BUFFER_END. */ continue; - } else { + } else if (!from_ring) { /* MI_BATCH_BUFFER_START with "2nd Level Batch Buffer" unset acts * like a goto. Nothing after it will ever get processed. In * order to prevent the recursion from growing, we just reset the |