diff --git a/src/intel/tools/aubinator_error_decode_xe.c b/src/intel/tools/aubinator_error_decode_xe.c index eb7538c4d4a..687666184f3 100644 --- a/src/intel/tools/aubinator_error_decode_xe.c +++ b/src/intel/tools/aubinator_error_decode_xe.c @@ -105,7 +105,7 @@ read_xe_data_file(FILE *file, struct xe_vm xe_vm; char *line = NULL; size_t line_size; - enum xe_topic xe_topic = XE_TOPIC_INVALID; + enum xe_topic xe_topic = XE_TOPIC_UNKNOWN; error_decode_xe_vm_init(&xe_vm); diff --git a/src/intel/tools/error2hangdump_xe.c b/src/intel/tools/error2hangdump_xe.c index 2d27290fcff..e3e3886e832 100644 --- a/src/intel/tools/error2hangdump_xe.c +++ b/src/intel/tools/error2hangdump_xe.c @@ -18,7 +18,7 @@ void read_xe_data_file(FILE *dump_file, FILE *hang_dump_file, bool verbose) { - enum xe_topic xe_topic = XE_TOPIC_INVALID; + enum xe_topic xe_topic = XE_TOPIC_UNKNOWN; uint32_t *vm_entry_data = NULL; uint32_t vm_entry_len = 0; struct xe_vm xe_vm; diff --git a/src/intel/tools/error_decode_xe_lib.c b/src/intel/tools/error_decode_xe_lib.c index d89af6675ee..b7dd782e306 100644 --- a/src/intel/tools/error_decode_xe_lib.c +++ b/src/intel/tools/error_decode_xe_lib.c @@ -81,11 +81,13 @@ error_decode_xe_decode_topic(const char *line, enum xe_topic *new_topic) "**** VM state ****", "**** Contexts ****", }; - bool topic_changed = false; + const bool topic_changed = strncmp("**** ", line, strlen("**** ")) == 0; + + if (topic_changed) + *new_topic = XE_TOPIC_UNKNOWN; for (int i = 0; i < ARRAY_SIZE(xe_topic_strings); i++) { if (strncmp(xe_topic_strings[i], line, strlen(xe_topic_strings[i])) == 0) { - topic_changed = true; *new_topic = i; break; } diff --git a/src/intel/tools/error_decode_xe_lib.h b/src/intel/tools/error_decode_xe_lib.h index 6a44f3bf141..40a84d8a57e 100644 --- a/src/intel/tools/error_decode_xe_lib.h +++ b/src/intel/tools/error_decode_xe_lib.h @@ -15,7 +15,7 @@ enum xe_topic { XE_TOPIC_HW_ENGINES, XE_TOPIC_VM, XE_TOPIC_CONTEXT, - XE_TOPIC_INVALID, + XE_TOPIC_UNKNOWN, }; enum xe_vm_topic_type {