[PATCH 2/3] drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump

Lucas De Marchi lucas.demarchi at intel.com
Thu Jan 23 19:12:31 UTC 2025


On Thu, Jan 23, 2025 at 09:59:42AM -0800, Jose Souza wrote:
>All other binaries follow this format:

To be clear, since the other ones are not using the helper function:

         drm_printf(p, "\t[HWSP].length: 0x%x\n", LRC_PPHWSP_SIZE);

         drm_printf(p, "\n\t[HWCTX].length: 0x%lx\n", snapshot->lrc_size - LRC_PPHWSP_SIZE);

         drm_printf(p, "[%llx].length: 0x%lx\n", snap->snap[i].ofs, snap->snap[i].len);

and I double checked all of them have .length meaning the decoded
length, so ack on this.

>[name].length: 0x1000
>[name].data: xxxxxxx
>[name].error: errno
>
>The error ones is just in case by some reason was not able to capture
>binary.
>
>So this GuC binaries should follow the same patern.
>
>Cc: John Harrison <John.C.Harrison at Intel.com>
>Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
>---
> drivers/gpu/drm/xe/xe_guc_ct.c  | 6 ++++--
> drivers/gpu/drm/xe/xe_guc_log.c | 3 ++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
>index 50c8076b51585..497036675a38c 100644
>--- a/drivers/gpu/drm/xe/xe_guc_ct.c
>+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
>@@ -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");
> 	}
>diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c
>index 44482ea919924..462ec4bb98bb9 100644
>--- a/drivers/gpu/drm/xe/xe_guc_log.c
>+++ b/drivers/gpu/drm/xe/xe_guc_log.c
>@@ -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, "[GUC].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 : "[GUC].data";

as mentioned in the other thread, name is not optimal. And remember to
change on the .length too.  With that changed,

	Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>


Lucas De Marchi

> 		char suffix = i == snapshot->num_chunks - 1 ? '\n' : 0;
>
> 		xe_print_blob_ascii85(p, prefix, suffix, snapshot->copy[i], 0, size);
>-- 
>2.48.1
>


More information about the Intel-xe mailing list