drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump
authorJosé Roberto de Souza <jose.souza@intel.com>
Thu, 23 Jan 2025 20:22:04 +0000 (12:22 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 28 Jan 2025 03:41:07 +0000 (19:41 -0800)
All other(hwsp, hwctx and vmas) binaries follow this format:
[name].length: 0x1000
[name].data: xxxxxxx
[name].error: errno

The error one is just in case by some reason it was not able to
capture the binary.

So this GuC binaries should follow the same patern.

v2:
- renamed GUC binary to LOG

Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250123202307.95103-3-jose.souza@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_guc_ct.c
drivers/gpu/drm/xe/xe_guc_log.c

index 50c8076b51585219a599bc1f95055b709777ba20..497036675a38c6b406741a0dcbebefd22eef5283 100644 (file)
@@ -1723,9 +1723,11 @@ void xe_guc_ct_snapshot_print(struct xe_guc_ct_snapshot *snapshot,
                drm_printf(p, "\tg2h outstanding: %d\n",
                           snapshot->g2h_outstanding);
 
-               if (snapshot->ctb)
-                       xe_print_blob_ascii85(p, "CTB data", '\n',
+               if (snapshot->ctb) {
+                       drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size);
+                       xe_print_blob_ascii85(p, "[CTB].data", '\n',
                                              snapshot->ctb, 0, snapshot->ctb_size);
+               }
        } else {
                drm_puts(p, "CT disabled\n");
        }
index 44482ea919924c0a4b0990615a9011d2b2cf26d9..ab97ac728d7a863e7205b3e9f56420869957ccad 100644 (file)
@@ -204,10 +204,11 @@ void xe_guc_log_snapshot_print(struct xe_guc_log_snapshot *snapshot, struct drm_
        drm_printf(p, "GuC timestamp: 0x%08llX [%llu]\n", snapshot->stamp, snapshot->stamp);
        drm_printf(p, "Log level: %u\n", snapshot->level);
 
+       drm_printf(p, "[LOG].length: 0x%lx\n", snapshot->size);
        remain = snapshot->size;
        for (i = 0; i < snapshot->num_chunks; i++) {
                size_t size = min(GUC_LOG_CHUNK_SIZE, remain);
-               const char *prefix = i ? NULL : "Log data";
+               const char *prefix = i ? NULL : "[LOG].data";
                char suffix = i == snapshot->num_chunks - 1 ? '\n' : 0;
 
                xe_print_blob_ascii85(p, prefix, suffix, snapshot->copy[i], 0, size);