[Mesa-dev] [PATCH] intel: tools: Add handling for video pipe

Toni Lönnberg toni.lonnberg at intel.com
Mon Oct 29 15:50:37 UTC 2018


Hadn't noticed your patch series before, sorry for that. I'd like to get rid
of the magic numbers for the registers and have the code use the definitions
instead for sure.

Can you push this one in?

On Mon, Oct 29, 2018 at 03:36:12PM +0000, Lionel Landwerlin wrote:
> Looks correct to me. Maybe you'll find something useful from this series :
> https://patchwork.freedesktop.org/series/50135/
> 
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> 
> On 29/10/2018 14:05, Toni Lönnberg wrote:
> > 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.
> > ---
> >   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 5b704e8f78b..d83e88ddced 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 3502c0887bb..e48ac3164bc 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;
> 
> 


More information about the mesa-dev mailing list