[Mesa-dev] [PATCH] aubinator_error_decode: Compare only the class_name of the ring.

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 20 18:09:46 UTC 2018


Quoting Lionel Landwerlin (2018-03-20 16:39:18)
> On 20/03/18 16:30, Chris Wilson wrote:
> > Quoting Rafael Antognolli (2018-03-20 16:13:08)
> >> ring_name is "<class_name> + <instance_id>" (e.g. rcs0). So we need to
> >> first compare the class name only, then get the instance id.
> >>
> >> Without this, INSTDONE is not being decoded.
> >>
> >> Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
> >> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> >> ---
> >>   src/intel/tools/aubinator_error_decode.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
> >> index 017be5bbc2b..db880d74a9e 100644
> >> --- a/src/intel/tools/aubinator_error_decode.c
> >> +++ b/src/intel/tools/aubinator_error_decode.c
> >> @@ -120,7 +120,7 @@ static int ring_name_to_class(const char *ring_name,
> >>         [VECS] = "vecs",
> >>      };
> >>      for (size_t i = 0; i < ARRAY_SIZE(class_names); i++) {
> >> -      if (strcmp(ring_name, class_names[i]))
> >> +      if (strncmp(ring_name, class_names[i], strlen(class_names[i])))
> > Gah, I remember noticing this and completely forgot to send a patch.
> >
> > Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> >
> > Thanks,
> > -Chris
> >
> 
> Just an idea, but maybe sending the addresses of the registers from the 
> kernel would help?

I'm open to suggestions. And yeah, just a plain dump like

registers:
  - 0x1200: { name: UGLY_BSPEC_NAME_IF_WE_CAN_BE_BOTHERED, value: 0xdeadbeef}
  - 0x1204: 0x0c0ffee
 
will be on my wishlist.

Maybe just call it error.yaml and phase out the old error in a decade.
-Chris


More information about the mesa-dev mailing list