summaryrefslogtreecommitdiffstats
path: root/src/intel/tools/aubinator.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-11-09 16:49:10 +0000
committerLionel Landwerlin <[email protected]>2018-11-16 11:37:08 +0000
commit25443cbb72048900f3ff06fdb7a68aef6eea39ff (patch)
tree605c3894d125626e16ea805aa691c02c58c04a5e /src/intel/tools/aubinator.c
parent1c56d211563300e8b837378962dd455d45d7956e (diff)
intel/decoders: read ring buffer length
Use this value to limit reading the ring buffer. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Toni Lönnberg <[email protected]>
Diffstat (limited to 'src/intel/tools/aubinator.c')
-rw-r--r--src/intel/tools/aubinator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index f3bd006a8ab..4dc1fefaa5a 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -142,6 +142,7 @@ handle_execlist_write(void *user_data, enum drm_i915_gem_engine_class engine, ui
uint32_t ring_buffer_head = context[5];
uint32_t ring_buffer_tail = context[7];
uint32_t ring_buffer_start = context[9];
+ uint32_t ring_buffer_length = (context[11] & 0x1ff000) + 4096;
mem.pml4 = (uint64_t)context[49] << 32 | context[51];
batch_ctx.user_data = &mem;
@@ -158,7 +159,8 @@ handle_execlist_write(void *user_data, enum drm_i915_gem_engine_class engine, ui
}
batch_ctx.engine = engine;
- gen_print_batch(&batch_ctx, commands, ring_buffer_tail - ring_buffer_head,
+ gen_print_batch(&batch_ctx, commands,
+ MIN2(ring_buffer_tail - ring_buffer_head, ring_buffer_length),
0);
aub_mem_clear_bo_maps(&mem);
}