From e8d9b76f6390459b2f7e2aa6ae8b74275f66c791 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 1 Mar 2017 14:39:58 +0000 Subject: intel: tools: add aubinator_error_decode tool This is pretty much the same tool as what i-g-t has, only with a more fancy decoding of the instructions/registers. It also doesn't support anything before gen4. v2 (from Matt): Drop authors Remove undefined automake variable v3: Fix incorrect offsets for dword > 1 (Jordan) v4: Fix decompression error with large blobs (Jordan) Signed-off-by: Lionel Landwerlin Acked-by: Matt Turner --- src/intel/common/gen_decoder.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/intel/common/gen_decoder.c') diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 6cc6896b057..1ae78c88e3f 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -108,6 +108,17 @@ gen_spec_find_register(struct gen_spec *spec, uint32_t offset) return NULL; } +struct gen_group * +gen_spec_find_register_by_name(struct gen_spec *spec, const char *name) +{ + for (int i = 0; i < spec->nregisters; i++) { + if (strcmp(spec->registers[i]->name, name) == 0) + return spec->registers[i]; + } + + return NULL; +} + struct gen_enum * gen_spec_find_enum(struct gen_spec *spec, const char *name) { -- cgit v1.2.3