intel/aub_read: reuse defines from gen_context
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 23 Aug 2018 16:07:08 +0000 (17:07 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 7 Mar 2019 15:08:31 +0000 (15:08 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/tools/aub_read.c

index 513da3bf847cbf4c19da1e806a34083ea8fce1d5..07cee073f53d11f18e9f1ff98c0eec85f8a02043 100644 (file)
@@ -31,6 +31,7 @@
 #include "util/macros.h"
 
 #include "aub_read.h"
+#include "gen_context.h"
 #include "intel_aub.h"
 
 #define TYPE(dw)       (((dw) >> 29) & 7)
@@ -186,7 +187,7 @@ handle_memtrace_reg_write(struct aub_read *read, const uint32_t *p)
    uint64_t context_descriptor;
 
    switch (offset) {
-   case 0x2230: /* render elsp */
+   case EXECLIST_SUBMITPORT_RCSUNIT: /* render elsp */
       read->render_elsp[read->render_elsp_index++] = value;
       if (read->render_elsp_index < 4)
          return;
@@ -196,7 +197,7 @@ 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 */
+   case EXECLIST_SUBMITPORT_VCSUNIT0: /* video elsp */
       read->video_elsp[read->video_elsp_index++] = value;
       if (read->video_elsp_index < 4)
          return;
@@ -206,7 +207,7 @@ handle_memtrace_reg_write(struct aub_read *read, const uint32_t *p)
       context_descriptor = (uint64_t)read->video_elsp[2] << 32 |
          read->video_elsp[3];
       break;
-   case 0x22230: /* blitter elsp */
+   case EXECLIST_SUBMITPORT_BCSUNIT: /* blitter elsp */
       read->blitter_elsp[read->blitter_elsp_index++] = value;
       if (read->blitter_elsp_index < 4)
          return;
@@ -216,35 +217,35 @@ handle_memtrace_reg_write(struct aub_read *read, const uint32_t *p)
       context_descriptor = (uint64_t)read->blitter_elsp[2] << 32 |
          read->blitter_elsp[3];
       break;
-   case 0x2510: /* render elsq0 lo */
+   case EXECLIST_SQ_CONTENTS0_RCSUNIT: /* render elsq0 lo */
       read->render_elsp[3] = value;
       return;
-   case 0x2514: /* render elsq0 hi */
+   case (EXECLIST_SQ_CONTENTS0_RCSUNIT + 4): /* render elsq0 hi */
       read->render_elsp[2] = value;
       return;
-   case 0x12510: /* video elsq0 lo */
+   case EXECLIST_SQ_CONTENTS0_VCSUNIT0: /* video elsq0 lo */
       read->video_elsp[3] = value;
       return;
-   case 0x12514: /* video elsq0 hi */
+   case EXECLIST_SQ_CONTENTS0_VCSUNIT0 + 4: /* video elsq0 hi */
       read->video_elsp[2] = value;
       return;
-   case 0x22510: /* blitter elsq0 lo */
+   case EXECLIST_SQ_CONTENTS0_BCSUNIT: /* blitter elsq0 lo */
       read->blitter_elsp[3] = value;
       return;
-   case 0x22514: /* blitter elsq0 hi */
+   case (EXECLIST_SQ_CONTENTS0_BCSUNIT + 4): /* blitter elsq0 hi */
       read->blitter_elsp[2] = value;
       return;
-   case 0x2550: /* render elsc */
+   case EXECLIST_CONTROL_RCSUNIT: /* render elsc */
       engine = I915_ENGINE_CLASS_RENDER;
       context_descriptor = (uint64_t)read->render_elsp[2] << 32 |
          read->render_elsp[3];
       break;
-   case 0x12550: /* video_elsc */
+   case EXECLIST_CONTROL_VCSUNIT0: /* video_elsc */
       engine = I915_ENGINE_CLASS_VIDEO;
       context_descriptor = (uint64_t)read->video_elsp[2] << 32 |
          read->video_elsp[3];
       break;
-   case 0x22550: /* blitter elsc */
+   case EXECLIST_CONTROL_BCSUNIT: /* blitter elsc */
       engine = I915_ENGINE_CLASS_COPY;
       context_descriptor = (uint64_t)read->blitter_elsp[2] << 32 |
          read->blitter_elsp[3];