[PATCH] drm/xe: Revert some changes that break a mesa debug tool

Cavitt, Jonathan jonathan.cavitt at intel.com
Fri Dec 13 19:02:03 UTC 2024


-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of John.C.Harrison at Intel.com
Sent: Friday, December 13, 2024 9:29 AM
To: Intel-Xe at Lists.FreeDesktop.Org
Cc: Harrison, John C <john.c.harrison at intel.com>; Filipchuk, Julia <julia.filipchuk at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>; Thomas Hellström <thomas.hellstrom at linux.intel.com>; Vivi, Rodrigo <rodrigo.vivi at intel.com>; intel-xe at lists.freedesktop.org
Subject: [PATCH] drm/xe: Revert some changes that break a mesa debug tool
> 
> From: John Harrison <John.C.Harrison at Intel.com>
> 
> There is a mesa debug tool for decoding devcoredump files. Recent
> changes to improve the devcoredump output broke that tool. So revert
> the changes until the tool can be extended to support the new fields.
> 
> Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
> Fixes: c28fd6c358db ("drm/xe/devcoredump: Improve section headings and add tile info")
> Fixes: ec1455ce7e35 ("drm/xe/devcoredump: Add ASCII85 dump helper function")
> Cc: John Harrison <John.C.Harrison at Intel.com>
> Cc: Julia Filipchuk <julia.filipchuk at intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Cc: "Thomas Hellström" <thomas.hellstrom at linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: intel-xe at lists.freedesktop.org

Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>

Though, we should definitely confirm with the Mesa team that the Mesa issue
this patch resolves is actually, well, resolved.

Forwarding to @Souza, Jose for confirmation.
-Jonathan Cavitt

> ---
>  drivers/gpu/drm/xe/xe_devcoredump.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
> index 71636e80b71d..6980304c8903 100644
> --- a/drivers/gpu/drm/xe/xe_devcoredump.c
> +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
> @@ -119,7 +119,11 @@ static ssize_t __xe_devcoredump_read(char *buffer, size_t count,
>  	drm_puts(&p, "\n**** GuC CT ****\n");
>  	xe_guc_ct_snapshot_print(ss->guc.ct, &p);
>  
> -	drm_puts(&p, "\n**** Contexts ****\n");
> +	/*
> +	 * Don't add a new section header here because the mesa debug decoder
> +	 * tool expects the context information to be in the 'GuC CT' section.
> +	 */
> +	/* drm_puts(&p, "\n**** Contexts ****\n"); */
>  	xe_guc_exec_queue_snapshot_print(ss->ge, &p);
>  
>  	drm_puts(&p, "\n**** Job ****\n");
> @@ -416,6 +420,15 @@ void xe_print_blob_ascii85(struct drm_printer *p, const char *prefix,
>  	char buff[ASCII85_BUFSZ], *line_buff;
>  	size_t line_pos = 0;
>  
> +	/*
> +	 * Splitting blobs across multiple lines is not compatible with the mesa
> +	 * debug decoder tool. Note that even dropping the explicit '\n' below
> +	 * doesn't help because the GuC log is so big some underlying implementation
> +	 * still splits the lines at 512K characters. So just bail completely for
> +	 * the moment.
> +	 */
> +	return;
> +
>  #define DMESG_MAX_LINE_LEN	800
>  #define MIN_SPACE		(ASCII85_BUFSZ + 2)		/* 85 + "\n\0" */
>  
> -- 
> 2.47.0
> 
> 


More information about the Intel-xe mailing list