From: Lionel Landwerlin Date: Tue, 24 Dec 2019 01:34:07 +0000 (+0200) Subject: intel/aub_error_decoder: print driver identifier if found X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db9e16450dac9925c0763de1971c6e18de7944f3;p=mesa.git intel/aub_error_decoder: print driver identifier if found You can find it right before the application batch : HuC firmware: i915/kbl_huc_ver02_00_1810.bin status: fetch NONE, load NONE version: wanted 2.0, found 0.0 header: offset 0, size 0 uCode: offset 0, size 0 RSA: offset 0, size 0 Driver identifier: i965 20.0.0-devel --- batch buffer (rcs0 (submitted by glxgears [44455])) at 0x0000fffe ec000000 0xfffeec000000: 0x70000007: MEDIA_VFE_STATE 0xfffeec000000: 0x70000007 : Dword 0 DWord Length: 7 0xfffeec000004: 0x00000000 : Dword 1 Per Thread Scratch Space: 0 Signed-off-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index 939581cc541..6a4d42e53c2 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -39,6 +39,7 @@ #include #include "common/gen_decoder.h" +#include "dev/gen_debug.h" #include "util/macros.h" #define CSI "\e[" @@ -635,6 +636,22 @@ read_data_file(FILE *file) sections[s].dword_count = (ring_tail - ring_head) / sizeof(uint32_t); } + for (int s = 0; s < num_sections; s++) { + if (sections[s].dword_count * 4 > intel_debug_identifier_size() && + memcmp(sections[s].data, intel_debug_identifier(), + intel_debug_identifier_size()) == 0) { + const struct gen_debug_block_driver *driver_desc = + intel_debug_get_identifier_block(sections[s].data, + sections[s].dword_count * 4, + GEN_DEBUG_BLOCK_TYPE_DRIVER); + if (driver_desc) { + printf("Driver identifier: %s\n", + (const char *) driver_desc->description); + } + break; + } + } + enum gen_batch_decode_flags batch_flags = 0; if (option_color == COLOR_ALWAYS) batch_flags |= GEN_BATCH_DECODE_IN_COLOR;