drm/xe/guc: Dump entire CTB on errors
authorJohn Harrison <John.C.Harrison@Intel.com>
Thu, 3 Oct 2024 00:46:09 +0000 (17:46 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Tue, 8 Oct 2024 01:35:00 +0000 (18:35 -0700)
commitd7c925b2995f5cae3ad405f8988ad821d0dd0287
treea1074d40677f52f8da74b14bbb3ccb77743cb925
parentd2c5a5a926f43b2e42c5c955f917bad8ad6dd68c
drm/xe/guc: Dump entire CTB on errors

The dump of the CT buffers was only showing the unprocessed data which
is not generally useful for saying why a hang occurred - because it
was probably caused by the commands that were just processed. So save
and dump the entire buffer but in a more compact dump format. Also
zero fill it on allocation to avoid confusion over uninitialised data
in the dump.

v2: Add kerneldoc - review feedback from Michal W.
v3: Fix kerneldoc.
v4: Use ascii85 instead of hexdump (review feedback from Matthew B).
v5: Dump the entire CTB object rather than separately dumping just the
H2G and G2H sections. That way it includes the full header info.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241003004611.2323493-10-John.C.Harrison@Intel.com
drivers/gpu/drm/xe/xe_guc_ct.c
drivers/gpu/drm/xe/xe_guc_ct.h
drivers/gpu/drm/xe/xe_guc_ct_types.h