intel/tools/aubinator_error_decode: Decode ring buffers from HEAD to TAIL
authorD Scott Phillips <d.scott.phillips@intel.com>
Fri, 20 Mar 2020 17:15:57 +0000 (10:15 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 23 Mar 2020 19:10:50 +0000 (19:10 +0000)
commit1182a3934a5d935b792b801656161da338962004
tree5eeaa9b9ca110f2ed591338cd7bc4dafb3cd74f3
parent84e707e6f2292dd886b8385fab0ced5122e35876
intel/tools/aubinator_error_decode: Decode ring buffers from HEAD to TAIL

Capture the HEAD and TAIL register values from the dump and
properly index the ring buffer using those. Previously we would
decode the ring buffer from the beginning, printing out whatever
happened to be there.

Also, properly pass the `from_ring` parameter to gen_print_batch()
so that decoding doesn't stop once MI_BATCH_BUFFER_END is
encoutered.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4261>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4261>
src/intel/tools/aubinator_error_decode.c