intel/tools: Fix Xe KMD error dump parser

Xe KMD originally put the exec queue snapshot in the wrong topic,
XE_TOPIC_GUC_CT. Add it to the right one while still keeping a fallback
to the previous place so the new version of the tool is able to parse
both before and after the kernel change.

Based on previous version by José Roberto de Souza <jose.souza@intel.com>
at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32617

Cc: stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33177>
This commit is contained in:
Lucas De Marchi 2025-01-22 20:59:29 -08:00 committed by Marge Bot
parent 220590f41a
commit 1bd6a2efe1
4 changed files with 14 additions and 2 deletions

View file

@ -219,7 +219,12 @@ read_xe_data_file(FILE *file,
break;
}
case XE_TOPIC_GUC_CT: {
case XE_TOPIC_GUC_CT:
/*
* Workaround bug in the kernel that would put the exec queue dump
* in the wrong place, under "GuC CT" topic.
*/
case XE_TOPIC_CONTEXT: {
enum xe_vm_topic_type type;
const char *value_ptr;
bool is_hw_ctx;

View file

@ -48,7 +48,12 @@ read_xe_data_file(FILE *dump_file, FILE *hang_dump_file, bool verbose)
break;
}
case XE_TOPIC_GUC_CT: {
case XE_TOPIC_GUC_CT:
/*
* Workaround bug in the kernel that would put the exec queue dump
* in the wrong place, under "GuC CT" topic.
*/
case XE_TOPIC_CONTEXT: {
enum xe_vm_topic_type type;
const char *value_ptr;
bool is_hw_ctx;

View file

@ -79,6 +79,7 @@ error_decode_xe_decode_topic(const char *line, enum xe_topic *new_topic)
"**** Job ****",
"**** HW Engines ****",
"**** VM state ****",
"**** Contexts ****",
};
bool topic_changed = false;

View file

@ -14,6 +14,7 @@ enum xe_topic {
XE_TOPIC_JOB,
XE_TOPIC_HW_ENGINES,
XE_TOPIC_VM,
XE_TOPIC_CONTEXT,
XE_TOPIC_INVALID,
};