[PATCH 2/3] drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump
Souza, Jose
jose.souza at intel.com
Thu Jan 23 18:45:04 UTC 2025
On Thu, 2025-01-23 at 10:17 -0800, John Harrison wrote:
> On 1/23/2025 09:59, José Roberto de Souza wrote:
> > All other binaries follow this format:
> > [name].length: 0x1000
> > [name].data: xxxxxxx
> > [name].error: errno
> What is the purpose of including the name in []?
Make easy to identify if the line is a binary dump line or not.
We have that pattern and should follow now.
>
> >
> > 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";
> This is not printing the GuC firmware image, it is the GuC log buffer.
> It should be called 'Log' not 'GUC'.
okay, GUC_LOG would be better or just LOG? will change that.
>
> John.
>
> > char suffix = i == snapshot->num_chunks - 1 ? '\n' : 0;
> >
> > xe_print_blob_ascii85(p, prefix, suffix, snapshot->copy[i], 0, size);
>
More information about the Intel-xe
mailing list