Reviewed-by: Toni Lönnberg <toni.lonnb...@intel.com>
On Fri, Nov 09, 2018 at 04:49:10PM +0000, Lionel Landwerlin wrote: > Use this value to limit reading the ring buffer. > > Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> > --- > src/intel/tools/aubinator.c | 4 +++- > src/intel/tools/aubinator_viewer.cpp | 3 ++- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c > index 1458875a313..04d920d98e5 100644 > --- a/src/intel/tools/aubinator.c > +++ b/src/intel/tools/aubinator.c > @@ -143,6 +143,7 @@ handle_execlist_write(void *user_data, enum gen_engine > engine, uint64_t context_ > 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; > @@ -159,7 +160,8 @@ handle_execlist_write(void *user_data, enum gen_engine > engine, uint64_t context_ > } > > (void)engine; /* TODO */ > - 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); > } > diff --git a/src/intel/tools/aubinator_viewer.cpp > b/src/intel/tools/aubinator_viewer.cpp > index 27ef4f7e99b..dac03472153 100644 > --- a/src/intel/tools/aubinator_viewer.cpp > +++ b/src/intel/tools/aubinator_viewer.cpp > @@ -722,6 +722,7 @@ display_batch_execlist_write(void *user_data, enum > gen_engine engine, > 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]; > > @@ -733,7 +734,7 @@ display_batch_execlist_write(void *user_data, enum > gen_engine engine, > window->uses_ppgtt = true; > > 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); > } > > -- > 2.19.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev