Skip to content

Commit e427343

Browse files
committed
drm/i915/gsc: define gsc fw
Add FW definition and the matching override modparam. The GSC FW has both a release version, based on platform and a rolling counter, and a compatibility version, which is the one tracking interface changes. Since what we care about is the interface, we use the compatibility version in the binary names. Same as with the GuC, a major version bump indicate a backward-incompatible change, while a minor version bump indicates a backward-compatible one, so we use only the former in the file name. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230825162754.1949838-1-daniele.ceraolospurio@intel.com
1 parent 8940da9 commit e427343

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,
131131
fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \
132132
fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0))
133133

134+
/*
135+
* The GSC FW has multiple version (see intel_gsc_uc.h for details); since what
136+
* we care about is the interface, we use the compatibility version in the
137+
* binary names.
138+
* Same as with the GuC, a major version bump indicate a
139+
* backward-incompatible change, while a minor version bump indicates a
140+
* backward-compatible one, so we use only the former in the file name.
141+
*/
142+
#define INTEL_GSC_FIRMWARE_DEFS(fw_def, gsc_def) \
143+
fw_def(METEORLAKE, 0, gsc_def(mtl, 1, 0))
144+
134145
/*
135146
* Set of macros for producing a list of filenames from the above table.
136147
*/
@@ -166,6 +177,9 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,
166177
#define MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_) \
167178
__MAKE_UC_FW_PATH_MMP(prefix_, "huc", major_, minor_, patch_)
168179

180+
#define MAKE_GSC_FW_PATH(prefix_, major_, minor_) \
181+
__MAKE_UC_FW_PATH_MAJOR(prefix_, "gsc", major_)
182+
169183
/*
170184
* All blobs need to be declared via MODULE_FIRMWARE().
171185
* This first expansion of the table macros is solely to provide
@@ -176,6 +190,7 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,
176190

177191
INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH_MAJOR, MAKE_GUC_FW_PATH_MMP)
178192
INTEL_HUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_HUC_FW_PATH_BLANK, MAKE_HUC_FW_PATH_MMP, MAKE_HUC_FW_PATH_GSC)
193+
INTEL_GSC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_GSC_FW_PATH)
179194

180195
/*
181196
* The next expansion of the table macros (in __uc_fw_auto_select below) provides
@@ -225,6 +240,10 @@ struct __packed uc_fw_blob {
225240
#define HUC_FW_BLOB_GSC(prefix_) \
226241
UC_FW_BLOB_NEW(0, 0, 0, true, MAKE_HUC_FW_PATH_GSC(prefix_))
227242

243+
#define GSC_FW_BLOB(prefix_, major_, minor_) \
244+
UC_FW_BLOB_NEW(major_, minor_, 0, true, \
245+
MAKE_GSC_FW_PATH(prefix_, major_, minor_))
246+
228247
struct __packed uc_fw_platform_requirement {
229248
enum intel_platform p;
230249
u8 rev; /* first platform rev using this FW */
@@ -251,9 +270,14 @@ static const struct uc_fw_platform_requirement blobs_huc[] = {
251270
INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB, HUC_FW_BLOB_MMP, HUC_FW_BLOB_GSC)
252271
};
253272

273+
static const struct uc_fw_platform_requirement blobs_gsc[] = {
274+
INTEL_GSC_FIRMWARE_DEFS(MAKE_FW_LIST, GSC_FW_BLOB)
275+
};
276+
254277
static const struct fw_blobs_by_type blobs_all[INTEL_UC_FW_NUM_TYPES] = {
255278
[INTEL_UC_FW_TYPE_GUC] = { blobs_guc, ARRAY_SIZE(blobs_guc) },
256279
[INTEL_UC_FW_TYPE_HUC] = { blobs_huc, ARRAY_SIZE(blobs_huc) },
280+
[INTEL_UC_FW_TYPE_GSC] = { blobs_gsc, ARRAY_SIZE(blobs_gsc) },
257281
};
258282

259283
static void
@@ -266,14 +290,6 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw)
266290
int i;
267291
bool found;
268292

269-
/*
270-
* GSC FW support is still not fully in place, so we're not defining
271-
* the FW blob yet because we don't want the driver to attempt to load
272-
* it until we're ready for it.
273-
*/
274-
if (uc_fw->type == INTEL_UC_FW_TYPE_GSC)
275-
return;
276-
277293
/*
278294
* The only difference between the ADL GuC FWs is the HWConfig support.
279295
* ADL-N does not support HWConfig, so we should use the same binary as

0 commit comments

Comments
 (0)