Skip to content

Commit f7c2ea6

Browse files
committed
drm/xe/gsc: Track the platform in the compatibility version
The GSC compatibility version number is reset for each new platform. To indicate this, the version includes a number that identifies the platform (102 = MTL, 104 = LNL); this matches what happens for the release version, where the major number also identifies a platform. To make it clearer in our logs that the compatibility version is specific to the platform, it is useful to include this platform number. However, given that our binary names already include the platform, it is not necessary to add this extra number there. Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: John Harrison <[email protected]> Cc: Alan Previn <[email protected]> Reviewed-by: Julia Filipchuk <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7293859 commit f7c2ea6

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

drivers/gpu/drm/xe/xe_gsc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,11 @@ static int query_compatibility_version(struct xe_gsc *gsc)
165165
return err;
166166
}
167167

168-
compat->major = version_query_rd(xe, &bo->vmap, rd_offset, compat_major);
169-
compat->minor = version_query_rd(xe, &bo->vmap, rd_offset, compat_minor);
168+
compat->major = version_query_rd(xe, &bo->vmap, rd_offset, proj_major);
169+
compat->minor = version_query_rd(xe, &bo->vmap, rd_offset, compat_major);
170+
compat->patch = version_query_rd(xe, &bo->vmap, rd_offset, compat_minor);
170171

171-
xe_gt_info(gt, "found GSC cv%u.%u\n", compat->major, compat->minor);
172+
xe_gt_info(gt, "found GSC cv%u.%u.%u\n", compat->major, compat->minor, compat->patch);
172173

173174
out_bo:
174175
xe_bo_unpin_map_no_vm(bo);

drivers/gpu/drm/xe/xe_uc_fw.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ struct fw_blobs_by_type {
129129

130130
/* for the GSC FW we match the compatibility version and not the release one */
131131
#define XE_GSC_FIRMWARE_DEFS(fw_def, major_ver) \
132-
fw_def(LUNARLAKE, major_ver(xe, gsc, lnl, 1, 0, 0)) \
133-
fw_def(METEORLAKE, major_ver(i915, gsc, mtl, 1, 0, 0))
132+
fw_def(LUNARLAKE, major_ver(xe, gsc, lnl, 104, 1, 0)) \
133+
fw_def(METEORLAKE, major_ver(i915, gsc, mtl, 102, 1, 0))
134134

135135
#define MAKE_FW_PATH(dir__, uc__, shortname__, version__) \
136136
__stringify(dir__) "/" __stringify(shortname__) "_" __stringify(uc__) version__ ".bin"
@@ -141,6 +141,8 @@ struct fw_blobs_by_type {
141141
MAKE_FW_PATH(dir_, uc_, shortname_, "_" __stringify(a))
142142
#define fw_filename_no_ver(dir_, uc_, shortname_) \
143143
MAKE_FW_PATH(dir_, uc_, shortname_, "")
144+
#define fw_filename_gsc(dir_, uc_, shortname_, a, b, c) \
145+
MAKE_FW_PATH(dir_, uc_, shortname_, "_" __stringify(b))
144146

145147
#define uc_fw_entry_mmp_ver(dir_, uc_, shortname_, a, b, c) \
146148
{ fw_filename_mmp_ver(dir_, uc_, shortname_, a, b, c), \
@@ -151,6 +153,9 @@ struct fw_blobs_by_type {
151153
#define uc_fw_entry_no_ver(dir_, uc_, shortname_) \
152154
{ fw_filename_no_ver(dir_, uc_, shortname_), \
153155
0, 0 }
156+
#define uc_fw_entry_gsc(dir_, uc_, shortname_, a, b, c) \
157+
{ fw_filename_gsc(dir_, uc_, shortname_, a, b, c), \
158+
a, b, c }
154159

155160
/* All blobs need to be declared via MODULE_FIRMWARE() */
156161
#define XE_UC_MODULE_FIRMWARE(platform__, fw_filename) \
@@ -166,7 +171,7 @@ XE_GUC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE,
166171
fw_filename_mmp_ver, fw_filename_major_ver)
167172
XE_HUC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE,
168173
fw_filename_mmp_ver, fw_filename_no_ver)
169-
XE_GSC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE, fw_filename_major_ver)
174+
XE_GSC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE, fw_filename_gsc)
170175

171176
static struct xe_gt *
172177
__uc_fw_to_gt(struct xe_uc_fw *uc_fw, enum xe_uc_fw_type type)
@@ -209,7 +214,7 @@ uc_fw_auto_select(struct xe_device *xe, struct xe_uc_fw *uc_fw)
209214
uc_fw_entry_no_ver)
210215
};
211216
static const struct uc_fw_entry entries_gsc[] = {
212-
XE_GSC_FIRMWARE_DEFS(XE_UC_FW_ENTRY, uc_fw_entry_major_ver)
217+
XE_GSC_FIRMWARE_DEFS(XE_UC_FW_ENTRY, uc_fw_entry_gsc)
213218
};
214219
static const struct fw_blobs_by_type blobs_all[XE_UC_FW_NUM_TYPES] = {
215220
[XE_UC_FW_TYPE_GUC] = { entries_guc, ARRAY_SIZE(entries_guc) },

0 commit comments

Comments
 (0)