intel: tools: Add handling for video pipe
authorToni Lönnberg <toni.lonnberg@intel.com>
Mon, 29 Oct 2018 14:05:10 +0000 (16:05 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 30 Oct 2018 12:43:00 +0000 (12:43 +0000)
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 <lionel.g.landwerlin@intel.com>
src/intel/tools/aub_read.c
src/intel/tools/aub_read.h

index 5b704e8f78b7fd572c251a685a98617311a8f0c6..d83e88ddced0ceb186c0f8fc49e85abd36298351 100644 (file)
@@ -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 |
index 3502c0887bb5fb8e32794cfe1d0c0797d6a1dbf0..e48ac3164bc42d5f4e5bff4aedc81687b62705fd 100644 (file)
@@ -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;