From: José Roberto de Souza <[email protected]>

[ Upstream commit 643f209ba3fdd4099416aaf9efa8266f7366d6fb ]

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 <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
Link: 
https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
(cherry picked from commit cb1f868ca13756c0c18ba54d1591332476760d07)
Signed-off-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
 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 6eabf7a9d3b07..b527f34b979be 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -1699,9 +1699,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 2baa4d95571fb..2457572ed86ad 100644
--- a/drivers/gpu/drm/xe/xe_guc_log.c
+++ b/drivers/gpu/drm/xe/xe_guc_log.c
@@ -208,10 +208,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);
-- 
2.39.5

Reply via email to