Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump

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>
(cherry picked from commit cb1f868ca13756c0c18ba54d1591332476760d07)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

José Roberto de Souza and committed by
Rodrigo Vivi
643f209b 0c455f3a

+6 -3
+4 -2
drivers/gpu/drm/xe/xe_guc_ct.c
··· 1723 1723 drm_printf(p, "\tg2h outstanding: %d\n", 1724 1724 snapshot->g2h_outstanding); 1725 1725 1726 - if (snapshot->ctb) 1727 - xe_print_blob_ascii85(p, "CTB data", '\n', 1726 + if (snapshot->ctb) { 1727 + drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size); 1728 + xe_print_blob_ascii85(p, "[CTB].data", '\n', 1728 1729 snapshot->ctb, 0, snapshot->ctb_size); 1730 + } 1729 1731 } else { 1730 1732 drm_puts(p, "CT disabled\n"); 1731 1733 }
+2 -1
drivers/gpu/drm/xe/xe_guc_log.c
··· 208 208 drm_printf(p, "GuC timestamp: 0x%08llX [%llu]\n", snapshot->stamp, snapshot->stamp); 209 209 drm_printf(p, "Log level: %u\n", snapshot->level); 210 210 211 + drm_printf(p, "[LOG].length: 0x%lx\n", snapshot->size); 211 212 remain = snapshot->size; 212 213 for (i = 0; i < snapshot->num_chunks; i++) { 213 214 size_t size = min(GUC_LOG_CHUNK_SIZE, remain); 214 - const char *prefix = i ? NULL : "Log data"; 215 + const char *prefix = i ? NULL : "[LOG].data"; 215 216 char suffix = i == snapshot->num_chunks - 1 ? '\n' : 0; 216 217 217 218 xe_print_blob_ascii85(p, prefix, suffix, snapshot->copy[i], 0, size);