aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhanjun Dong <[email protected]>2023-08-17 14:30:28 -0700
committerRodrigo Vivi <[email protected]>2023-12-21 11:40:28 -0500
commit14ec22408d2fa1d8671b619474381344b2bc859a (patch)
treedb47566d0e860d2950f47056231a4f4d5dd4627a
parenta043fbab7af54c64017269dc96f43f441ed4bcaf (diff)
drm/xe: Add patch version on guc firmware init
Add patch version info on GuC firmware init. This is required info for GuC log decoder. Signed-off-by: Zhanjun Dong <[email protected]> Reviewed-by: Daniele Ceraolo Spurio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_uc_fw.c13
-rw-r--r--drivers/gpu/drm/xe/xe_uc_fw_types.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
index 1802b280cd8c..37ad238148b0 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.c
+++ b/drivers/gpu/drm/xe/xe_uc_fw.c
@@ -400,11 +400,12 @@ int xe_uc_fw_init(struct xe_uc_fw *uc_fw)
css->sw_version);
uc_fw->minor_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MINOR,
css->sw_version);
+ uc_fw->patch_ver_found = FIELD_GET(CSS_SW_VERSION_UC_PATCH,
+ 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);
+ drm_info(&xe->drm, "Using %s firmware from %s version %u.%u.%u\n",
+ xe_uc_fw_type_repr(uc_fw->type), uc_fw->path,
+ uc_fw->major_ver_found, uc_fw->minor_ver_found, uc_fw->patch_ver_found);
err = uc_fw_check_version_requirements(uc_fw);
if (err)
@@ -531,9 +532,9 @@ void xe_uc_fw_print(struct xe_uc_fw *uc_fw, struct drm_printer *p)
xe_uc_fw_type_repr(uc_fw->type), uc_fw->path);
drm_printf(p, "\tstatus: %s\n",
xe_uc_fw_status_repr(uc_fw->status));
- drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n",
+ drm_printf(p, "\tversion: wanted %u.%u, found %u.%u.%u\n",
uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted,
- uc_fw->major_ver_found, uc_fw->minor_ver_found);
+ uc_fw->major_ver_found, uc_fw->minor_ver_found, uc_fw->patch_ver_found);
drm_printf(p, "\tuCode: %u bytes\n", uc_fw->ucode_size);
drm_printf(p, "\tRSA: %u bytes\n", uc_fw->rsa_size);
diff --git a/drivers/gpu/drm/xe/xe_uc_fw_types.h b/drivers/gpu/drm/xe/xe_uc_fw_types.h
index 837f49a2347e..444bff83cdbe 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw_types.h
+++ b/drivers/gpu/drm/xe/xe_uc_fw_types.h
@@ -106,6 +106,8 @@ struct xe_uc_fw {
u16 major_ver_found;
/** @minor_ver_found: major version found in firmware blob */
u16 minor_ver_found;
+ /** @patch_ver_found: patch version found in firmware blob */
+ u16 patch_ver_found;
/** @rsa_size: RSA size */
u32 rsa_size;