Commit70fb86a85d
("drm/xe: Revert some changes that break a mesa debug tool") partially reverted some changes to workaround breakage caused to mesa tools. However, in doing so it also broke fetching the GuC log via debugfs since xe_print_blob_ascii85() simply bails out. The fix is to avoid the extra newlines: the devcoredump interface is line-oriented and adding random newlines in the middle breaks it. If a tool is able to parse it by looking at the data and checking for chars that are out of the ascii85 space, it can still do so. A format change that breaks the line-oriented output on devcoredump however needs better coordination with existing tools. v2: Add suffix description comment v3: Reword explanation of xe_print_blob_ascii85() calling drm_puts() in a loop Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Julia Filipchuk <julia.filipchuk@intel.com> Cc: José Roberto de Souza <jose.souza@intel.com> Cc: stable@vger.kernel.org Fixes:70fb86a85d
("drm/xe: Revert some changes that break a mesa debug tool") Fixes:ec1455ce7e
("drm/xe/devcoredump: Add ASCII85 dump helper function") Link: https://patchwork.freedesktop.org/patch/msgid/20250123202307.95103-2-jose.souza@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 2c95bbf5002776117a69caed3b31c10bf7341bec) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
35 lines
770 B
C
35 lines
770 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_DEVCOREDUMP_H_
|
|
#define _XE_DEVCOREDUMP_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_printer;
|
|
struct xe_device;
|
|
struct xe_exec_queue;
|
|
struct xe_sched_job;
|
|
|
|
#ifdef CONFIG_DEV_COREDUMP
|
|
void xe_devcoredump(struct xe_exec_queue *q, struct xe_sched_job *job, const char *fmt, ...);
|
|
int xe_devcoredump_init(struct xe_device *xe);
|
|
#else
|
|
static inline void xe_devcoredump(struct xe_exec_queue *q,
|
|
struct xe_sched_job *job,
|
|
const char *fmt, ...)
|
|
{
|
|
}
|
|
|
|
static inline int xe_devcoredump_init(struct xe_device *xe)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
void xe_print_blob_ascii85(struct drm_printer *p, const char *prefix, char suffix,
|
|
const void *blob, size_t offset, size_t size);
|
|
|
|
#endif
|