Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John.C.Harrison@Intel.com
To: Intel-Xe@Lists.FreeDesktop.Org
Cc: John Harrison <John.C.Harrison@Intel.com>
Subject: [PATCH v2 1/3] drm/xe/guc: Explicitly name each chunk of GuC log data in a dump
Date: Wed, 22 Jan 2025 15:33:02 -0800	[thread overview]
Message-ID: <20250122233305.3667730-2-John.C.Harrison@Intel.com> (raw)
In-Reply-To: <20250122233305.3667730-1-John.C.Harrison@Intel.com>

From: John Harrison <John.C.Harrison@Intel.com>

A mesa devcoredump decoding tool does not cope with line wrapped
ASCII85 data. The GuC log is saved and printed in chunks. Only the
first chunk was named, thus subsequent chunks were effectively line
wrapped data. So add names to all the chunks instead.

v2: Fix size of name variable.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
---
 drivers/gpu/drm/xe/xe_guc_log.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c
index 80151ff6a71f..d10ba20685fe 100644
--- a/drivers/gpu/drm/xe/xe_guc_log.c
+++ b/drivers/gpu/drm/xe/xe_guc_log.c
@@ -207,8 +207,10 @@ void xe_guc_log_snapshot_print(struct xe_guc_log_snapshot *snapshot, struct drm_
 	remain = snapshot->size;
 	for (i = 0; i < snapshot->num_chunks; i++) {
 		size_t size = min(GUC_LOG_CHUNK_SIZE, remain);
+		char name[22];
 
-		xe_print_blob_ascii85(p, i ? NULL : "Log data", snapshot->copy[i], 0, size);
+		snprintf(name, sizeof(name), "Log data %d", i);
+		xe_print_blob_ascii85(p, name, snapshot->copy[i], 0, size);
 		remain -= size;
 	}
 }
-- 
2.47.0


  reply	other threads:[~2025-01-22 23:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 23:33 [PATCH v2 0/3] Re-instate GuC logs in debugfs & devcoredump John.C.Harrison
2025-01-22 23:33 ` John.C.Harrison [this message]
2025-01-22 23:33 ` [PATCH v2 2/3] drm/xe/devcoredump: Temporarily disable the line wrapping of ASCII85 output John.C.Harrison
2025-01-22 23:33 ` [PATCH v2 3/3] Partially revert "drm/xe: Revert some changes that break a mesa debug tool" John.C.Harrison
2025-01-23  0:02 ` ✓ CI.Patch_applied: success for Re-instate GuC logs in debugfs & devcoredump (rev2) Patchwork
2025-01-23  0:02 ` ✓ CI.checkpatch: " Patchwork
2025-01-23  0:03 ` ✓ CI.KUnit: " Patchwork
2025-01-23  0:20 ` ✓ CI.Build: " Patchwork
2025-01-23  0:22 ` ✓ CI.Hooks: " Patchwork
2025-01-23  0:24 ` ✓ CI.checksparse: " Patchwork
2025-01-23  0:50 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-23 12:18 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250122233305.3667730-2-John.C.Harrison@Intel.com \
    --to=john.c.harrison@intel.com \
    --cc=Intel-Xe@Lists.FreeDesktop.Org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox