From 25443cbb72048900f3ff06fdb7a68aef6eea39ff Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 9 Nov 2018 16:49:10 +0000 Subject: intel/decoders: read ring buffer length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use this value to limit reading the ring buffer. Signed-off-by: Lionel Landwerlin Reviewed-by: Toni Lönnberg --- src/intel/tools/aubinator_viewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/intel/tools/aubinator_viewer.cpp') diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index d3638c70011..e7034fa8892 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -723,6 +723,7 @@ display_batch_execlist_write(void *user_data, uint32_t ring_buffer_head = context_img[5]; uint32_t ring_buffer_tail = context_img[7]; uint32_t ring_buffer_start = context_img[9]; + uint32_t ring_buffer_length = (context_img[11] & 0x1ff000) + 4096; window->mem.pml4 = (uint64_t)context_img[49] << 32 | context_img[51]; @@ -735,7 +736,7 @@ display_batch_execlist_write(void *user_data, window->decode_ctx.engine = engine; aub_viewer_render_batch(&window->decode_ctx, commands, - ring_buffer_tail - ring_buffer_head, + MIN2(ring_buffer_tail - ring_buffer_head, ring_buffer_length), ring_buffer_start); } -- cgit v1.2.3