[Intel-xe] [PATCH] drm/xe: Always log GuC/HuC firmware versions

Matthew Brost matthew.brost at intel.com
Thu Apr 6 06:22:43 UTC 2023


On Wed, Apr 05, 2023 at 03:47:25PM -0700, Lucas De Marchi wrote:
> When debugging issues related to GuC/HuC, it's important to know what is
> the firmware version being used. The version from the filename can't be
> relied upon, also because it normally only contains the major version
> (except for the ones under experimental support).
> 
> Log the version from the blob after reading the CSS header. Example:
> 
> 	xe 0000:03:00.0: [drm] Using GuC firmware (70.5) from i915/dg2_guc_70.bin
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_uc_fw.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index cd3cbc8981a2..1590c9822f91 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -395,6 +395,11 @@ int xe_uc_fw_init(struct xe_uc_fw *uc_fw)
>  	uc_fw->minor_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MINOR,
>  					   css->sw_version);
>  
> +	drm_info(&xe->drm, "Using %s firmware (%u.%u) from %s\n",
> +		 xe_uc_fw_type_repr(uc_fw->type),
> +		 uc_fw->major_ver_found, uc_fw->minor_ver_found,
> +		 uc_fw->path);
> +
>  	err = uc_fw_check_version_requirements(uc_fw);
>  	if (err)
>  		goto fail;
> -- 
> 2.39.0
> 


More information about the Intel-xe mailing list