From 50e952840f5a194af0e89fac3383a0c32132f065 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Toni=20L=C3=B6nnberg?= Date: Mon, 29 Oct 2018 16:05:10 +0200 Subject: [PATCH] intel: tools: Add handling for video pipe Preliminary work for adding handling of different pipes to gen_decoder. We need to be able to distinguish between different pipes in order to decode the packets correctly due to opcode re-use. Reviewed-by: Lionel Landwerlin --- src/intel/tools/aub_read.c | 26 ++++++++++++++++++++++++++ src/intel/tools/aub_read.h | 5 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/intel/tools/aub_read.c b/src/intel/tools/aub_read.c index 5b704e8..d83e88d 100644 --- a/src/intel/tools/aub_read.c +++ b/src/intel/tools/aub_read.c @@ -153,6 +153,9 @@ handle_trace_block(struct aub_read *read, const uint32_t *p) case AUB_TRACE_TYPE_RING_PRB0: engine = GEN_ENGINE_RENDER; break; + case AUB_TRACE_TYPE_RING_PRB1: + engine = GEN_ENGINE_VIDEO; + break; case AUB_TRACE_TYPE_RING_PRB2: engine = GEN_ENGINE_BLITTER; break; @@ -193,6 +196,16 @@ handle_memtrace_reg_write(struct aub_read *read, const uint32_t *p) context_descriptor = (uint64_t)read->render_elsp[2] << 32 | read->render_elsp[3]; break; + case 0x12230: /* video elsp */ + read->video_elsp[read->video_elsp_index++] = value; + if (read->video_elsp_index < 4) + return; + + read->video_elsp_index = 0; + engine = GEN_ENGINE_VIDEO; + context_descriptor = (uint64_t)read->video_elsp[2] << 32 | + read->video_elsp[3]; + break; case 0x22230: /* blitter elsp */ read->blitter_elsp[read->blitter_elsp_index++] = value; if (read->blitter_elsp_index < 4) @@ -211,6 +224,14 @@ handle_memtrace_reg_write(struct aub_read *read, const uint32_t *p) read->render_elsp[2] = value; return; break; + case 0x12510: /* video elsq0 lo */ + read->video_elsp[3] = value; + return; + break; + case 0x12514: /* video elsq0 hi */ + read->video_elsp[2] = value; + return; + break; case 0x22510: /* blitter elsq0 lo */ read->blitter_elsp[3] = value; return; @@ -224,6 +245,11 @@ handle_memtrace_reg_write(struct aub_read *read, const uint32_t *p) context_descriptor = (uint64_t)read->render_elsp[2] << 32 | read->render_elsp[3]; break; + case 0x12550: /* video_elsc */ + engine = GEN_ENGINE_VIDEO; + context_descriptor = (uint64_t)read->video_elsp[2] << 32 | + read->video_elsp[3]; + break; case 0x22550: /* blitter elsc */ engine = GEN_ENGINE_BLITTER; context_descriptor = (uint64_t)read->blitter_elsp[2] << 32 | diff --git a/src/intel/tools/aub_read.h b/src/intel/tools/aub_read.h index 3502c08..e48ac31 100644 --- a/src/intel/tools/aub_read.h +++ b/src/intel/tools/aub_read.h @@ -35,7 +35,8 @@ extern "C" { enum gen_engine { GEN_ENGINE_RENDER = 1, - GEN_ENGINE_BLITTER = 2, + GEN_ENGINE_VIDEO = 2, + GEN_ENGINE_BLITTER = 3, }; struct aub_read { @@ -62,6 +63,8 @@ struct aub_read { /* Reader's data */ uint32_t render_elsp[4]; int render_elsp_index; + uint32_t video_elsp[4]; + int video_elsp_index; uint32_t blitter_elsp[4]; int blitter_elsp_index; -- 2.7.4