Drop version numbers from firmware files
Subsystems (2)
v2 cover Drop version numbers from firmware files
From: John Harrison <[email protected]>
Upstream direction is to include the bare minimum of version numbers in firmware files and to replace them in the repo rather than accumulating them. For HuC, that means going completely versionless. For GuC, the major version needs to be kept as that indicates a break in backwards compatibility with the KMD.
v2: Fix a bunch of issues and add better documentation (some found in code review by Daniele, other through more thorough testing).
John Harrison (3):
drm/i915/uc: Support for version reduced and multiple firmware files drm/i915/uc: Add patch level version number support drm/i915/uc: Enable version reduced firmware files for newest
platforms
.../gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 468 ++++++++++++------ drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 39 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 8 +- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +- 6 files changed, 358 insertions(+), 191 deletions(-)
Signature · 1 line
2.37.2
PATCH v2 1/3 drm/i915/uc: Support for version reduced and multiple firmware files
From: John Harrison <[email protected]>
There was a misunderstanding in how firmware file compatibility should be managed within i915. This has been clarified as:
i915 must support all existing firmware releases forever new minor firmware releases should replace prior versions only backwards compatibility breaking releases should be a new file
This patch cleans up the single fallback file support that was added as a quick fix emergency effort. That is now removed in preference to supporting arbitrary numbers of firmware files per platform.
The patch also adds support for having GuC firmware files that are named by major version only (because the major version indicates backwards breaking changes that affect the KMD) and for having HuC firmware files with no version number at all (because the KMD has no interface requirements with the HuC).
For GuC, the driver will report via dmesg if the found file is older than expected. For HuC, the KMD will no longer require updating for any new HuC release so will not be able to report what the latest expected version is.
--- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 442 ++++++++++++------ drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 33 +- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +- 5 files changed, 319 insertions(+), 186 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +5 -5
@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc)if (guc->submission_initialized)return 0 ; -if (guc->fw.major_ver_found <70 ) { +if (guc->fw.file_selected.major_ver <70 ) { ret =guc_lrc_desc_pool_create_v69 (guc);if (ret)return ret;
@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop)GEM_BUG_ON (intel_context_is_child (ce));trace_intel_context_register (ce); -if (guc->fw.major_ver_found >=70 ) +if (guc->fw.file_selected.major_ver >=70 ) ret =register_context_v70 (guc, ce, loop);else ret =register_context_v69 (guc, ce, loop);
@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop)set_context_registered (ce);spin_unlock_irqrestore (&ce->guc_state.lock, flags); -if (guc->fw.major_ver_found >=70 ) +if (guc->fw.file_selected.major_ver >=70 )guc_context_policy_init_v70 (ce, loop); }
@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct intel_guc *guc, u16 guc_id, u32 preemption_timeout) { -if (guc->fw.major_ver_found >=70 ) { +if (guc->fw.file_selected.major_ver >=70 ) {struct context_policy policy;__guc_context_policy_start_klv (&policy, guc_id);
@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce)static void __guc_context_set_prio (struct intel_guc *guc,struct intel_context *ce) { -if (guc->fw.major_ver_found >=70 ) { +if (guc->fw.file_selected.major_ver >=70 ) {struct context_policy policy;__guc_context_policy_start_klv (&policy, ce->guc_id.id);
drivers/gpu/drm/i915/gt/uc/intel_uc.c +2 -2
@@ -436,8 +436,8 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw)struct drm_i915_private *i915 =uc_to_gt (uc)->i915;drm_info (&i915->drm,"%s firmware %s version %u.%u\n" , -intel_uc_fw_type_repr (fw->type), fw->path, - fw->major_ver_found, fw->minor_ver_found); +intel_uc_fw_type_repr (fw->type), fw->file_selected.path, + fw->file_selected.major_ver, fw->file_selected.minor_ver); }static int __uc_init_hw (struct intel_uc *uc)
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +290 -152
632 lines not on this page · raw message
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +14 -19
@@ -64,6 +64,17 @@ enum intel_uc_fw_type { };#define INTEL_UC_FW_NUM_TYPES 2 +/* +* The firmware build process will generate a version header file with major and +* minor version defined. The versions are built into CSS header of firmware. +* i915 kernel driver set the minimal firmware version required per platform. +*/ +struct intel_uc_fw_file { +const char *path; +u16 major_ver; +u16 minor_ver; +}; +/* * This structure encapsulates all the data needed during the process * of fetching, caching, and loading the firmware image into the uC.
@@ -74,11 +85,12 @@ struct intel_uc_fw {const enum intel_uc_fw_status status;enum intel_uc_fw_status __status;/* no accidental overwrites */ }; -const char *wanted_path; -const char *path; +struct intel_uc_fw_file file_wanted; +struct intel_uc_fw_file file_selected;bool user_overridden;size_t size;struct drm_i915_gem_object *obj; +/** * @dummy: A vma used in binding the uc fw to ggtt. We can't define this * vma on the stack as it can lead to a stack overflow, so we define it
@@ -89,25 +101,8 @@ struct intel_uc_fw {struct i915_vma_resource dummy;struct i915_vma *rsa_data; -/* -* The firmware build process will generate a version header file with major and -* minor version defined. The versions are built into CSS header of firmware. -* i915 kernel driver set the minimal firmware version required per platform. -*/ -u16 major_ver_wanted; -u16 minor_ver_wanted; -u16 major_ver_found; -u16 minor_ver_found; - -struct { -const char *path; -u16 major_ver; -u16 minor_ver; - } fallback; -u32 rsa_size;u32 ucode_size; -u32 private_data_size;bool loaded_via_gsc;
drivers/gpu/drm/i915/i915_gpu_error.c +8 -8
@@ -1022,8 +1022,10 @@ static void cleanup_params(struct i915_gpu_coredump *error)static void cleanup_uc (struct intel_uc_coredump *uc) { -kfree (uc->guc_fw.path); -kfree (uc->huc_fw.path); +kfree (uc->guc_fw.file_selected.path); +kfree (uc->huc_fw.file_selected.path); +kfree (uc->guc_fw.file_wanted.path); +kfree (uc->huc_fw.file_wanted.path);i915_vma_coredump_free (uc->guc.vma_log);i915_vma_coredump_free (uc->guc.vma_ctb);
@@ -1705,12 +1707,10 @@ gt_record_uc(struct intel_gt_coredump *gt,memcpy (&error_uc->guc_fw, &uc->guc.fw,sizeof (uc->guc.fw));memcpy (&error_uc->huc_fw, &uc->huc.fw,sizeof (uc->huc.fw)); -/* Non-default firmware paths will be specified by the modparam. -* As modparams are generally accesible from the userspace make -* explicit copies of the firmware paths. -*/ - error_uc->guc_fw.path =kstrdup (uc->guc.fw.path,ALLOW_FAIL ); - error_uc->huc_fw.path =kstrdup (uc->huc.fw.path,ALLOW_FAIL ); + error_uc->guc_fw.file_selected.path =kstrdup (uc->guc.fw.file_selected.path,ALLOW_FAIL ); + error_uc->huc_fw.file_selected.path =kstrdup (uc->huc.fw.file_selected.path,ALLOW_FAIL ); + error_uc->guc_fw.file_wanted.path =kstrdup (uc->guc.fw.file_wanted.path,ALLOW_FAIL ); + error_uc->huc_fw.file_wanted.path =kstrdup (uc->huc.fw.file_wanted.path,ALLOW_FAIL );/* * Save the GuC log and include a timestamp reference for converting the
Signature · 1 line
2.37.2
Re: [PATCH v2 1/3] drm/i915/uc: Support for version reduced and multiple firmware files
Quoted 110 lines · On 8/25/2022 8:05 PM, [email protected] wrote:
From: John Harrison <[email protected]>
There was a misunderstanding in how firmware file compatibility should be managed within i915. This has been clarified as:
i915 must support all existing firmware releases forever new minor firmware releases should replace prior versions only backwards compatibility breaking releases should be a new fileThis patch cleans up the single fallback file support that was added as a quick fix emergency effort. That is now removed in preference to supporting arbitrary numbers of firmware files per platform.
The patch also adds support for having GuC firmware files that are named by major version only (because the major version indicates backwards breaking changes that affect the KMD) and for having HuC firmware files with no version number at all (because the KMD has no interface requirements with the HuC).
For GuC, the driver will report via dmesg if the found file is older than expected. For HuC, the KMD will no longer require updating for any new HuC release so will not be able to report what the latest expected version is.
Signed-off-by John Harrison <[email protected]>--- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 442 ++++++++++++------ drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 33 +- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +- 5 files changed, 319 insertions(+), 186 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +5
-5@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc)if (guc->submission_initialized)return 0 ; -if (guc->fw.major_ver_found <70 ) { +if (guc->fw.file_selected.major_ver <70 ) { ret =guc_lrc_desc_pool_create_v69 (guc);if (ret)return ret;@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop)GEM_BUG_ON (intel_context_is_child (ce));trace_intel_context_register (ce); -if (guc->fw.major_ver_found >=70 ) +if (guc->fw.file_selected.major_ver >=70 ) ret =register_context_v70 (guc, ce, loop);else ret =register_context_v69 (guc, ce, loop);@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop)set_context_registered (ce);spin_unlock_irqrestore (&ce->guc_state.lock, flags); -if (guc->fw.major_ver_found >=70 ) +if (guc->fw.file_selected.major_ver >=70 )guc_context_policy_init_v70 (ce, loop); }@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct intel_guc *guc, u16 guc_id, u32 preemption_timeout) { -if (guc->fw.major_ver_found >=70 ) { +if (guc->fw.file_selected.major_ver >=70 ) {struct context_policy policy;__guc_context_policy_start_klv (&policy, guc_id);@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce)static void __guc_context_set_prio (struct intel_guc *guc,struct intel_context *ce) { -if (guc->fw.major_ver_found >=70 ) { +if (guc->fw.file_selected.major_ver >=70 ) {struct context_policy policy;__guc_context_policy_start_klv (&policy, ce->guc_id.id);drivers/gpu/drm/i915/gt/uc/intel_uc.c +2
-2@@ -436,8 +436,8 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw)struct drm_i915_private *i915 =uc_to_gt (uc)->i915;drm_info (&i915->drm,"%s firmware %s version %u.%u\n" , -intel_uc_fw_type_repr (fw->type), fw->path, - fw->major_ver_found, fw->minor_ver_found); +intel_uc_fw_type_repr (fw->type), fw->file_selected.path, + fw->file_selected.major_ver, fw->file_selected.minor_ver); }static int __uc_init_hw (struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -41,7 +41,7 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,"%s firmware -> %s\n" ,intel_uc_fw_type_repr (uc_fw->type), status ==INTEL_UC_FIRMWARE_SELECTED ? - uc_fw->path : intel_uc_fw_status_repr(status)); + uc_fw->file_selected.path : intel_uc_fw_status_repr(status)); }#endif
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, · line 58
Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-0@@ -51,84 +51,149 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,* * Note that RKL and ADL-S have the same GuC/HuC device ID's and use the same * firmware as TGL. +* +* Version numbers: +* Originally, the driver required an exact match major/minor/patch furmware +* file and only supported that one version for any given platform. However, +* the new direction from upstream is to be becakwards compatible with all
typo becakwards
Quoted 208 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +119
-62+* prior releases and to be as flexible as possible as to what firmware is +* loaded. +* +* For GuC, the major version number signifies a backwards breaking API change. +* So, new format GuC firmware files are labelled by their major version only. +* For HuC, there is no KMD interaction, hence no version matching requirement. +* So, new format HuC firmware files have no version number at all. +* +* All of which means that the table below must keep all old format files with +* full three point version number. But newer files have reduced requirements. +* Having said that, the driver still needs to track the minor version number +* for GuC at least. As it is useful to report to the user that they are not +* running with a recent enough version for all KMD supported features, +* security fixes, etc. to be enabled. */ -#define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_def) \ - fw_def(DG2, 0, guc_def(dg2, 70, 4, 1)) \ - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 70, 1, 1)) \ - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(DG1, 0, guc_def(dg1, 70, 1, 1)) \ - fw_def(ROCKETLAKE, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(TIGERLAKE, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(JASPERLAKE, 0, guc_def(ehl, 70, 1, 1)) \ - fw_def(ELKHARTLAKE, 0, guc_def(ehl, 70, 1, 1)) \ - fw_def(ICELAKE, 0, guc_def(icl, 70, 1, 1)) \ - fw_def(COMETLAKE, 5, guc_def(cml, 70, 1, 1)) \ - fw_def(COMETLAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(COFFEELAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(GEMINILAKE, 0, guc_def(glk, 70, 1, 1)) \ - fw_def(KABYLAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(BROXTON, 0, guc_def(bxt, 70, 1, 1)) \ - fw_def(SKYLAKE, 0, guc_def(skl, 70, 1, 1)) - -#define INTEL_GUC_FIRMWARE_DEFS_FALLBACK (fw_def, guc_def) \ - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 69, 0, 3)) \ - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 69, 0, 3)) - -#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_def) \ - fw_def(ALDERLAKE_P, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(ALDERLAKE_S, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(DG1, 0, huc_def(dg1, 7, 9, 3)) \ - fw_def(ROCKETLAKE, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(TIGERLAKE, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(JASPERLAKE, 0, huc_def(ehl, 9, 0, 0)) \ - fw_def(ELKHARTLAKE, 0, huc_def(ehl, 9, 0, 0)) \ - fw_def(ICELAKE, 0, huc_def(icl, 9, 0, 0)) \ - fw_def(COMETLAKE, 5, huc_def(cml, 4, 0, 0)) \ - fw_def(COMETLAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(COFFEELAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(GEMINILAKE, 0, huc_def(glk, 4, 0, 0)) \ - fw_def(KABYLAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(BROXTON, 0, huc_def(bxt, 2, 0, 0)) \ - fw_def(SKYLAKE, 0, huc_def(skl, 2, 0, 0)) - -#define __MAKE_UC_FW_PATH (prefix_, name_, major_, minor_, patch_) \ +#define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_maj, guc_mmp) \ + fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ + fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ELKHARTLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ICELAKE, 0, guc_mmp(icl, 70, 1, 1)) \ + fw_def(COMETLAKE, 5, guc_mmp(cml, 70, 1, 1)) \ + fw_def(COMETLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(COFFEELAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(GEMINILAKE, 0, guc_mmp(glk, 70, 1, 1)) \ + fw_def(KABYLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(BROXTON, 0, guc_mmp(bxt, 70, 1, 1)) \ + fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1)) + +#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_raw, huc_mmp) \ + fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ + fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(JASPERLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ELKHARTLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ICELAKE, 0, huc_mmp(icl, 9, 0, 0)) \ + fw_def(COMETLAKE, 5, huc_mmp(cml, 4, 0, 0)) \ + fw_def(COMETLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(COFFEELAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(GEMINILAKE, 0, huc_mmp(glk, 4, 0, 0)) \ + fw_def(KABYLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \ + fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0)) + +/* +* Set of macros for producing a list of filenames from the above table. +*/ +#define __MAKE_UC_FW_PATH_BLANK (prefix_, name_) \ + "i915/" \ + __stringify(prefix_) name_ ".bin" + +#define __MAKE_UC_FW_PATH_MAJOR (prefix_, name_, major_) \ + "i915/" \ + __stringify(prefix_) name_ \ + __stringify(major_) ".bin" + +#define __MAKE_UC_FW_PATH_MMP (prefix_, name_, major_, minor_, patch_) \ "i915/" \ __stringify(prefix_) name_ \ __stringify(major_) "." \ __stringify(minor_) "." \ __stringify(patch_) ".bin" -#define MAKE_GUC_FW_PATH (prefix_, major_, minor_, patch_) \ - __MAKE_UC_FW_PATH(prefix_, "_guc_", major_, minor_, patch_) +/* Minor for internal driver use, not part of file name */ +#define MAKE_GUC_FW_PATH_MAJOR (prefix_, major_, minor_) \ + __MAKE_UC_FW_PATH_MAJOR(prefix_, "_guc_", major_) -#define MAKE_HUC_FW_PATH (prefix_, major_, minor_, bld_num_) \ - __MAKE_UC_FW_PATH(prefix_, "_huc_", major_, minor_, bld_num_) +#define MAKE_GUC_FW_PATH_MMP (prefix_, major_, minor_, patch_) \ + __MAKE_UC_FW_PATH_MMP(prefix_, "_guc_", major_, minor_, patch_) -/* All blobs need to be declared via MODULE_FIRMWARE() */ +#define MAKE_HUC_FW_PATH_BLANK (prefix_) \ + __MAKE_UC_FW_PATH_BLANK(prefix_, "_huc") + +#define MAKE_HUC_FW_PATH_MMP (prefix_, major_, minor_, patch_) \ + __MAKE_UC_FW_PATH_MMP(prefix_, "_huc_", major_, minor_, patch_) + +/* +* All blobs need to be declared via MODULE_FIRMWARE(). +* This first expansion of the table macros is solely to provide +* that declaration. +*/ #define INTEL_UC_MODULE_FW (platform_, revid_, uc_) \ MODULE_FIRMWARE(uc_); -INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH) -INTEL_GUC_FIRMWARE_DEFS_FALLBACK(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH) -INTEL_HUC_FIRMWARE_DEFS (INTEL_UC_MODULE_FW ,MAKE_HUC_FW_PATH ) +INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH_MAJOR, MAKE_GUC_FW_PATH_MMP) +INTEL_HUC_FIRMWARE_DEFS (INTEL_UC_MODULE_FW ,MAKE_HUC_FW_PATH_BLANK ,MAKE_HUC_FW_PATH_MMP ) -/* The below structs and macros are used to iterate across the list of blobs */ +/* +* The next expansion of the table macros (in __uc_fw_auto_select below) provides +* actual data structures with both the filename and the version information. +* These structure arrays are then iterated over to the list of suitable files +* for the current platform and to then attempt to load those files, in the order +* listed, until one is successfully found. + */struct __packed uc_fw_blob { +const char *path; +bool legacy;u8 major;u8 minor; -const char *path; +u8 patch; }; -#define UC_FW_BLOB (major_, minor_, path_) \ - { .major = major_, .minor = minor_, .path = path_ } +#define UC_FW_BLOB_BASE (major_, minor_, patch_, path_) \ + .major = major_, \ + .minor = minor_, \ + .patch = patch_, \ + .path = path_, + +#define UC_FW_BLOB_NEW (major_, minor_, patch_, path_) \ + { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ + .legacy = false } + +#define UC_FW_BLOB_OLD (major_, minor_, patch_, path_) \ + { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ + .legacy = true } -#define GUC_FW_BLOB (prefix_, major_, minor_, patch_) \ - UC_FW_BLOB(major_, minor_, \ - MAKE_GUC_FW_PATH(prefix_, major_, minor_, patch_)) +#define GUC_FW_BLOB (prefix_, major_, minor_) \ + UC_FW_BLOB_NEW(major_, minor_, 0, \ + MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_)) -#define HUC_FW_BLOB (prefix_, major_, minor_, bld_num_) \ - UC_FW_BLOB(major_, minor_, \ - MAKE_HUC_FW_PATH(prefix_, major_, minor_, bld_num_)) +#define GUC_FW_BLOB_MMP (prefix_, major_, minor_, patch_) \ + UC_FW_BLOB_OLD(major_, minor_, patch_, \ + MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_)) + +#define HUC_FW_BLOB (prefix_) \ + UC_FW_BLOB_NEW(0, 0, 0, MAKE_HUC_FW_PATH_BLANK(prefix_)) + +#define HUC_FW_BLOB_MMP (prefix_, major_, minor_, patch_) \ + UC_FW_BLOB_OLD(major_, minor_, patch_, \ + MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))struct __packed uc_fw_platform_requirement {enum intel_platform p;@@ -152,18 +217,16 @@ static void __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) {static const struct uc_fw_platform_requirement blobs_guc[] = { -INTEL_GUC_FIRMWARE_DEFS (MAKE_FW_LIST ,GUC_FW_BLOB ) - }; -static const struct uc_fw_platform_requirement blobs_guc_fallback[] = { -INTEL_GUC_FIRMWARE_DEFS_FALLBACK (MAKE_FW_LIST ,GUC_FW_BLOB ) +INTEL_GUC_FIRMWARE_DEFS (MAKE_FW_LIST ,GUC_FW_BLOB ,GUC_FW_BLOB_MMP )
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c static void · line 229
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +2
-1};static const struct uc_fw_platform_requirement blobs_huc[] = { -INTEL_HUC_FIRMWARE_DEFS (MAKE_FW_LIST ,HUC_FW_BLOB ) +INTEL_HUC_FIRMWARE_DEFS (MAKE_FW_LIST ,HUC_FW_BLOB ,HUC_FW_BLOB_MMP ) };static const struct fw_blobs_by_type blobs_all[INTEL_UC_FW_NUM_TYPES ] = { [INTEL_UC_FW_TYPE_GUC ] = { blobs_guc,ARRAY_SIZE (blobs_guc) }, [INTEL_UC_FW_TYPE_HUC ] = { blobs_huc,ARRAY_SIZE (blobs_huc) }, }; +static bool verified;
is this static to only run the test once per boot?
Quoted 31 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-16const struct uc_fw_platform_requirement *fw_blobs;enum intel_platform p =INTEL_INFO (i915)->platform;u32 fw_count;@@ -184,49 +247,94 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) fw_count = blobs_all[uc_fw->type].count;for (i =0 ; i < fw_count && p <= fw_blobs[i].p; i++) { -if (p == fw_blobs[i].p && rev >= fw_blobs[i].rev) { -const struct uc_fw_blob *blob = &fw_blobs[i].blob; - uc_fw->path = blob->path; - uc_fw->wanted_path = blob->path; - uc_fw->major_ver_wanted = blob->major; - uc_fw->minor_ver_wanted = blob->minor; -break ; - } - } +const struct uc_fw_blob *blob = &fw_blobs[i].blob; -if (uc_fw->type ==INTEL_UC_FW_TYPE_GUC ) { -const struct uc_fw_platform_requirement *blobs = blobs_guc_fallback; -u32 count =ARRAY_SIZE (blobs_guc_fallback); +if (p != fw_blobs[i].p) +continue ; -for (i =0 ; i < count && p <= blobs[i].p; i++) { -if (p == blobs[i].p && rev >= blobs[i].rev) { -const struct uc_fw_blob *blob = &blobs[i].blob; +if (rev < fw_blobs[i].rev) +continue ; - uc_fw->fallback.path = blob->path;
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) · line 263
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-4- uc_fw->fallback.major_ver = blob->major; - uc_fw->fallback.minor_ver = blob->minor; -break ; - } +if (uc_fw->file_selected.path) { +if (uc_fw->file_selected.path == blob->path) + uc_fw->file_selected.path =NULL ; + +continue ; }
Does this work with 3 versions for the same platform if the 2 newer ones are not available? let's say we have v1, v2 and v3. v3 (newer) gets selected first but not found, so we call back in this function again and match v3 in the path check, clear the selected and continue, selecting v2 in the next round. if v2 is also not found, we call back in here starting from v3, which will not match the path check, so we'll continue below and assign it. Or am I missing something?
everything else looks ok.
Daniele
Quoted 471 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +153
-68+ + uc_fw->file_selected.path = blob->path; + uc_fw->file_wanted.path = blob->path; + uc_fw->file_wanted.major_ver = blob->major; + uc_fw->file_wanted.minor_ver = blob->minor; +break ; }/* make sure the list is ordered as expected */ -if (IS_ENABLED (CONFIG_DRM_I915_SELFTEST )) { +if (IS_ENABLED (CONFIG_DRM_I915_SELFTEST ) && !verified) { + verified = true; +for (i =1 ; i < fw_count; i++) { +/* Next platform is good: */ if (fw_blobs[i].p < fw_blobs[i -1 ].p)continue ; +/* Next platform revision is good: */ if (fw_blobs[i].p == fw_blobs[i -1 ].p && fw_blobs[i].rev < fw_blobs[i -1 ].rev)continue ; -drm_err (&i915->drm,"Invalid FW blob order: %s r%u comes before %s r%u\n" , -intel_platform_name (fw_blobs[i -1 ].p), - fw_blobs[i -1 ].rev, -intel_platform_name (fw_blobs[i].p), - fw_blobs[i].rev); +/* Platform/revision must be in order: */ +if (fw_blobs[i].p != fw_blobs[i -1 ].p || + fw_blobs[i].rev != fw_blobs[i -1 ].rev) + goto bad; + +/* Next major version is good: */ +if (fw_blobs[i].blob.major < fw_blobs[i -1 ].blob.major) +continue ; + +/* New must be before legacy: */ +if (!fw_blobs[i].blob.legacy && fw_blobs[i -1 ].blob.legacy) + goto bad; + +/* New to legacy also means 0.0 to X.Y (HuC), or X.0 to X.Y (GuC) */ +if (fw_blobs[i].blob.legacy && !fw_blobs[i -1 ].blob.legacy) { +if (!fw_blobs[i -1 ].blob.major) +continue ; + +if (fw_blobs[i].blob.major == fw_blobs[i -1 ].blob.major) +continue ; + } + +/* Major versions must be in order: */ +if (fw_blobs[i].blob.major != fw_blobs[i -1 ].blob.major) + goto bad; + +/* Next minor version is good: */ +if (fw_blobs[i].blob.minor < fw_blobs[i -1 ].blob.minor) +continue ; - uc_fw->path =NULL ; +/* Minor versions must be in order: */ +if (fw_blobs[i].blob.minor != fw_blobs[i -1 ].blob.minor) + goto bad; + +/* Patch versions must be in order: */ +if (fw_blobs[i].blob.patch <= fw_blobs[i -1 ].blob.patch) +continue ; + +bad: +drm_err (&i915->drm,"\x1B[35;1mInvalid FW blob order: %s r%u %s%d.%d.%d comes before %s r%u %s%d.%d.%d\n" , +intel_platform_name (fw_blobs[i -1 ].p), fw_blobs[i -1 ].rev, + fw_blobs[i -1 ].blob.legacy ?"L" :"v" , + fw_blobs[i -1 ].blob.major, + fw_blobs[i -1 ].blob.minor, + fw_blobs[i -1 ].blob.patch, +intel_platform_name (fw_blobs[i].p), fw_blobs[i].rev, + fw_blobs[i].blob.legacy ?"L" :"v" , + fw_blobs[i].blob.major, + fw_blobs[i].blob.minor, + fw_blobs[i].blob.patch); + + uc_fw->file_selected.path =NULL ; } } }@@ -259,7 +367,7 @@ static void __uc_fw_user_override(struct drm_i915_private *i915, struct intel_uc }if (unlikely (path)) { - uc_fw->path = path; + uc_fw->file_selected.path = path; uc_fw->user_overridden = true; } }@@ -283,7 +391,7 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw,*/ BUILD_BUG_ON (INTEL_UC_FIRMWARE_UNINITIALIZED );GEM_BUG_ON (uc_fw->status); -GEM_BUG_ON (uc_fw->path); +GEM_BUG_ON (uc_fw->file_selected.path); uc_fw->type = type;@@ -292,7 +400,7 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw,__uc_fw_user_override (i915, uc_fw); } -intel_uc_fw_change_status (uc_fw, uc_fw->path ? *uc_fw->path ? +intel_uc_fw_change_status (uc_fw, uc_fw->file_selected.path ? *uc_fw->file_selected.path ?INTEL_UC_FIRMWARE_SELECTED :INTEL_UC_FIRMWARE_DISABLED :INTEL_UC_FIRMWARE_NOT_SUPPORTED );@@ -305,32 +413,32 @@ static void __force_fw_fetch_failures(struct intel_uc_fw *uc_fw, int e)if (i915_inject_probe_error (i915, e)) {/* non-existing blob */ - uc_fw->path ="<invalid>" ; + uc_fw->file_selected.path ="<invalid>" ; uc_fw->user_overridden = user; }else if (i915_inject_probe_error (i915, e)) {/* require next major version */ - uc_fw->major_ver_wanted +=1 ; - uc_fw->minor_ver_wanted =0 ; + uc_fw->file_wanted.major_ver +=1 ; + uc_fw->file_wanted.minor_ver =0 ; uc_fw->user_overridden = user; }else if (i915_inject_probe_error (i915, e)) {/* require next minor version */ - uc_fw->minor_ver_wanted +=1 ; + uc_fw->file_wanted.minor_ver +=1 ; uc_fw->user_overridden = user; - }else if (uc_fw->major_ver_wanted && + }else if (uc_fw->file_wanted.major_ver &&i915_inject_probe_error (i915, e)) {/* require prev major version */ - uc_fw->major_ver_wanted -=1 ; - uc_fw->minor_ver_wanted =0 ; + uc_fw->file_wanted.major_ver -=1 ; + uc_fw->file_wanted.minor_ver =0 ; uc_fw->user_overridden = user; - }else if (uc_fw->minor_ver_wanted && + }else if (uc_fw->file_wanted.minor_ver &&i915_inject_probe_error (i915, e)) {/* require prev minor version - hey, this should work! */ - uc_fw->minor_ver_wanted -=1 ; + uc_fw->file_wanted.minor_ver -=1 ; uc_fw->user_overridden = user; }else if (user &&i915_inject_probe_error (i915, e)) {/* officially unsupported platform */ - uc_fw->major_ver_wanted =0 ; - uc_fw->minor_ver_wanted =0 ; + uc_fw->file_wanted.major_ver =0 ; + uc_fw->file_wanted.minor_ver =0 ; uc_fw->user_overridden = true; } }@@ -341,8 +449,8 @@ static int check_gsc_manifest(const struct firmware *fw,u32 *dw = (u32 *)fw->data;u32 version = dw[HUC_GSC_VERSION_DW ]; - uc_fw->major_ver_found =FIELD_GET (HUC_GSC_MAJOR_VER_MASK , version); - uc_fw->minor_ver_found =FIELD_GET (HUC_GSC_MINOR_VER_MASK , version); + uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_MASK , version); + uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_MASK , version);return 0 ; }@@ -357,7 +465,7 @@ static int check_ccs_header(struct drm_i915_private *i915,/* Check the size of the blob before examining buffer contents */ if (unlikely (fw->size <sizeof (struct uc_css_header ))) {drm_warn (&i915->drm,"%s firmware %s: invalid size: %zu < %zu\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, fw->size,sizeof (struct uc_css_header ));return -ENODATA ; }@@ -370,7 +478,7 @@ static int check_ccs_header(struct drm_i915_private *i915,if (unlikely (size !=sizeof (struct uc_css_header ))) {drm_warn (&i915->drm,"%s firmware %s: unexpected header size: %zu != %zu\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, fw->size,sizeof (struct uc_css_header ));return -EPROTO ; }@@ -385,7 +493,7 @@ static int check_ccs_header(struct drm_i915_private *i915, size =sizeof (struct uc_css_header ) + uc_fw->ucode_size + uc_fw->rsa_size;if (unlikely (fw->size < size)) {drm_warn (&i915->drm,"%s firmware %s: invalid size: %zu < %zu\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, fw->size, size);return -ENOEXEC ; }@@ -394,16 +502,16 @@ static int check_ccs_header(struct drm_i915_private *i915, size =__intel_uc_fw_get_upload_size (uc_fw);if (unlikely (size >= i915->wopcm.size)) {drm_warn (&i915->drm,"%s firmware %s: invalid size: %zu > %zu\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, size, (size_t )i915->wopcm.size);return -E2BIG ; }/* Get version numbers from the CSS header */ - uc_fw->major_ver_found =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , - css->sw_version); - uc_fw->minor_ver_found =FIELD_GET (CSS_SW_VERSION_UC_MINOR , - css->sw_version); + uc_fw->file_selected.major_ver =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , + css->sw_version); + uc_fw->file_selected.minor_ver =FIELD_GET (CSS_SW_VERSION_UC_MINOR , + css->sw_version);if (uc_fw->type ==INTEL_UC_FW_TYPE_GUC ) uc_fw->private_data_size = css->private_data_size;@@ -422,9 +530,11 @@ static int check_ccs_header(struct drm_i915_private *i915,int intel_uc_fw_fetch (struct intel_uc_fw *uc_fw) {struct drm_i915_private *i915 =__uc_fw_to_gt (uc_fw)->i915; +struct intel_uc_fw_file file_ideal;struct device *dev = i915->drm.dev;struct drm_i915_gem_object *obj;const struct firmware *fw =NULL ; +bool old_ver = false;int err;GEM_BUG_ON (!i915->wopcm.size);@@ -437,27 +547,33 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw)__force_fw_fetch_failures (uc_fw, -EINVAL );__force_fw_fetch_failures (uc_fw, -ESTALE ); - err =firmware_request_nowarn (&fw, uc_fw->path, dev); -if (err && !intel_uc_fw_is_overridden (uc_fw) && uc_fw->fallback.path) { - err =firmware_request_nowarn (&fw, uc_fw->fallback.path, dev); -if (!err) { -drm_notice (&i915->drm, -"%s firmware %s is recommended, but only %s was found\n" , -intel_uc_fw_type_repr (uc_fw->type), - uc_fw->wanted_path, - uc_fw->fallback.path); -drm_info (&i915->drm, -"Consider updating your linux-firmware pkg or downloading from %s\n" , -INTEL_UC_FIRMWARE_URL ); - - uc_fw->path = uc_fw->fallback.path; - uc_fw->major_ver_wanted = uc_fw->fallback.major_ver; - uc_fw->minor_ver_wanted = uc_fw->fallback.minor_ver; + err =firmware_request_nowarn (&fw, uc_fw->file_selected.path, dev); +memcpy (&file_ideal, &uc_fw->file_wanted,sizeof (file_ideal)); +if (!err ||intel_uc_fw_is_overridden (uc_fw)) + goto done; + +while (err == -ENOENT ) { +__uc_fw_auto_select (i915, uc_fw); +if (!uc_fw->file_selected.path) { +/* +* No more options! But set the path back to something +* valid just in case it gets dereferenced. +*/ + uc_fw->file_selected.path = file_ideal.path; + +/* Also, preserve the version that was really wanted */ +memcpy (&uc_fw->file_wanted, &file_ideal,sizeof (uc_fw->file_wanted)); +break ; } + + err =firmware_request_nowarn (&fw, uc_fw->file_selected.path, dev); } +if (err) goto fail; + old_ver = true; +done:if (uc_fw->loaded_via_gsc) err =check_gsc_manifest (fw, uc_fw);else @@ -465,18 +581,39 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw)if (err) goto fail; -if (uc_fw->major_ver_found != uc_fw->major_ver_wanted || - uc_fw->minor_ver_found < uc_fw->minor_ver_wanted) { -drm_notice (&i915->drm,"%s firmware %s: unexpected version: %u.%u != %u.%u\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, - uc_fw->major_ver_found, uc_fw->minor_ver_found, - uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted); -if (!intel_uc_fw_is_overridden (uc_fw)) { - err = -ENOEXEC ; - goto fail; +if (uc_fw->file_wanted.major_ver) { +/* Check the file's major version was as it claimed */ +if (uc_fw->file_selected.major_ver != uc_fw->file_wanted.major_ver) { +drm_notice (&i915->drm,"%s firmware %s: unexpected version: %u.%u != %u.%u\n" , +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, + uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver, + uc_fw->file_wanted.major_ver, uc_fw->file_wanted.minor_ver); +if (!intel_uc_fw_is_overridden (uc_fw)) { + err = -ENOEXEC ; + goto fail; + } + }else { +if (uc_fw->file_selected.minor_ver < uc_fw->file_wanted.minor_ver) + old_ver = true; } } +if (old_ver) { +/* Preserve the version that was really wanted */ +memcpy (&uc_fw->file_wanted, &file_ideal,sizeof (uc_fw->file_wanted)); + +drm_notice (&i915->drm, +"%s firmware %s (%d.%d) is recommended, but only %s (%d.%d) was found\n" , +intel_uc_fw_type_repr (uc_fw->type), + uc_fw->file_wanted.path, + uc_fw->file_wanted.major_ver, uc_fw->file_wanted.minor_ver, + uc_fw->file_selected.path, + uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); +drm_info (&i915->drm, +"Consider updating your linux-firmware pkg or downloading from %s\n" , +INTEL_UC_FIRMWARE_URL ); + } +if (HAS_LMEM (i915)) { obj =i915_gem_object_create_lmem_from_data (i915, fw->data, fw->size);if (!IS_ERR (obj))@@ -503,7 +640,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) INTEL_UC_FIRMWARE_ERROR);i915_probe_error (i915,"%s firmware %s: fetch failed with error %d\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, err); +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, err);drm_info (&i915->drm,"%s firmware(s) can be downloaded from %s\n" ,intel_uc_fw_type_repr (uc_fw->type),INTEL_UC_FIRMWARE_URL );@@ -645,7 +782,7 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw, u32 dst_offset, u32 dma_flags) fail:i915_probe_error (gt->i915,"Failed to load %s firmware %s (%d)\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->path, +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path, err);intel_uc_fw_change_status (uc_fw,INTEL_UC_FIRMWARE_LOAD_FAIL );return err;@@ -864,18 +1001,19 @@ size_t intel_uc_fw_copy_rsa(struct intel_uc_fw *uc_fw, void *dst, u32 max_len)void intel_uc_fw_dump (const struct intel_uc_fw *uc_fw,struct drm_printer *p) {drm_printf (p,"%s firmware: %s\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->wanted_path); -if (uc_fw->fallback.path) { -drm_printf (p,"%s firmware fallback: %s\n" , -intel_uc_fw_type_repr (uc_fw->type), uc_fw->fallback.path); -drm_printf (p,"fallback selected: %s\n" , -str_yes_no (uc_fw->path == uc_fw->fallback.path)); - } +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path); +if (uc_fw->file_selected.path != uc_fw->file_wanted.path) +drm_printf (p,"%s firmware wanted: %s\n" , +intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_wanted.path);drm_printf (p,"\tstatus: %s\n" ,intel_uc_fw_status_repr (uc_fw->status)); -drm_printf (p,"\tversion: wanted %u.%u, found %u.%u\n" , - uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted, - uc_fw->major_ver_found, uc_fw->minor_ver_found); +if (uc_fw->file_wanted.major_ver) +drm_printf (p,"\tversion: wanted %u.%u, found %u.%u\n" , + uc_fw->file_wanted.major_ver, uc_fw->file_wanted.minor_ver, + uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); +else +drm_printf (p,"\tversion: found %u.%u\n" , + uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver);drm_printf (p,"\tuCode: %u bytes\n" , uc_fw->ucode_size);drm_printf (p,"\tRSA: %u bytes\n" , uc_fw->rsa_size); }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +14
-19@@ -64,6 +64,17 @@ enum intel_uc_fw_type { };#define INTEL_UC_FW_NUM_TYPES 2 +/* +* The firmware build process will generate a version header file with major and +* minor version defined. The versions are built into CSS header of firmware. +* i915 kernel driver set the minimal firmware version required per platform. +*/ +struct intel_uc_fw_file { +const char *path; +u16 major_ver; +u16 minor_ver; +}; +/* * This structure encapsulates all the data needed during the process * of fetching, caching, and loading the firmware image into the uC. @@ -74,11 +85,12 @@ struct intel_uc_fw {const enum intel_uc_fw_status status;enum intel_uc_fw_status __status;/* no accidental overwrites */ }; -const char *wanted_path; -const char *path; +struct intel_uc_fw_file file_wanted; +struct intel_uc_fw_file file_selected;bool user_overridden;size_t size;struct drm_i915_gem_object *obj; +/** * @dummy: A vma used in binding the uc fw to ggtt. We can't define this * vma on the stack as it can lead to a stack overflow, so we define it @@ -89,25 +101,8 @@ struct intel_uc_fw {struct i915_vma_resource dummy;struct i915_vma *rsa_data; -/* -* The firmware build process will generate a version header file with major and -* minor version defined. The versions are built into CSS header of firmware. -* i915 kernel driver set the minimal firmware version required per platform. -*/ -u16 major_ver_wanted; -u16 minor_ver_wanted; -u16 major_ver_found; -u16 minor_ver_found; - -struct { -const char *path; -u16 major_ver; -u16 minor_ver; - } fallback; -u32 rsa_size;u32 ucode_size; -u32 private_data_size;bool loaded_via_gsc;drivers/gpu/drm/i915/i915_gpu_error.c +8
-8@@ -1022,8 +1022,10 @@ static void cleanup_params(struct i915_gpu_coredump *error)static void cleanup_uc (struct intel_uc_coredump *uc) { -kfree (uc->guc_fw.path); -kfree (uc->huc_fw.path); +kfree (uc->guc_fw.file_selected.path); +kfree (uc->huc_fw.file_selected.path); +kfree (uc->guc_fw.file_wanted.path); +kfree (uc->huc_fw.file_wanted.path);i915_vma_coredump_free (uc->guc.vma_log);i915_vma_coredump_free (uc->guc.vma_ctb);@@ -1705,12 +1707,10 @@ gt_record_uc(struct intel_gt_coredump *gt,memcpy (&error_uc->guc_fw, &uc->guc.fw,sizeof (uc->guc.fw));memcpy (&error_uc->huc_fw, &uc->huc.fw,sizeof (uc->huc.fw)); -/* Non-default firmware paths will be specified by the modparam. -* As modparams are generally accesible from the userspace make -* explicit copies of the firmware paths. -*/ - error_uc->guc_fw.path =kstrdup (uc->guc.fw.path,ALLOW_FAIL ); - error_uc->huc_fw.path =kstrdup (uc->huc.fw.path,ALLOW_FAIL ); + error_uc->guc_fw.file_selected.path =kstrdup (uc->guc.fw.file_selected.path,ALLOW_FAIL ); + error_uc->huc_fw.file_selected.path =kstrdup (uc->huc.fw.file_selected.path,ALLOW_FAIL ); + error_uc->guc_fw.file_wanted.path =kstrdup (uc->guc.fw.file_wanted.path,ALLOW_FAIL ); + error_uc->huc_fw.file_wanted.path =kstrdup (uc->huc.fw.file_wanted.path,ALLOW_FAIL );/* * Save the GuC log and include a timestamp reference for converting the
Re: [PATCH v2 1/3] drm/i915/uc: Support for version reduced and multiple firmware files
Quoted 343 lines · Daniele
Quoted 110 lines · On 8/25/2022 8:05 PM, [email protected] wrote:
From: John Harrison <[email protected]>
There was a misunderstanding in how firmware file compatibility should be managed within i915. This has been clarified as:
i915 must support all existing firmware releases forever new minor firmware releases should replace prior versions only backwards compatibility breaking releases should be a new fileThis patch cleans up the single fallback file support that was added as a quick fix emergency effort. That is now removed in preference to supporting arbitrary numbers of firmware files per platform.
The patch also adds support for having GuC firmware files that are named by major version only (because the major version indicates backwards breaking changes that affect the KMD) and for having HuC firmware files with no version number at all (because the KMD has no interface requirements with the HuC).
For GuC, the driver will report via dmesg if the found file is older than expected. For HuC, the KMD will no longer require updating for any new HuC release so will not be able to report what the latest expected version is.
Signed-off-by John Harrison <[email protected]>---
.../gpu/drm/i915/gt/uc/intel_guc_submission.c| 10 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 442 ++++++++++++------ drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 33 +- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +-5 files changed, 319 insertions(+), 186 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc) if (guc->submission_initialized) return 0; - if (guc->fw.major_ver_found < 70) { + if (guc->fw.file_selected.major_ver < 70) { ret = guc_lrc_desc_pool_create_v69(guc); if (ret)return ret;
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop) GEM_BUG_ON(intel_context_is_child(ce)); trace_intel_context_register(ce); - if (guc->fw.major_ver_found >= 70) + if (guc->fw.file_selected.major_ver >= 70) ret = register_context_v70(guc, ce, loop);else
ret =register_context_v69(guc, ce, loop);drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop) set_context_registered(ce); spin_unlock_irqrestore(&ce->guc_state.lock, flags); - if (guc->fw.major_ver_found >= 70) + if (guc->fw.file_selected.major_ver >= 70) guc_context_policy_init_v70(ce, loop); }@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct
intel_guc*guc, u16guc_id,
u32preemption_timeout)
{
- if (guc->fw.major_ver_found>= 70) {
+ if (guc->fw.file_selected.major_ver>= 70) {
structcontext_policypolicy;
__guc_context_policy_start_klv(&policy, guc_id);drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-1@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce) static void __guc_context_set_prio(struct intel_guc *guc, struct intel_context *ce) { - if (guc->fw.major_ver_found >= 70) { + if (guc->fw.file_selected.major_ver >= 70) { struct context_policy policy; __guc_context_policy_start_klv(&policy, ce->guc_id.id);drivers/gpu/drm/i915/gt/uc/intel_uc.c +2
-2@@ -436,8 +436,8 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw) struct drm_i915_private *i915 = uc_to_gt(uc)->i915; drm_info(&i915->drm, "%s firmware %s version %u.%u\n", - intel_uc_fw_type_repr(fw->type), fw->path, - fw->major_ver_found, fw->minor_ver_found); + intel_uc_fw_type_repr(fw->type), fw->file_selected.path, + fw->file_selected.major_ver, fw->file_selected.minor_ver); } static int __uc_init_hw(struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +0
-0@@ -41,7 +41,7 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, "%s firmware -> %s\n", intel_uc_fw_type_repr(uc_fw->type),status ==
INTEL_UC_FIRMWARE_SELECTED?
-uc_fw->path:intel_uc_fw_status_repr(status));
+uc_fw->file_selected.path:intel_uc_fw_status_repr(status)); }
#endif
@@ -51,84 +51,149 @@ void intel_uc_fw_change_status(structintel_uc_fw*uc_fw, *
* Note that RKL and ADL-S have the same GuC/HuC device ID's and use the same
* firmware as TGL.Quoted 8 lines
+ *
+ * Version numbers:
+ * Originally, the driver required an exact match major/minor/patch furmware
+ * file and only supported that one version for any given platform. However,
+ * the new direction from upstream is to be becakwards compatible with alltypo becakwards
Quoted 221 lines
+ * prior releases and to be as flexible as possible as to what firmware is
+ * loaded.
+ *
+ * For GuC, the major version number signifies a backwards breaking API change.
+ * So, new format GuC firmware files are labelled by their major version only.
+ * For HuC, there is no KMD interaction, hence no version matching requirement.
+ * So, new format HuC firmware files have no version number at all.
+ *
+ * All of which means that the table below must keep all old format files with
+ * full three point version number. But newer files have reduced requirements.
+ * Having said that, the driver still needs to track the minor version number
+ * for GuC at least. As it is useful to report to the user that they are not
+ * running with a recent enough version for all KMD supported features,
+ * security fixes, etc. to be enabled.
*/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +39
-40-#define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_def) \ - fw_def(DG2, 0, guc_def(dg2, 70, 4, 1)) \ - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 70, 1, 1)) \ - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(DG1, 0, guc_def(dg1, 70, 1, 1)) \ - fw_def(ROCKETLAKE, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(TIGERLAKE, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(JASPERLAKE, 0, guc_def(ehl, 70, 1, 1)) \ - fw_def(ELKHARTLAKE, 0, guc_def(ehl, 70, 1, 1)) \ - fw_def(ICELAKE, 0, guc_def(icl, 70, 1, 1)) \ - fw_def(COMETLAKE, 5, guc_def(cml, 70, 1, 1)) \ - fw_def(COMETLAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(COFFEELAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(GEMINILAKE, 0, guc_def(glk, 70, 1, 1)) \ - fw_def(KABYLAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(BROXTON, 0, guc_def(bxt, 70, 1, 1)) \ - fw_def(SKYLAKE, 0, guc_def(skl, 70, 1, 1)) - -#define INTEL_GUC_FIRMWARE_DEFS_FALLBACK (fw_def, guc_def) \ - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 69, 0, 3)) \ - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 69, 0, 3)) - -#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_def) \ - fw_def(ALDERLAKE_P, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(ALDERLAKE_S, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(DG1, 0, huc_def(dg1, 7, 9, 3)) \ - fw_def(ROCKETLAKE, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(TIGERLAKE, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(JASPERLAKE, 0, huc_def(ehl, 9, 0, 0)) \ - fw_def(ELKHARTLAKE, 0, huc_def(ehl, 9, 0, 0)) \ - fw_def(ICELAKE, 0, huc_def(icl, 9, 0, 0)) \ - fw_def(COMETLAKE, 5, huc_def(cml, 4, 0, 0)) \ - fw_def(COMETLAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(COFFEELAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(GEMINILAKE, 0, huc_def(glk, 4, 0, 0)) \ - fw_def(KABYLAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(BROXTON, 0, huc_def(bxt, 2, 0, 0)) \ - fw_def(SKYLAKE, 0, huc_def(skl, 2, 0, 0)) - -#define __MAKE_UC_FW_PATH (prefix_, name_, major_, minor_, patch_) \ +#define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_maj, guc_mmp) \ + fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ + fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ELKHARTLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ICELAKE, 0, guc_mmp(icl, 70, 1, 1)) \ + fw_def(COMETLAKE, 5, guc_mmp(cml, 70, 1, 1)) \ + fw_def(COMETLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(COFFEELAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(GEMINILAKE, 0, guc_mmp(glk, 70, 1, 1)) \ + fw_def(KABYLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(BROXTON, 0, guc_mmp(bxt, 70, 1, 1)) \ + fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1)) + +#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_raw, huc_mmp) \ + fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ + fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(JASPERLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ELKHARTLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ICELAKE, 0, huc_mmp(icl, 9, 0, 0)) \ + fw_def(COMETLAKE, 5, huc_mmp(cml, 4, 0, 0)) \ + fw_def(COMETLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(COFFEELAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(GEMINILAKE, 0, huc_mmp(glk, 4, 0, 0)) \ + fw_def(KABYLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \ + fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0)) + +/* +* Set of macros for producing a list of filenames from the above table.
+ */drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +10
-0+#define __MAKE_UC_FW_PATH_BLANK (prefix_, name_) \ + "i915/" \ + __stringify(prefix_) name_ ".bin" + +#define __MAKE_UC_FW_PATH_MAJOR (prefix_, name_, major_) \ + "i915/" \ + __stringify(prefix_) name_ \ + __stringify(major_) ".bin" + +#define __MAKE_UC_FW_PATH_MMP (prefix_, name_, major_, minor_, patch_) \"i915/" \
__stringify(prefix_)name_\
__stringify(major_)"." \
__stringify(minor_)"." \
__stringify(patch_)".bin"
-#defineMAKE_GUC_FW_PATH(prefix_, major_, minor_, patch_)\
-__MAKE_UC_FW_PATH(prefix_, "_guc_", major_, minor_, patch_)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +3
-0+/* Minor for internal driver use, not part of file name */ +#define MAKE_GUC_FW_PATH_MAJOR (prefix_, major_, minor_) \ + __MAKE_UC_FW_PATH_MAJOR(prefix_, "_guc_", major_)-#define
MAKE_HUC_FW_PATH(prefix_, major_, minor_, bld_num_)\
-__MAKE_UC_FW_PATH(prefix_, "_huc_", major_, minor_, bld_num_)+#defineMAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_)\
+__MAKE_UC_FW_PATH_MMP(prefix_, "_guc_", major_, minor_, patch_)-/* All blobs need to be declared viaMODULE_FIRMWARE()*/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +11
-0+#define MAKE_HUC_FW_PATH_BLANK (prefix_) \ + __MAKE_UC_FW_PATH_BLANK(prefix_, "_huc") + +#define MAKE_HUC_FW_PATH_MMP (prefix_, major_, minor_, patch_) \ + __MAKE_UC_FW_PATH_MMP(prefix_, "_huc_", major_, minor_, patch_) + +/* +* All blobs need to be declared via MODULE_FIRMWARE(). +* This first expansion of the table macros is solely to provide +* that declaration. +*/ #define
INTEL_UC_MODULE_FW(platform_, revid_, uc_)\
MODULE_FIRMWARE(uc_); -INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW,MAKE_GUC_FW_PATH)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-2-INTEL_GUC_FIRMWARE_DEFS_FALLBACK(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH) -INTEL_HUC_FIRMWARE_DEFS (INTEL_UC_MODULE_FW ,MAKE_HUC_FW_PATH ) +INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH_MAJOR,
MAKE_GUC_FW_PATH_MMP)
+INTEL_HUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW,MAKE_HUC_FW_PATH_BLANK,MAKE_HUC_FW_PATH_MMP)
-/* The below structs and macros are used to iterate across the list of blobs */ +/*
+ * The next expansion of the table macros (in__uc_fw_auto_selectbelow) provides
+ * actual data structures with both the filename and the version information.
+ * These structure arrays are then iterated over to the list of suitable files
+ * for the current platform and to then attempt to load those files, in the order
+ * listed, until one is successfully found.
+ */
struct__packeduc_fw_blob{
+ const char *path;
+ bool legacy;
u8 major;
u8 minor;
- const char *path;
+ u8 patch;
};
-#defineUC_FW_BLOB(major_, minor_, path_)\
- { .major =major_, .minor =minor_, .path =path_}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +13
-0+#define UC_FW_BLOB_BASE (major_, minor_, patch_, path_) \ + .major = major_, \ + .minor = minor_, \ + .patch = patch_, \ + .path = path_, + +#define UC_FW_BLOB_NEW (major_, minor_, patch_, path_) \ + { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ + .legacy = false } + +#define UC_FW_BLOB_OLD (major_, minor_, patch_, path_) \ + { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ + .legacy = true }-#define
GUC_FW_BLOB(prefix_, major_, minor_, patch_)\
- UC_FW_BLOB(major_,minor_, \
-MAKE_GUC_FW_PATH(prefix_, major_, minor_, patch_)) +#defineGUC_FW_BLOB(prefix_, major_, minor_)\
+ UC_FW_BLOB_NEW(major_,minor_, 0, \
+MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_)) -#defineHUC_FW_BLOB(prefix_, major_, minor_, bld_num_)\
- UC_FW_BLOB(major_,minor_, \
-MAKE_HUC_FW_PATH(prefix_, major_, minor_, bld_num_))drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +10
-0+#define GUC_FW_BLOB_MMP (prefix_, major_, minor_, patch_) \ + UC_FW_BLOB_OLD(major_, minor_, patch_, \ + MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_)) + +#define HUC_FW_BLOB (prefix_) \ + UC_FW_BLOB_NEW(0, 0, 0, MAKE_HUC_FW_PATH_BLANK(prefix_)) + +#define HUC_FW_BLOB_MMP (prefix_, major_, minor_, patch_) \ + UC_FW_BLOB_OLD(major_, minor_, patch_, \ + MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))struct
__packeduc_fw_platform_requirement{
enumintel_platformp;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +2
-5@@ -152,18 +217,16 @@ static void __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) { static const struct uc_fw_platform_requirement blobs_guc[] = { - INTEL_GUC_FIRMWARE_DEFS(MAKE_FW_LIST, GUC_FW_BLOB) - }; - static const struct uc_fw_platform_requirement blobs_guc_fallback[] = { - INTEL_GUC_FIRMWARE_DEFS_FALLBACK(MAKE_FW_LIST, GUC_FW_BLOB) + INTEL_GUC_FIRMWARE_DEFS(MAKE_FW_LIST, GUC_FW_BLOB,GUC_FW_BLOB_MMP ) }; static const struct uc_fw_platform_requirement blobs_huc[] = { - INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB) + INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB, HUC_FW_BLOB_MMP)
Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c static void · line 229
Quoted 6 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-0}; static const struct fw_blobs_by_type blobs_all[INTEL_UC_FW_NUM_TYPES] = { [INTEL_UC_FW_TYPE_GUC] = { blobs_guc, ARRAY_SIZE(blobs_guc) }, [INTEL_UC_FW_TYPE_HUC] = { blobs_huc, ARRAY_SIZE(blobs_huc) }, }; + static bool verified;is this static to only run the test once per boot?
Yes.
No point in doing the same test per firmware blob attempt per GT per device when the list itself is static and immutable.
Quoted 34 lines
Quoted 34 lines
const struct
uc_fw_platform_requirement*fw_blobs; enumintel_platformp = INTEL_INFO(i915)->platform; u32fw_count;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-17@@ -184,49 +247,94 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) fw_count = blobs_all[uc_fw->type].count; for (i = 0; i < fw_count && p <= fw_blobs[i].p; i++) { - if (p == fw_blobs[i].p && rev >= fw_blobs[i].rev) { - const struct uc_fw_blob *blob = &fw_blobs[i].blob; - uc_fw->path = blob->path; - uc_fw->wanted_path = blob->path; - uc_fw->major_ver_wanted = blob->major; - uc_fw->minor_ver_wanted = blob->minor; - break; - } - } + const struct uc_fw_blob *blob = &fw_blobs[i].blob; - if (uc_fw->type == INTEL_UC_FW_TYPE_GUC) { - const struct uc_fw_platform_requirement *blobs = blobs_guc_fallback; - u32 count = ARRAY_SIZE(blobs_guc_fallback); + if (p != fw_blobs[i].p) + continue; - for (i = 0; i < count && p <= blobs[i].p; i++) { - if (p == blobs[i].p && rev >= blobs[i].rev) { - const struct uc_fw_blob *blob = &blobs[i].blob; + if (rev < fw_blobs[i].rev) + continue; - uc_fw->fallback.path = blob->path; - uc_fw->fallback.major_ver = blob->major; - uc_fw->fallback.minor_ver = blob->minor; - break; - }
Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) · line 263
Quoted 6 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-0+ if (uc_fw->file_selected.path) { + if (uc_fw->file_selected.path == blob->path) + uc_fw->file_selected.path = NULL; + + continue; }Does this work with 3 versions for the same platform if the 2 newer ones are not available? let's say we have v1, v2 and v3. v3 (newer) gets selected first but not found, so we call back in this function again and match v3 in the path check, clear the selected and continue, selecting v2 in the next round. if v2 is also not found, we call back in here starting from v3, which will not match the path check, so we'll continue below and assign it. Or am I missing something?
The second round will call back in with v2 as 'selected' not v3. So it will skip over v3, match on v2 and return v1.
John.
Quoted 509 lines
everything else looks ok.
Daniele
Quoted 503 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +10
-1+ + uc_fw->file_selected.path = blob->path; + uc_fw->file_wanted.path = blob->path; + uc_fw->file_wanted.major_ver = blob->major; + uc_fw->file_wanted.minor_ver = blob->minor; + break; } /* make sure the list is ordered as expected */ - if (IS_ENABLED(CONFIG_DRM_I915_SELFTEST)) { + if (IS_ENABLED(CONFIG_DRM_I915_SELFTEST) && !verified) { + verified = true; + for (i = 1; i < fw_count; i++) { + /* Next platform is good: */ if (fw_blobs[i].p < fw_blobs[i - 1].p) continue;+ /* Next platform revision is good: */
if (fw_blobs[i].p == fw_blobs[i - 1].p &&
fw_blobs[i].rev < fw_blobs[i - 1].rev)
continue;
- drm_err(&i915->drm, "Invalid FW blob order: %s r%u comes before %s r%u\n", -intel_platform_name(fw_blobs[i - 1].p),
- fw_blobs[i - 1].rev,
-intel_platform_name(fw_blobs[i].p),
- fw_blobs[i].rev);
+ /* Platform/revision must be in order: */
+ if (fw_blobs[i].p != fw_blobs[i - 1].p ||
+ fw_blobs[i].rev != fw_blobs[i - 1].rev)
+ goto bad;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7
-0+ + /* Next major version is good: */ + if (fw_blobs[i].blob.major < fw_blobs[i - 1].blob.major) + continue; + + /* New must be before legacy: */ + if (!fw_blobs[i].blob.legacy && fw_blobs[i -1].blob.legacy)
+ goto bad;
+
+ /* New to legacy also means 0.0 to X.Y (HuC), or X.0 to X.Y (GuC) */
+ if (fw_blobs[i].blob.legacy && !fw_blobs[i - 1].blob.legacy) {
+ if (!fw_blobs[i - 1].blob.major)
+ continue;
+
+ if (fw_blobs[i].blob.major == fw_blobs[i - 1].blob.major)
+ continue;
+ }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +8
-0+ + /* Major versions must be in order: */ + if (fw_blobs[i].blob.major != fw_blobs[i - 1].blob.major) + goto bad; + + /* Next minor version is good: */ + if (fw_blobs[i].blob.minor < fw_blobs[i - 1].blob.minor) + continue;-
uc_fw->path= NULL;
+ /* Minor versions must be in order: */
+ if (fw_blobs[i].blob.minor != fw_blobs[i - 1].blob.minor) + goto bad;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7
-0+ + /* Patch versions must be in order: */ + if (fw_blobs[i].blob.patch <= fw_blobs[i - 1].blob.patch) + continue; + +bad: + drm_err(&i915->drm, "\x1B[35;1mInvalid FW blob order: %sr%u %s%d.%d.%d comes before %s r%u %s%d.%d.%d\n",
+intel_platform_name(fw_blobs[i - 1].p), fw_blobs[i - 1].rev,
+ fw_blobs[i - 1].blob.legacy ? "L" : "v", + fw_blobs[i - 1].blob.major,
+ fw_blobs[i - 1].blob.minor,
+ fw_blobs[i - 1].blob.patch,
+intel_platform_name(fw_blobs[i].p), fw_blobs[i].rev, + fw_blobs[i].blob.legacy ? "L" : "v",
+ fw_blobs[i].blob.major,
+ fw_blobs[i].blob.minor,
+ fw_blobs[i].blob.patch);
+
+uc_fw->file_selected.path= NULL;
}
}
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +0
-0@@ -259,7 +367,7 @@ static void __uc_fw_user_override(struct
drm_i915_private*i915, structintel_uc
}
if (unlikely(path)) {
-uc_fw->path= path;
+uc_fw->file_selected.path= path;
uc_fw->user_overridden= true;
}
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -283,7 +391,7 @@ void intel_uc_fw_init_early(struct intel_uc_fw*uc_fw, */ BUILD_BUG_ON(INTEL_UC_FIRMWARE_UNINITIALIZED); GEM_BUG_ON(uc_fw->status); - GEM_BUG_ON(uc_fw->path); + GEM_BUG_ON(uc_fw->file_selected.path); uc_fw->type = type; @@ -292,7 +400,7 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw,
__uc_fw_user_override(i915, uc_fw);
}
- intel_uc_fw_change_status(uc_fw,uc_fw->path?*uc_fw->path? + intel_uc_fw_change_status(uc_fw,uc_fw->file_selected.path?*uc_fw->file_selected.path?
INTEL_UC_FIRMWARE_SELECTED:
INTEL_UC_FIRMWARE_DISABLED:
INTEL_UC_FIRMWARE_NOT_SUPPORTED);drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +13
-12@@ -305,32 +413,32 @@ static void __force_fw_fetch_failures(struct intel_uc_fw *uc_fw, int e) if (i915_inject_probe_error(i915, e)) { /* non-existing blob */ - uc_fw->path = "<invalid>"; + uc_fw->file_selected.path = "<invalid>"; uc_fw->user_overridden = user; } else if (i915_inject_probe_error(i915, e)) { /* require next major version */ - uc_fw->major_ver_wanted += 1; - uc_fw->minor_ver_wanted = 0; + uc_fw->file_wanted.major_ver += 1; + uc_fw->file_wanted.minor_ver = 0; uc_fw->user_overridden = user; } else if (i915_inject_probe_error(i915, e)) { /* require next minor version */ - uc_fw->minor_ver_wanted += 1; + uc_fw->file_wanted.minor_ver += 1; uc_fw->user_overridden = user; - } else if (uc_fw->major_ver_wanted && + } else if (uc_fw->file_wanted.major_ver && i915_inject_probe_error(i915, e)) { /* require prev major version */ - uc_fw->major_ver_wanted -= 1; - uc_fw->minor_ver_wanted = 0; + uc_fw->file_wanted.major_ver -= 1; + uc_fw->file_wanted.minor_ver = 0; uc_fw->user_overridden = user; - } else if (uc_fw->minor_ver_wanted && + } else if (uc_fw->file_wanted.minor_ver && i915_inject_probe_error(i915, e)) { /* require prev minor version - hey, this should work! */ - uc_fw->minor_ver_wanted -= 1; + uc_fw->file_wanted.minor_ver -= 1; uc_fw->user_overridden = user; } else if (user && i915_inject_probe_error(i915, e)) { /* officially unsupported platform */ - uc_fw->major_ver_wanted = 0; - uc_fw->minor_ver_wanted = 0; + uc_fw->file_wanted.major_ver = 0; + uc_fw->file_wanted.minor_ver = 0; uc_fw->user_overridden = true; } }@@ -341,8 +449,8 @@ static int check_gsc_manifest(const structfirmware *fw, u32 *dw = (u32 *)fw->data; u32 version = dw[HUC_GSC_VERSION_DW]; - uc_fw->major_ver_found = FIELD_GET(HUC_GSC_MAJOR_VER_MASK, version); - uc_fw->minor_ver_found = FIELD_GET(HUC_GSC_MINOR_VER_MASK, version); + uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_MASK , version); + uc_fw->file_selected.minor_ver =
FIELD_GET(HUC_GSC_MINOR_VER_MASK, version);
return 0;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -357,7 +465,7 @@ static int check_ccs_header(struct drm_i915_private *i915, /* Check the size of the blob before examining buffer contents */ if (unlikely(fw->size < sizeof(struct uc_css_header))) { drm_warn(&i915->drm, "%s firmware %s: invalid size: %zu < %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, fw->size, sizeof(struct uc_css_header));return
-ENODATA;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -370,7 +478,7 @@ static int check_ccs_header(struct drm_i915_private *i915, if (unlikely(size != sizeof(struct uc_css_header))) { drm_warn(&i915->drm, "%s firmware %s: unexpected header size: %zu != %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, fw->size, sizeof(struct uc_css_header));return
-EPROTO;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -385,7 +493,7 @@ static int check_ccs_header(structdrm_i915_private *i915, size = sizeof(struct uc_css_header) + uc_fw->ucode_size + uc_fw->rsa_size; if (unlikely(fw->size < size)) { drm_warn(&i915->drm, "%s firmware %s: invalid size: %zu < %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, fw->size, size);return
-ENOEXEC;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +27
-20@@ -394,16 +502,16 @@ static int check_ccs_header(structdrm_i915_private *i915, size = __intel_uc_fw_get_upload_size(uc_fw); if (unlikely(size >= i915->wopcm.size)) { drm_warn(&i915->drm, "%s firmware %s: invalid size: %zu > %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, size, (size_t)i915->wopcm.size); return -E2BIG; } /* Get version numbers from the CSS header */ - uc_fw->major_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MAJOR, - css->sw_version); - uc_fw->minor_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MINOR, - css->sw_version); + uc_fw->file_selected.major_ver = FIELD_GET(CSS_SW_VERSION_UC_MAJOR, + css->sw_version); + uc_fw->file_selected.minor_ver = FIELD_GET(CSS_SW_VERSION_UC_MINOR, + css->sw_version); if (uc_fw->type == INTEL_UC_FW_TYPE_GUC) uc_fw->private_data_size = css->private_data_size;@@ -422,9 +530,11 @@ static int check_ccs_header(structdrm_i915_private *i915, int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) { struct drm_i915_private *i915 = __uc_fw_to_gt(uc_fw)->i915; + struct intel_uc_fw_file file_ideal; struct device *dev = i915->drm.dev; struct drm_i915_gem_object *obj; const struct firmware *fw = NULL; + bool old_ver = false; int err; GEM_BUG_ON(!i915->wopcm.size);@@ -437,27 +547,33 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) __force_fw_fetch_failures(uc_fw, -EINVAL); __force_fw_fetch_failures(uc_fw, -ESTALE); - err = firmware_request_nowarn(&fw, uc_fw->path, dev); - if (err && !intel_uc_fw_is_overridden(uc_fw) && uc_fw->fallback.path) { - err = firmware_request_nowarn(&fw, uc_fw->fallback.path, dev); - if (!err) { - drm_notice(&i915->drm, - "%s firmware %s is recommended, but only %s was found\n", - intel_uc_fw_type_repr(uc_fw->type), - uc_fw->wanted_path, - uc_fw->fallback.path); - drm_info(&i915->drm, - "Consider updating your linux-firmware pkg or downloading from %s\n", - INTEL_UC_FIRMWARE_URL); - - uc_fw->path = uc_fw->fallback.path; - uc_fw->major_ver_wanted = uc_fw->fallback.major_ver; - uc_fw->minor_ver_wanted = uc_fw->fallback.minor_ver; + err = firmware_request_nowarn(&fw, uc_fw->file_selected.path, dev); + memcpy(&file_ideal, &uc_fw->file_wanted, sizeof(file_ideal)); + if (!err || intel_uc_fw_is_overridden(uc_fw)) + goto done; + + while (err == -ENOENT) { + __uc_fw_auto_select(i915, uc_fw); + if (!uc_fw->file_selected.path) { + /* + * No more options! But set the path back to something + * valid just in case it gets dereferenced. + */ + uc_fw->file_selected.path = file_ideal.path; + + /* Also, preserve the version that was really wanted */ + memcpy(&uc_fw->file_wanted, &file_ideal,sizeof (uc_fw->file_wanted)); + break; } + + err = firmware_request_nowarn(&fw, uc_fw->file_selected.path, dev); } + if (err) goto fail;+
old_ver= true;
+done:
if (uc_fw->loaded_via_gsc)
err =check_gsc_manifest(fw, uc_fw);
elsedrivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +0
-0@@ -465,18 +581,39 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) if (err) goto fail;- if (
uc_fw->major_ver_found!=uc_fw->major_ver_wanted||
-uc_fw->minor_ver_found<uc_fw->minor_ver_wanted) {
- drm_notice(&i915->drm, "%s firmware %s: unexpected version:
%u.%u != %u.%u\n",
-intel_uc_fw_type_repr(uc_fw->type),uc_fw->path,
-uc_fw->major_ver_found,uc_fw->minor_ver_found,
-uc_fw->major_ver_wanted,uc_fw->minor_ver_wanted); - if (!intel_uc_fw_is_overridden(uc_fw)) {
- err =-ENOEXEC;
- goto fail;
+ if (uc_fw->file_wanted.major_ver) {
+ /* Check the file's major version was as it claimed */
+ if (uc_fw->file_selected.major_ver!=uc_fw->file_wanted.major_ver) {
+ drm_notice(&i915->drm, "%s firmware %s: unexpected
version: %u.%u != %u.%u\n",
+intel_uc_fw_type_repr(uc_fw->type),uc_fw->file_selected.path,
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver,
+uc_fw->file_wanted.major_ver,uc_fw->file_wanted.minor_ver);
+ if (!intel_uc_fw_is_overridden(uc_fw)) {
+ err =-ENOEXEC;
+ goto fail;
+ }
+ } else {
+ if (uc_fw->file_selected.minor_ver<uc_fw->file_wanted.minor_ver)
+old_ver= true;
}
}
+ if (old_ver) {
+ /* Preserve the version that was really wanted */
+memcpy(&uc_fw->file_wanted, &file_ideal, sizeof(uc_fw->file_wanted));
+
+ drm_notice(&i915->drm,
+ "%s firmware %s (%d.%d) is recommended, but only %s (%d.%d) was found\n",
+intel_uc_fw_type_repr(uc_fw->type),
+uc_fw->file_wanted.path,
+uc_fw->file_wanted.major_ver,uc_fw->file_wanted.minor_ver,
+uc_fw->file_selected.path,
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
+ drm_info(&i915->drm,
+ "Consider updating your linux-firmware pkg or downloading from %s\n",
+INTEL_UC_FIRMWARE_URL);
+ }
+
if (HAS_LMEM(i915)) {
obj =i915_gem_object_create_lmem_from_data(i915, fw->data, fw->size); if (!IS_ERR(obj))drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -503,7 +640,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) INTEL_UC_FIRMWARE_ERROR); i915_probe_error(i915, "%s firmware %s: fetch failed with error %d\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, err); + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, err); drm_info(&i915->drm, "%s firmware(s) can be downloaded from %s\n", intel_uc_fw_type_repr(uc_fw->type), INTEL_UC_FIRMWARE_URL); @@ -645,7 +782,7 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw, u32 dst_offset, u32 dma_flags)fail:
i915_probe_error(gt->i915, "Failed to load %s firmware %s (%d)\n", -intel_uc_fw_type_repr(uc_fw->type),uc_fw->path, +intel_uc_fw_type_repr(uc_fw->type),uc_fw->file_selected.path,
err);
intel_uc_fw_change_status(uc_fw, INTEL_UC_FIRMWARE_LOAD_FAIL); return err;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7
-10@@ -864,18 +1001,19 @@ size_t intel_uc_fw_copy_rsa(struct intel_uc_fw *uc_fw, void *dst, u32 max_len) void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) { drm_printf(p, "%s firmware: %s\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->wanted_path); - if (uc_fw->fallback.path) { - drm_printf(p, "%s firmware fallback: %s\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->fallback.path); - drm_printf(p, "fallback selected: %s\n", - str_yes_no(uc_fw->path == uc_fw->fallback.path)); - } + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path); + if (uc_fw->file_selected.path != uc_fw->file_wanted.path) + drm_printf(p, "%s firmware wanted: %s\n", + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_wanted.path); drm_printf(p, "\tstatus: %s\n", intel_uc_fw_status_repr(uc_fw->status)); - drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n", - uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted, - uc_fw->major_ver_found, uc_fw->minor_ver_found); + if (uc_fw->file_wanted.major_ver) + drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n", + uc_fw->file_wanted.major_ver,
uc_fw->file_wanted.minor_ver,
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
+ else
+ drm_printf(p, "\tversion: found %u.%u\n",
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
drm_printf(p, "\tuCode: %u bytes\n", uc_fw->ucode_size);drm_printf(p, "\tRSA: %u bytes\n", uc_fw->rsa_size); }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0@@ -64,6 +64,17 @@ enum intel_uc_fw_type { }; #define INTEL_UC_FW_NUM_TYPES 2+/*
+ * The firmware build process will generate a version header file with major and
+ * minor version defined. The versions are built into CSS header of firmware.
+ * i915 kernel driver set the minimal firmware version required per platform.
+ */drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +6
-0+struct intel_uc_fw_file { + const char *path; + u16 major_ver; + u16 minor_ver; +}; +/*
* This structure encapsulates all the data needed during the process
* of fetching, caching, and loading the firmware image into the uC.drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0@@ -74,11 +85,12 @@ struct intel_uc_fw { const enum intel_uc_fw_status status;enum
intel_uc_fw_status__status; /* no accidental overwrites */ };
- const char*wanted_path;
- const char *path;
+ structintel_uc_fw_filefile_wanted;
+ structintel_uc_fw_filefile_selected;
booluser_overridden;
size_tsize;
structdrm_i915_gem_object*obj;
+
/**
* @dummy: A vma used in binding the uc fw to ggtt. We can't define this
* vma on the stack as it can lead to a stack overflow, so we define itdrivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0@@ -89,25 +101,8 @@ struct intel_uc_fw { struct i915_vma_resource dummy; struct i915_vma *rsa_data;- /*
- * The firmware build process will generate a version header file with major and
- * minor version defined. The versions are built into CSS header of firmware.
- * i915 kernel driver set the minimal firmware version required per platform.
- */
- u16major_ver_wanted;
- u16minor_ver_wanted;
- u16major_ver_found;
- u16minor_ver_found;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-7- - struct { - const char *path; - u16 major_ver; - u16 minor_ver; - } fallback; -u32
rsa_size;
u32ucode_size;
-
u32private_data_size;
boolloaded_via_gsc;drivers/gpu/drm/i915/i915_gpu_error.c +4
-2@@ -1022,8 +1022,10 @@ static void cleanup_params(struct i915_gpu_coredump *error) static void cleanup_uc(struct intel_uc_coredump *uc) { - kfree(uc->guc_fw.path); - kfree(uc->huc_fw.path); + kfree(uc->guc_fw.file_selected.path); + kfree(uc->huc_fw.file_selected.path); + kfree(uc->guc_fw.file_wanted.path); + kfree(uc->huc_fw.file_wanted.path); i915_vma_coredump_free(uc->guc.vma_log); i915_vma_coredump_free(uc->guc.vma_ctb); @@ -1705,12 +1707,10 @@ gt_record_uc(struct intel_gt_coredump *gt,
memcpy(&error_uc->guc_fw, &uc->guc.fw, sizeof(uc->guc.fw));memcpy(&error_uc->huc_fw, &uc->huc.fw, sizeof(uc->huc.fw)); - /* Non-default firmware paths will be specified by the modparam. - * As modparams are generally accesible from the userspace make - * explicit copies of the firmware paths.
- */
-error_uc->guc_fw.path=kstrdup(uc->guc.fw.path, ALLOW_FAIL); -error_uc->huc_fw.path=kstrdup(uc->huc.fw.path, ALLOW_FAIL); +error_uc->guc_fw.file_selected.path=kstrdup(uc->guc.fw.file_selected.path, ALLOW_FAIL);
+error_uc->huc_fw.file_selected.path=kstrdup(uc->huc.fw.file_selected.path, ALLOW_FAIL);
+error_uc->guc_fw.file_wanted.path=kstrdup(uc->guc.fw.file_wanted.path, ALLOW_FAIL);
+error_uc->huc_fw.file_wanted.path=kstrdup(uc->huc.fw.file_wanted.path, ALLOW_FAIL);
/*
* Save the GuC log and include a timestamp reference for converting the
Ceraolo Spurio, Daniele
Reviewed-byRe: [PATCH v2 1/3] drm/i915/uc: Support for version reduced and multiple firmware files
Quoted 401 lines · John Harrison
Quoted 346 lines · Daniele
Quoted 111 lines · On 8/25/2022 8:05 PM, [email protected] wrote:
From: John Harrison <[email protected]>
There was a misunderstanding in how firmware file compatibility should be managed within i915. This has been clarified as:
i915 must support all existing firmware releases forever new minor firmware releases should replace prior versions only backwards compatibility breaking releases should be a new fileThis patch cleans up the single fallback file support that was added as a quick fix emergency effort. That is now removed in preference to supporting arbitrary numbers of firmware files per platform.
The patch also adds support for having GuC firmware files that are named by major version only (because the major version indicates backwards breaking changes that affect the KMD) and for having HuC firmware files with no version number at all (because the KMD has no interface requirements with the HuC).
For GuC, the driver will report via dmesg if the found file is older than expected. For HuC, the KMD will no longer require updating for any new HuC release so will not be able to report what the latest expected version is.
Signed-off-by John Harrison <[email protected]>---
.../gpu/drm/i915/gt/uc/intel_guc_submission.c| 10 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 442
++++++++++++------
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 33 +- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +-5 files changed, 319 insertions(+), 186 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc) if (guc->submission_initialized) return 0; - if (guc->fw.major_ver_found < 70) { + if (guc->fw.file_selected.major_ver < 70) { ret = guc_lrc_desc_pool_create_v69(guc); if (ret)return ret;
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop) GEM_BUG_ON(intel_context_is_child(ce)); trace_intel_context_register(ce); - if (guc->fw.major_ver_found >= 70) + if (guc->fw.file_selected.major_ver >= 70) ret = register_context_v70(guc, ce, loop);else
ret =register_context_v69(guc, ce, loop);drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop) set_context_registered(ce); spin_unlock_irqrestore(&ce->guc_state.lock, flags); - if (guc->fw.major_ver_found >= 70) + if (guc->fw.file_selected.major_ver >= 70) guc_context_policy_init_v70(ce, loop); }@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct
intel_guc*guc, u16guc_id,
u32preemption_timeout)
{
- if (guc->fw.major_ver_found>= 70) {
+ if (guc->fw.file_selected.major_ver>= 70) {
structcontext_policypolicy;
__guc_context_policy_start_klv(&policy, guc_id);drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-1@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce) static void __guc_context_set_prio(struct intel_guc *guc, struct intel_context *ce) { - if (guc->fw.major_ver_found >= 70) { + if (guc->fw.file_selected.major_ver >= 70) { struct context_policy policy; __guc_context_policy_start_klv(&policy, ce->guc_id.id);drivers/gpu/drm/i915/gt/uc/intel_uc.c +2
-2@@ -436,8 +436,8 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw) struct drm_i915_private *i915 = uc_to_gt(uc)->i915; drm_info(&i915->drm, "%s firmware %s version %u.%u\n", - intel_uc_fw_type_repr(fw->type), fw->path, - fw->major_ver_found, fw->minor_ver_found); + intel_uc_fw_type_repr(fw->type), fw->file_selected.path, + fw->file_selected.major_ver, fw->file_selected.minor_ver); } static int __uc_init_hw(struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +0
-0@@ -41,7 +41,7 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, "%s firmware -> %s\n", intel_uc_fw_type_repr(uc_fw->type),status ==
INTEL_UC_FIRMWARE_SELECTED?
-uc_fw->path:intel_uc_fw_status_repr(status));
+uc_fw->file_selected.path:intel_uc_fw_status_repr(status)); }
#endif
@@ -51,84 +51,149 @@ void intel_uc_fw_change_status(structintel_uc_fw*uc_fw, *
* Note that RKL and ADL-S have the same GuC/HuC device ID's and use the same
* firmware as TGL.Quoted 8 lines
+ *
+ * Version numbers:
+ * Originally, the driver required an exact match major/minor/patch furmware
+ * file and only supported that one version for any given platform. However,
+ * the new direction from upstream is to be becakwards compatible with alltypo becakwards
Quoted 223 lines
+ * prior releases and to be as flexible as possible as to what firmware is
+ * loaded.
+ *
+ * For GuC, the major version number signifies a backwards breaking API change.
+ * So, new format GuC firmware files are labelled by their major version only.
+ * For HuC, there is no KMD interaction, hence no version matching requirement.
+ * So, new format HuC firmware files have no version number at all.
+ *
+ * All of which means that the table below must keep all old format files with
+ * full three point version number. But newer files have reduced requirements.
+ * Having said that, the driver still needs to track the minor version number
+ * for GuC at least. As it is useful to report to the user that they are not
+ * running with a recent enough version for all KMD supported features,
+ * security fixes, etc. to be enabled.
*/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +39
-40-#define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_def) \ - fw_def(DG2, 0, guc_def(dg2, 70, 4, 1)) \ - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 70, 1, 1)) \ - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(DG1, 0, guc_def(dg1, 70, 1, 1)) \ - fw_def(ROCKETLAKE, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(TIGERLAKE, 0, guc_def(tgl, 70, 1, 1)) \ - fw_def(JASPERLAKE, 0, guc_def(ehl, 70, 1, 1)) \ - fw_def(ELKHARTLAKE, 0, guc_def(ehl, 70, 1, 1)) \ - fw_def(ICELAKE, 0, guc_def(icl, 70, 1, 1)) \ - fw_def(COMETLAKE, 5, guc_def(cml, 70, 1, 1)) \ - fw_def(COMETLAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(COFFEELAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(GEMINILAKE, 0, guc_def(glk, 70, 1, 1)) \ - fw_def(KABYLAKE, 0, guc_def(kbl, 70, 1, 1)) \ - fw_def(BROXTON, 0, guc_def(bxt, 70, 1, 1)) \ - fw_def(SKYLAKE, 0, guc_def(skl, 70, 1, 1)) - -#define INTEL_GUC_FIRMWARE_DEFS_FALLBACK (fw_def, guc_def) \ - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 69, 0, 3)) \ - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 69, 0, 3)) - -#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_def) \ - fw_def(ALDERLAKE_P, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(ALDERLAKE_S, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(DG1, 0, huc_def(dg1, 7, 9, 3)) \ - fw_def(ROCKETLAKE, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(TIGERLAKE, 0, huc_def(tgl, 7, 9, 3)) \ - fw_def(JASPERLAKE, 0, huc_def(ehl, 9, 0, 0)) \ - fw_def(ELKHARTLAKE, 0, huc_def(ehl, 9, 0, 0)) \ - fw_def(ICELAKE, 0, huc_def(icl, 9, 0, 0)) \ - fw_def(COMETLAKE, 5, huc_def(cml, 4, 0, 0)) \ - fw_def(COMETLAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(COFFEELAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(GEMINILAKE, 0, huc_def(glk, 4, 0, 0)) \ - fw_def(KABYLAKE, 0, huc_def(kbl, 4, 0, 0)) \ - fw_def(BROXTON, 0, huc_def(bxt, 2, 0, 0)) \ - fw_def(SKYLAKE, 0, huc_def(skl, 2, 0, 0)) - -#define __MAKE_UC_FW_PATH (prefix_, name_, major_, minor_, patch_) \ +#define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_maj, guc_mmp) \ + fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ + fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ELKHARTLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ICELAKE, 0, guc_mmp(icl, 70, 1, 1)) \ + fw_def(COMETLAKE, 5, guc_mmp(cml, 70, 1, 1)) \ + fw_def(COMETLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(COFFEELAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(GEMINILAKE, 0, guc_mmp(glk, 70, 1, 1)) \ + fw_def(KABYLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(BROXTON, 0, guc_mmp(bxt, 70, 1, 1)) \ + fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1)) + +#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_raw, huc_mmp) \ + fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ + fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(JASPERLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ELKHARTLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ICELAKE, 0, huc_mmp(icl, 9, 0, 0)) \ + fw_def(COMETLAKE, 5, huc_mmp(cml, 4, 0, 0)) \ + fw_def(COMETLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(COFFEELAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(GEMINILAKE, 0, huc_mmp(glk, 4, 0, 0)) \ + fw_def(KABYLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \ + fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0)) + +/* +* Set of macros for producing a list of filenames from the above table.
+ */drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +10
-0+#define __MAKE_UC_FW_PATH_BLANK (prefix_, name_) \ + "i915/" \ + __stringify(prefix_) name_ ".bin" + +#define __MAKE_UC_FW_PATH_MAJOR (prefix_, name_, major_) \ + "i915/" \ + __stringify(prefix_) name_ \ + __stringify(major_) ".bin" + +#define __MAKE_UC_FW_PATH_MMP(prefix_, name_, major_, minor_,
patch_) \
"i915/" \
__stringify(prefix_)name_\
__stringify(major_)"." \
__stringify(minor_)"." \
__stringify(patch_)".bin"
-#defineMAKE_GUC_FW_PATH(prefix_, major_, minor_, patch_)\
-__MAKE_UC_FW_PATH(prefix_, "_guc_", major_, minor_, patch_)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +3
-0+/* Minor for internal driver use, not part of file name */ +#define MAKE_GUC_FW_PATH_MAJOR (prefix_, major_, minor_) \ + __MAKE_UC_FW_PATH_MAJOR(prefix_, "_guc_", major_)-#define
MAKE_HUC_FW_PATH(prefix_, major_, minor_, bld_num_)\
-__MAKE_UC_FW_PATH(prefix_, "_huc_", major_, minor_, bld_num_)+#defineMAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_)\
+__MAKE_UC_FW_PATH_MMP(prefix_, "_guc_", major_, minor_, patch_)-/* All blobs need to be declared viaMODULE_FIRMWARE()*/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +11
-0+#define MAKE_HUC_FW_PATH_BLANK (prefix_) \ + __MAKE_UC_FW_PATH_BLANK(prefix_, "_huc") + +#define MAKE_HUC_FW_PATH_MMP (prefix_, major_, minor_, patch_) \ + __MAKE_UC_FW_PATH_MMP(prefix_, "_huc_", major_, minor_, patch_) + +/* +* All blobs need to be declared via MODULE_FIRMWARE(). +* This first expansion of the table macros is solely to provide +* that declaration. +*/ #define
INTEL_UC_MODULE_FW(platform_, revid_, uc_)\
MODULE_FIRMWARE(uc_); -INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW,MAKE_GUC_FW_PATH)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-2-INTEL_GUC_FIRMWARE_DEFS_FALLBACK(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH) -INTEL_HUC_FIRMWARE_DEFS (INTEL_UC_MODULE_FW ,MAKE_HUC_FW_PATH ) +INTEL_GUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW, MAKE_GUC_FW_PATH_MAJOR,
MAKE_GUC_FW_PATH_MMP)
+INTEL_HUC_FIRMWARE_DEFS(INTEL_UC_MODULE_FW,MAKE_HUC_FW_PATH_BLANK,MAKE_HUC_FW_PATH_MMP)
-/* The below structs and macros are used to iterate across the list of blobs */ +/*
+ * The next expansion of the table macros (in__uc_fw_auto_selectbelow) provides
+ * actual data structures with both the filename and the version information.
+ * These structure arrays are then iterated over to the list of suitable files
+ * for the current platform and to then attempt to load those
files, in the order
+ * listed, until one is successfully found.
+ */
struct__packeduc_fw_blob{
+ const char *path;
+ bool legacy;
u8 major;
u8 minor;
- const char *path;
+ u8 patch;
};
-#defineUC_FW_BLOB(major_, minor_, path_)\
- { .major =major_, .minor =minor_, .path =path_}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +13
-0+#define UC_FW_BLOB_BASE (major_, minor_, patch_, path_) \ + .major = major_, \ + .minor = minor_, \ + .patch = patch_, \ + .path = path_, + +#define UC_FW_BLOB_NEW (major_, minor_, patch_, path_) \ + { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ + .legacy = false } + +#define UC_FW_BLOB_OLD (major_, minor_, patch_, path_) \ + { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ + .legacy = true }-#define
GUC_FW_BLOB(prefix_, major_, minor_, patch_)\
- UC_FW_BLOB(major_,minor_, \
-MAKE_GUC_FW_PATH(prefix_, major_, minor_, patch_)) +#defineGUC_FW_BLOB(prefix_, major_, minor_)\
+ UC_FW_BLOB_NEW(major_,minor_, 0, \
+MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_)) -#defineHUC_FW_BLOB(prefix_, major_, minor_, bld_num_)\
- UC_FW_BLOB(major_,minor_, \
-MAKE_HUC_FW_PATH(prefix_, major_, minor_, bld_num_))drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +10
-0+#define GUC_FW_BLOB_MMP (prefix_, major_, minor_, patch_) \ + UC_FW_BLOB_OLD(major_, minor_, patch_, \ + MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_)) + +#define HUC_FW_BLOB (prefix_) \ + UC_FW_BLOB_NEW(0, 0, 0, MAKE_HUC_FW_PATH_BLANK(prefix_)) + +#define HUC_FW_BLOB_MMP (prefix_, major_, minor_, patch_) \ + UC_FW_BLOB_OLD(major_, minor_, patch_, \ + MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))struct
__packeduc_fw_platform_requirement{
enumintel_platformp;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +2
-5@@ -152,18 +217,16 @@ static void __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) { static const struct uc_fw_platform_requirement blobs_guc[] = { - INTEL_GUC_FIRMWARE_DEFS(MAKE_FW_LIST, GUC_FW_BLOB) - }; - static const struct uc_fw_platform_requirement blobs_guc_fallback[] = { - INTEL_GUC_FIRMWARE_DEFS_FALLBACK(MAKE_FW_LIST, GUC_FW_BLOB) + INTEL_GUC_FIRMWARE_DEFS(MAKE_FW_LIST, GUC_FW_BLOB,GUC_FW_BLOB_MMP ) }; static const struct uc_fw_platform_requirement blobs_huc[] = { - INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB) + INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB, HUC_FW_BLOB_MMP)Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c static void · line 229
Quoted 6 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-0}; static const struct fw_blobs_by_type blobs_all[INTEL_UC_FW_NUM_TYPES] = { [INTEL_UC_FW_TYPE_GUC] = { blobs_guc, ARRAY_SIZE(blobs_guc) }, [INTEL_UC_FW_TYPE_HUC] = { blobs_huc, ARRAY_SIZE(blobs_huc) }, }; + static bool verified;is this static to only run the test once per boot?
Yes.
No point in doing the same test per firmware blob attempt per GT per device when the list itself is static and immutable.
Quoted 34 lines
Quoted 34 lines
const struct
uc_fw_platform_requirement*fw_blobs; enumintel_platformp = INTEL_INFO(i915)->platform; u32fw_count;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-17@@ -184,49 +247,94 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) fw_count = blobs_all[uc_fw->type].count; for (i = 0; i < fw_count && p <= fw_blobs[i].p; i++) { - if (p == fw_blobs[i].p && rev >= fw_blobs[i].rev) { - const struct uc_fw_blob *blob = &fw_blobs[i].blob; - uc_fw->path = blob->path; - uc_fw->wanted_path = blob->path; - uc_fw->major_ver_wanted = blob->major; - uc_fw->minor_ver_wanted = blob->minor; - break; - } - } + const struct uc_fw_blob *blob = &fw_blobs[i].blob; - if (uc_fw->type == INTEL_UC_FW_TYPE_GUC) { - const struct uc_fw_platform_requirement *blobs = blobs_guc_fallback; - u32 count = ARRAY_SIZE(blobs_guc_fallback); + if (p != fw_blobs[i].p) + continue; - for (i = 0; i < count && p <= blobs[i].p; i++) { - if (p == blobs[i].p && rev >= blobs[i].rev) { - const struct uc_fw_blob *blob = &blobs[i].blob; + if (rev < fw_blobs[i].rev) + continue; - uc_fw->fallback.path = blob->path; - uc_fw->fallback.major_ver = blob->major; - uc_fw->fallback.minor_ver = blob->minor; - break; - }Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) · line 263
Quoted 6 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-0+ if (uc_fw->file_selected.path) { + if (uc_fw->file_selected.path == blob->path) + uc_fw->file_selected.path = NULL; + + continue; }Does this work with 3 versions for the same platform if the 2 newer ones are not available? let's say we have v1, v2 and v3. v3 (newer) gets selected first but not found, so we call back in this function again and match v3 in the path check, clear the selected and continue, selecting v2 in the next round. if v2 is also not found, we call back in here starting from v3, which will not match the path check, so we'll continue below and assign it. Or am I missing something?
Quoted 1 line
The second round will call back in with v2 as 'selected' not v3. So it will skip over v3, match on v2 and return v1.
My bad, I had read this as if the "continue" was in the inner if and not the outer one, hence my confusion. It's ok like this. I do think we might want still want to add a test or something to check that fallbacks with more than one version work, but we can do that as a follow up as such case doesn't currently exist.
with that typo fixed:
Daniele
Quoted 516 lines
John.
Quoted 512 lines
everything else looks ok.
Daniele
Quoted 506 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +10
-1+ + uc_fw->file_selected.path = blob->path; + uc_fw->file_wanted.path = blob->path; + uc_fw->file_wanted.major_ver = blob->major; + uc_fw->file_wanted.minor_ver = blob->minor; + break; } /* make sure the list is ordered as expected */ - if (IS_ENABLED(CONFIG_DRM_I915_SELFTEST)) { + if (IS_ENABLED(CONFIG_DRM_I915_SELFTEST) && !verified) { + verified = true; + for (i = 1; i < fw_count; i++) { + /* Next platform is good: */ if (fw_blobs[i].p < fw_blobs[i - 1].p) continue;+ /* Next platform revision is good: */
if (fw_blobs[i].p == fw_blobs[i - 1].p &&
fw_blobs[i].rev < fw_blobs[i - 1].rev)
continue;
- drm_err(&i915->drm, "Invalid FW blob order: %s r%u comes before %s r%u\n", -intel_platform_name(fw_blobs[i - 1].p),
- fw_blobs[i - 1].rev,
-intel_platform_name(fw_blobs[i].p),
- fw_blobs[i].rev);
+ /* Platform/revision must be in order: */
+ if (fw_blobs[i].p != fw_blobs[i - 1].p ||
+ fw_blobs[i].rev != fw_blobs[i - 1].rev)
+ goto bad;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7
-0+ + /* Next major version is good: */ + if (fw_blobs[i].blob.major < fw_blobs[i - 1].blob.major) + continue; + + /* New must be before legacy: */ + if (!fw_blobs[i].blob.legacy && fw_blobs[i -1].blob.legacy)
+ goto bad;
+
+ /* New to legacy also means 0.0 to X.Y (HuC), or X.0 to X.Y (GuC) */
+ if (fw_blobs[i].blob.legacy && !fw_blobs[i - 1].blob.legacy) {
+ if (!fw_blobs[i - 1].blob.major)
+ continue;
+
+ if (fw_blobs[i].blob.major == fw_blobs[i - 1].blob.major)
+ continue;
+ }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +8
-0+ + /* Major versions must be in order: */ + if (fw_blobs[i].blob.major != fw_blobs[i - 1].blob.major) + goto bad; + + /* Next minor version is good: */ + if (fw_blobs[i].blob.minor < fw_blobs[i - 1].blob.minor) + continue;-
uc_fw->path= NULL;
+ /* Minor versions must be in order: */
+ if (fw_blobs[i].blob.minor != fw_blobs[i - 1].blob.minor) + goto bad;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7
-0+ + /* Patch versions must be in order: */ + if (fw_blobs[i].blob.patch <= fw_blobs[i - 1].blob.patch) + continue; + +bad: + drm_err(&i915->drm, "\x1B[35;1mInvalid FW blob order:%s r%u %s%d.%d.%d comes before %s r%u %s%d.%d.%d\n",
+intel_platform_name(fw_blobs[i - 1].p), fw_blobs[i
- 1].rev,
+ fw_blobs[i - 1].blob.legacy ? "L" : "v", + fw_blobs[i - 1].blob.major,
+ fw_blobs[i - 1].blob.minor,
+ fw_blobs[i - 1].blob.patch,
+intel_platform_name(fw_blobs[i].p), fw_blobs[i].rev, + fw_blobs[i].blob.legacy ? "L" : "v",
+ fw_blobs[i].blob.major,
+ fw_blobs[i].blob.minor,
+ fw_blobs[i].blob.patch);
+
+uc_fw->file_selected.path= NULL;
}
}
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +0
-0@@ -259,7 +367,7 @@ static void __uc_fw_user_override(struct
drm_i915_private*i915, structintel_uc
}
if (unlikely(path)) {
-uc_fw->path= path;
+uc_fw->file_selected.path= path;
uc_fw->user_overridden= true;
}
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -283,7 +391,7 @@ void intel_uc_fw_init_early(struct intel_uc_fw*uc_fw, */ BUILD_BUG_ON(INTEL_UC_FIRMWARE_UNINITIALIZED); GEM_BUG_ON(uc_fw->status); - GEM_BUG_ON(uc_fw->path); + GEM_BUG_ON(uc_fw->file_selected.path); uc_fw->type = type; @@ -292,7 +400,7 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw,
__uc_fw_user_override(i915, uc_fw);
}
- intel_uc_fw_change_status(uc_fw,uc_fw->path?*uc_fw->path? + intel_uc_fw_change_status(uc_fw,uc_fw->file_selected.path?*uc_fw->file_selected.path?
INTEL_UC_FIRMWARE_SELECTED:
INTEL_UC_FIRMWARE_DISABLED:
INTEL_UC_FIRMWARE_NOT_SUPPORTED);drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +13
-12@@ -305,32 +413,32 @@ static void __force_fw_fetch_failures(struct intel_uc_fw *uc_fw, int e) if (i915_inject_probe_error(i915, e)) { /* non-existing blob */ - uc_fw->path = "<invalid>"; + uc_fw->file_selected.path = "<invalid>"; uc_fw->user_overridden = user; } else if (i915_inject_probe_error(i915, e)) { /* require next major version */ - uc_fw->major_ver_wanted += 1; - uc_fw->minor_ver_wanted = 0; + uc_fw->file_wanted.major_ver += 1; + uc_fw->file_wanted.minor_ver = 0; uc_fw->user_overridden = user; } else if (i915_inject_probe_error(i915, e)) { /* require next minor version */ - uc_fw->minor_ver_wanted += 1; + uc_fw->file_wanted.minor_ver += 1; uc_fw->user_overridden = user; - } else if (uc_fw->major_ver_wanted && + } else if (uc_fw->file_wanted.major_ver && i915_inject_probe_error(i915, e)) { /* require prev major version */ - uc_fw->major_ver_wanted -= 1; - uc_fw->minor_ver_wanted = 0; + uc_fw->file_wanted.major_ver -= 1; + uc_fw->file_wanted.minor_ver = 0; uc_fw->user_overridden = user; - } else if (uc_fw->minor_ver_wanted && + } else if (uc_fw->file_wanted.minor_ver && i915_inject_probe_error(i915, e)) { /* require prev minor version - hey, this should work! */ - uc_fw->minor_ver_wanted -= 1; + uc_fw->file_wanted.minor_ver -= 1; uc_fw->user_overridden = user; } else if (user && i915_inject_probe_error(i915, e)) { /* officially unsupported platform */ - uc_fw->major_ver_wanted = 0; - uc_fw->minor_ver_wanted = 0; + uc_fw->file_wanted.major_ver = 0; + uc_fw->file_wanted.minor_ver = 0; uc_fw->user_overridden = true; } }@@ -341,8 +449,8 @@ static int check_gsc_manifest(const structfirmware *fw, u32 *dw = (u32 *)fw->data; u32 version = dw[HUC_GSC_VERSION_DW]; - uc_fw->major_ver_found = FIELD_GET(HUC_GSC_MAJOR_VER_MASK, version); - uc_fw->minor_ver_found = FIELD_GET(HUC_GSC_MINOR_VER_MASK, version); + uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_MASK , version); + uc_fw->file_selected.minor_ver =
FIELD_GET(HUC_GSC_MINOR_VER_MASK, version);
return 0;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -357,7 +465,7 @@ static int check_ccs_header(struct drm_i915_private *i915, /* Check the size of the blob before examining buffer contents */ if (unlikely(fw->size < sizeof(struct uc_css_header))) { drm_warn(&i915->drm, "%s firmware %s: invalid size: %zu < %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, fw->size, sizeof(struct uc_css_header));return
-ENODATA;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -370,7 +478,7 @@ static int check_ccs_header(struct drm_i915_private *i915, if (unlikely(size != sizeof(struct uc_css_header))) { drm_warn(&i915->drm, "%s firmware %s: unexpected header size: %zu != %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, fw->size, sizeof(struct uc_css_header));return
-EPROTO;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -385,7 +493,7 @@ static int check_ccs_header(structdrm_i915_private *i915, size = sizeof(struct uc_css_header) + uc_fw->ucode_size + uc_fw->rsa_size; if (unlikely(fw->size < size)) { drm_warn(&i915->drm, "%s firmware %s: invalid size: %zu < %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, fw->size, size);return
-ENOEXEC;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-5@@ -394,16 +502,16 @@ static int check_ccs_header(structdrm_i915_private *i915, size = __intel_uc_fw_get_upload_size(uc_fw); if (unlikely(size >= i915->wopcm.size)) { drm_warn(&i915->drm, "%s firmware %s: invalid size: %zu > %zu\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, size, (size_t)i915->wopcm.size); return -E2BIG; } /* Get version numbers from the CSS header */ - uc_fw->major_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MAJOR, - css->sw_version); - uc_fw->minor_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MINOR, - css->sw_version); + uc_fw->file_selected.major_ver =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , + css->sw_version); + uc_fw->file_selected.minor_ver =FIELD_GET (CSS_SW_VERSION_UC_MINOR , + css->sw_version);if (
uc_fw->type==INTEL_UC_FW_TYPE_GUC)uc_fw->private_data_size=css->private_data_size;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +22
-15@@ -422,9 +530,11 @@ static int check_ccs_header(structdrm_i915_private *i915, int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) { struct drm_i915_private *i915 = __uc_fw_to_gt(uc_fw)->i915; + struct intel_uc_fw_file file_ideal; struct device *dev = i915->drm.dev; struct drm_i915_gem_object *obj; const struct firmware *fw = NULL; + bool old_ver = false; int err; GEM_BUG_ON(!i915->wopcm.size);@@ -437,27 +547,33 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) __force_fw_fetch_failures(uc_fw, -EINVAL); __force_fw_fetch_failures(uc_fw, -ESTALE); - err = firmware_request_nowarn(&fw, uc_fw->path, dev); - if (err && !intel_uc_fw_is_overridden(uc_fw) && uc_fw->fallback.path) { - err = firmware_request_nowarn(&fw, uc_fw->fallback.path, dev); - if (!err) { - drm_notice(&i915->drm, - "%s firmware %s is recommended, but only %s was found\n", - intel_uc_fw_type_repr(uc_fw->type), - uc_fw->wanted_path, - uc_fw->fallback.path); - drm_info(&i915->drm, - "Consider updating your linux-firmware pkg or downloading from %s\n", - INTEL_UC_FIRMWARE_URL); - - uc_fw->path = uc_fw->fallback.path; - uc_fw->major_ver_wanted = uc_fw->fallback.major_ver; - uc_fw->minor_ver_wanted = uc_fw->fallback.minor_ver; + err = firmware_request_nowarn(&fw, uc_fw->file_selected.path, dev); + memcpy(&file_ideal, &uc_fw->file_wanted, sizeof(file_ideal)); + if (!err || intel_uc_fw_is_overridden(uc_fw)) + goto done; + + while (err == -ENOENT) { + __uc_fw_auto_select(i915, uc_fw); + if (!uc_fw->file_selected.path) { + /* + * No more options! But set the path back to something + * valid just in case it gets dereferenced. + */ + uc_fw->file_selected.path = file_ideal.path; + + /* Also, preserve the version that was really wanted */ + memcpy(&uc_fw->file_wanted, &file_ideal,sizeof (uc_fw->file_wanted)); + break; } + + err = firmware_request_nowarn(&fw, uc_fw->file_selected.path, dev); } + if (err)goto fail;
+old_ver= true;
+done:
if (uc_fw->loaded_via_gsc)
err =check_gsc_manifest(fw, uc_fw);
elsedrivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +0
-0@@ -465,18 +581,39 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) if (err) goto fail;- if (
uc_fw->major_ver_found!=uc_fw->major_ver_wanted||
-uc_fw->minor_ver_found<uc_fw->minor_ver_wanted) {
- drm_notice(&i915->drm, "%s firmware %s: unexpected version:
%u.%u != %u.%u\n",
-intel_uc_fw_type_repr(uc_fw->type),uc_fw->path,
-uc_fw->major_ver_found,uc_fw->minor_ver_found,
-uc_fw->major_ver_wanted,uc_fw->minor_ver_wanted); - if (!intel_uc_fw_is_overridden(uc_fw)) {
- err =-ENOEXEC;
- goto fail;
+ if (uc_fw->file_wanted.major_ver) {
+ /* Check the file's major version was as it claimed */
+ if (uc_fw->file_selected.major_ver!=uc_fw->file_wanted.major_ver) {
+ drm_notice(&i915->drm, "%s firmware %s: unexpected
version: %u.%u != %u.%u\n",
+intel_uc_fw_type_repr(uc_fw->type),uc_fw->file_selected.path,
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver,
+uc_fw->file_wanted.major_ver,uc_fw->file_wanted.minor_ver);
+ if (!intel_uc_fw_is_overridden(uc_fw)) {
+ err =-ENOEXEC;
+ goto fail;
+ }
+ } else {
+ if (uc_fw->file_selected.minor_ver<uc_fw->file_wanted.minor_ver)
+old_ver= true;
}
}
+ if (old_ver) {
+ /* Preserve the version that was really wanted */
+memcpy(&uc_fw->file_wanted, &file_ideal, sizeof(uc_fw->file_wanted));
+
+ drm_notice(&i915->drm,
+ "%s firmware %s (%d.%d) is recommended, but only %s (%d.%d) was found\n",
+intel_uc_fw_type_repr(uc_fw->type),
+uc_fw->file_wanted.path,
+uc_fw->file_wanted.major_ver,uc_fw->file_wanted.minor_ver,
+uc_fw->file_selected.path,
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
+ drm_info(&i915->drm,
+ "Consider updating your linux-firmware pkg or downloading from %s\n",
+INTEL_UC_FIRMWARE_URL);
+ }
+
if (HAS_LMEM(i915)) {
obj =i915_gem_object_create_lmem_from_data(i915, fw->data, fw->size); if (!IS_ERR(obj))drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +1
-1@@ -503,7 +640,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) INTEL_UC_FIRMWARE_ERROR); i915_probe_error(i915, "%s firmware %s: fetch failed with error %d\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, err); + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, err); drm_info(&i915->drm, "%s firmware(s) can be downloaded from %s\n", intel_uc_fw_type_repr(uc_fw->type), INTEL_UC_FIRMWARE_URL); @@ -645,7 +782,7 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw, u32 dst_offset, u32 dma_flags)fail:
i915_probe_error(gt->i915, "Failed to load %s firmware %s (%d)\n", -intel_uc_fw_type_repr(uc_fw->type),uc_fw->path, +intel_uc_fw_type_repr(uc_fw->type),uc_fw->file_selected.path,
err);
intel_uc_fw_change_status(uc_fw, INTEL_UC_FIRMWARE_LOAD_FAIL); return err;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7
-10@@ -864,18 +1001,19 @@ size_t intel_uc_fw_copy_rsa(struct intel_uc_fw *uc_fw, void *dst, u32 max_len) void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) { drm_printf(p, "%s firmware: %s\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->wanted_path); - if (uc_fw->fallback.path) { - drm_printf(p, "%s firmware fallback: %s\n", - intel_uc_fw_type_repr(uc_fw->type), uc_fw->fallback.path); - drm_printf(p, "fallback selected: %s\n", - str_yes_no(uc_fw->path == uc_fw->fallback.path)); - } + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path); + if (uc_fw->file_selected.path != uc_fw->file_wanted.path) + drm_printf(p, "%s firmware wanted: %s\n", + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_wanted.path); drm_printf(p, "\tstatus: %s\n", intel_uc_fw_status_repr(uc_fw->status)); - drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n", - uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted, - uc_fw->major_ver_found, uc_fw->minor_ver_found); + if (uc_fw->file_wanted.major_ver) + drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n", + uc_fw->file_wanted.major_ver,
uc_fw->file_wanted.minor_ver,
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
+ else
+ drm_printf(p, "\tversion: found %u.%u\n",
+uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
drm_printf(p, "\tuCode: %u bytes\n", uc_fw->ucode_size);drm_printf(p, "\tRSA: %u bytes\n", uc_fw->rsa_size); }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0@@ -64,6 +64,17 @@ enum intel_uc_fw_type { }; #define INTEL_UC_FW_NUM_TYPES 2+/*
+ * The firmware build process will generate a version header file with major and
+ * minor version defined. The versions are built into CSS header of firmware.
+ * i915 kernel driver set the minimal firmware version required per platform.
+ */drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +6
-0+struct intel_uc_fw_file { + const char *path; + u16 major_ver; + u16 minor_ver; +}; +/*
* This structure encapsulates all the data needed during the process
* of fetching, caching, and loading the firmware image into the uC.drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0@@ -74,11 +85,12 @@ struct intel_uc_fw { const enum intel_uc_fw_status status;enum
intel_uc_fw_status__status; /* no accidental overwrites */ };
- const char*wanted_path;
- const char *path;
+ structintel_uc_fw_filefile_wanted;
+ structintel_uc_fw_filefile_selected;
booluser_overridden;
size_tsize;
structdrm_i915_gem_object*obj;
+
/**
* @dummy: A vma used in binding the uc fw to ggtt. We can't define this
* vma on the stack as it can lead to a stack overflow, so we define itdrivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0@@ -89,25 +101,8 @@ struct intel_uc_fw { struct i915_vma_resource dummy; struct i915_vma *rsa_data;- /*
- * The firmware build process will generate a version header file with major and
- * minor version defined. The versions are built into CSS header of firmware.
- * i915 kernel driver set the minimal firmware version required per platform.
- */
- u16major_ver_wanted;
- u16minor_ver_wanted;
- u16major_ver_found;
- u16minor_ver_found;drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-7- - struct { - const char *path; - u16 major_ver; - u16 minor_ver; - } fallback; -u32
rsa_size;
u32ucode_size;
-
u32private_data_size;
boolloaded_via_gsc;drivers/gpu/drm/i915/i915_gpu_error.c +4
-2@@ -1022,8 +1022,10 @@ static void cleanup_params(struct i915_gpu_coredump *error) static void cleanup_uc(struct intel_uc_coredump *uc) { - kfree(uc->guc_fw.path); - kfree(uc->huc_fw.path); + kfree(uc->guc_fw.file_selected.path); + kfree(uc->huc_fw.file_selected.path); + kfree(uc->guc_fw.file_wanted.path); + kfree(uc->huc_fw.file_wanted.path); i915_vma_coredump_free(uc->guc.vma_log); i915_vma_coredump_free(uc->guc.vma_ctb); @@ -1705,12 +1707,10 @@ gt_record_uc(struct intel_gt_coredump *gt,
memcpy(&error_uc->guc_fw, &uc->guc.fw, sizeof(uc->guc.fw));memcpy(&error_uc->huc_fw, &uc->huc.fw, sizeof(uc->huc.fw)); - /* Non-default firmware paths will be specified by the modparam. - * As modparams are generally accesible from the userspace make - * explicit copies of the firmware paths.
- */
-error_uc->guc_fw.path=kstrdup(uc->guc.fw.path, ALLOW_FAIL); -error_uc->huc_fw.path=kstrdup(uc->huc.fw.path, ALLOW_FAIL); +error_uc->guc_fw.file_selected.path=kstrdup(uc->guc.fw.file_selected.path, ALLOW_FAIL);
+error_uc->huc_fw.file_selected.path=kstrdup(uc->huc.fw.file_selected.path, ALLOW_FAIL);
+error_uc->guc_fw.file_wanted.path=kstrdup(uc->guc.fw.file_wanted.path, ALLOW_FAIL);
+error_uc->huc_fw.file_wanted.path=kstrdup(uc->huc.fw.file_wanted.path, ALLOW_FAIL);
/*
* Save the GuC log and include a timestamp reference for converting the
PATCH v2 2/3 drm/i915/uc: Add patch level version number support
In reply to [email protected]From: John Harrison <[email protected]>
With the move to un-versioned filenames, it becomes more difficult to know exactly what version of a given firmware is being used. So add the patch level version number to the debugfs output.
Also, support matching by patch level when selecting code paths for firmware compatibility. While a patch level change cannot be backwards breaking, it is potentially possible that a new feature only works from a given patch level onwards (even though it was theoretically added in an earlier version that bumped the major or minor version).
--- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 +++--- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 6 ++-- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 36 ++++++++++++++----- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 6 ++++ drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 8 +++-- 5 files changed, 47 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +5 -5
@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc)if (guc->submission_initialized)return 0 ; -if (guc->fw.file_selected.major_ver <70 ) { +if (GET_UC_VER (guc) <MAKE_UC_VER (70 ,0 ,0 )) { ret =guc_lrc_desc_pool_create_v69 (guc);if (ret)return ret;
@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop)GEM_BUG_ON (intel_context_is_child (ce));trace_intel_context_register (ce); -if (guc->fw.file_selected.major_ver >=70 ) +if (GET_UC_VER (guc) >=MAKE_UC_VER (70 ,0 ,0 )) ret =register_context_v70 (guc, ce, loop);else ret =register_context_v69 (guc, ce, loop);
@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop)set_context_registered (ce);spin_unlock_irqrestore (&ce->guc_state.lock, flags); -if (guc->fw.file_selected.major_ver >=70 ) +if (GET_UC_VER (guc) >=MAKE_UC_VER (70 ,0 ,0 ))guc_context_policy_init_v70 (ce, loop); }
@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct intel_guc *guc, u16 guc_id, u32 preemption_timeout) { -if (guc->fw.file_selected.major_ver >=70 ) { + if (GET_UC_VER(guc) >= MAKE_UC_VER(70, 0, 0)) {struct context_policy policy;__guc_context_policy_start_klv (&policy, guc_id);
@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce)static void __guc_context_set_prio (struct intel_guc *guc,struct intel_context *ce) { -if (guc->fw.file_selected.major_ver >=70 ) { +if (GET_UC_VER (guc) >=MAKE_UC_VER (70 ,0 ,0 )) {struct context_policy policy;__guc_context_policy_start_klv (&policy, ce->guc_id.id);
drivers/gpu/drm/i915/gt/uc/intel_uc.c +4 -2
@@ -435,9 +435,11 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw) {struct drm_i915_private *i915 =uc_to_gt (uc)->i915; -drm_info (&i915->drm,"%s firmware %s version %u.%u\n" , +drm_info (&i915->drm,"%s firmware %s version %u.%u.%u\n" ,intel_uc_fw_type_repr (fw->type), fw->file_selected.path, - fw->file_selected.major_ver, fw->file_selected.minor_ver); + fw->file_selected.major_ver, + fw->file_selected.minor_ver, + fw->file_selected.patch_ver); }static int __uc_init_hw (struct intel_uc *uc)
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +27 -9
@@ -447,10 +447,12 @@ static int check_gsc_manifest(const struct firmware *fw, struct intel_uc_fw *uc_fw) {u32 *dw = (u32 *)fw->data; -u32 version = dw[HUC_GSC_VERSION_DW ]; +u32 version_hi = dw[HUC_GSC_VERSION_HI_DW ]; +u32 version_lo = dw[HUC_GSC_VERSION_LO_DW ]; - uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_MASK , version); - uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_MASK , version); + uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_HI_MASK , version_hi); + uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_HI_MASK , version_hi); + uc_fw->file_selected.patch_ver =FIELD_GET (HUC_GSC_PATCH_VER_LO_MASK , version_lo);return 0 ; }
@@ -512,6 +514,8 @@ static int check_ccs_header(struct drm_i915_private *i915, css->sw_version); uc_fw->file_selected.minor_ver =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->sw_version); + uc_fw->file_selected.patch_ver =FIELD_GET (CSS_SW_VERSION_UC_PATCH , + css->sw_version);if (uc_fw->type ==INTEL_UC_FW_TYPE_GUC ) uc_fw->private_data_size = css->private_data_size;
@@ -1000,6 +1004,8 @@ size_t intel_uc_fw_copy_rsa(struct intel_uc_fw *uc_fw, void *dst, u32 max_len)*/ void intel_uc_fw_dump (const struct intel_uc_fw *uc_fw,struct drm_printer *p) { +u32 ver_sel, ver_want; +drm_printf (p,"%s firmware: %s\n" ,intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path);if (uc_fw->file_selected.path != uc_fw->file_wanted.path)
@@ -1007,13 +1013,25 @@ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_wanted.path);drm_printf (p,"\tstatus: %s\n" ,intel_uc_fw_status_repr (uc_fw->status)); -if (uc_fw->file_wanted.major_ver) -drm_printf (p,"\tversion: wanted %u.%u, found %u.%u\n" , - uc_fw->file_wanted.major_ver, uc_fw->file_wanted.minor_ver, - uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); + ver_sel =MAKE_UC_VER (uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver); + ver_want =MAKE_UC_VER (uc_fw->file_wanted.major_ver, + uc_fw->file_wanted.minor_ver, + uc_fw->file_wanted.patch_ver); +if (ver_sel < ver_want) +drm_printf (p,"\tversion: wanted %u.%u.%u, found %u.%u.%u\n" , + uc_fw->file_wanted.major_ver, + uc_fw->file_wanted.minor_ver, + uc_fw->file_wanted.patch_ver, + uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver);else -drm_printf (p,"\tversion: found %u.%u\n" , - uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); +drm_printf (p,"\tversion: found %u.%u.%u\n" , + uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver);drm_printf (p,"\tuCode: %u bytes\n" , uc_fw->ucode_size);drm_printf (p,"\tRSA: %u bytes\n" , uc_fw->rsa_size); }
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +6 -0
@@ -73,6 +73,7 @@ struct intel_uc_fw_file {const char *path;u16 major_ver;u16 minor_ver; +u16 patch_ver; };/*
@@ -108,6 +109,11 @@ struct intel_uc_fw {bool loaded_via_gsc; }; +#define MAKE_UC_VER (maj, min, pat) ((pat) | ((min) << 8) | ((maj) << 16)) +#define GET_UC_VER (uc) (MAKE_UC_VER((uc)->fw.file_selected.major_ver, \ + (uc)->fw.file_selected.minor_ver, \ + (uc)->fw.file_selected.patch_ver)) +#ifdef CONFIG_DRM_I915_DEBUG_GUC void intel_uc_fw_change_status (struct intel_uc_fw *uc_fw,enum intel_uc_fw_status status);
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +5 -3
@@ -83,8 +83,10 @@ struct uc_css_header { } __packed;static_assert (sizeof (struct uc_css_header ) ==128 ); -#define HUC_GSC_VERSION_DW 44 -#define HUC_GSC_MAJOR_VER_MASK (0xFF << 0) -#define HUC_GSC_MINOR_VER_MASK (0xFF << 16) +#define HUC_GSC_VERSION_HI_DW 44 +#define HUC_GSC_MAJOR_VER_HI_MASK (0xFF << 0) +#define HUC_GSC_MINOR_VER_HI_MASK (0xFF << 16) +#define HUC_GSC_VERSION_LO_DW 45 +#define HUC_GSC_PATCH_VER_LO_MASK (0xFF << 16)#endif /* _INTEL_UC_FW_ABI_H */
Signature · 1 line
2.37.2
Re: [PATCH v2 2/3] drm/i915/uc: Add patch level version number support
Quoted 171 lines · On 8/25/2022 8:05 PM, [email protected] wrote:
From: John Harrison <[email protected]>
With the move to un-versioned filenames, it becomes more difficult to know exactly what version of a given firmware is being used. So add the patch level version number to the debugfs output.
Also, support matching by patch level when selecting code paths for firmware compatibility. While a patch level change cannot be backwards breaking, it is potentially possible that a new feature only works from a given patch level onwards (even though it was theoretically added in an earlier version that bumped the major or minor version).
Signed-off-by John Harrison <[email protected]>--- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 +++--- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 6 ++-- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 36 ++++++++++++++----- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 6 ++++ drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 8 +++-- 5 files changed, 47 insertions(+), 19 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +5
-5@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc)if (guc->submission_initialized)return 0 ; -if (guc->fw.file_selected.major_ver <70 ) { +if (GET_UC_VER (guc) <MAKE_UC_VER (70 ,0 ,0 )) { ret =guc_lrc_desc_pool_create_v69 (guc);if (ret)return ret;@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop)GEM_BUG_ON (intel_context_is_child (ce));trace_intel_context_register (ce); -if (guc->fw.file_selected.major_ver >=70 ) +if (GET_UC_VER (guc) >=MAKE_UC_VER (70 ,0 ,0 )) ret =register_context_v70 (guc, ce, loop);else ret =register_context_v69 (guc, ce, loop);@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop)set_context_registered (ce);spin_unlock_irqrestore (&ce->guc_state.lock, flags); -if (guc->fw.file_selected.major_ver >=70 ) +if (GET_UC_VER (guc) >=MAKE_UC_VER (70 ,0 ,0 ))guc_context_policy_init_v70 (ce, loop); }@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct intel_guc *guc, u16 guc_id, u32 preemption_timeout) { -if (guc->fw.file_selected.major_ver >=70 ) { + if (GET_UC_VER(guc) >= MAKE_UC_VER(70, 0, 0)) {struct context_policy policy;__guc_context_policy_start_klv (&policy, guc_id);@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce)static void __guc_context_set_prio (struct intel_guc *guc,struct intel_context *ce) { -if (guc->fw.file_selected.major_ver >=70 ) { +if (GET_UC_VER (guc) >=MAKE_UC_VER (70 ,0 ,0 )) {struct context_policy policy;__guc_context_policy_start_klv (&policy, ce->guc_id.id);drivers/gpu/drm/i915/gt/uc/intel_uc.c +4
-2@@ -435,9 +435,11 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw) {struct drm_i915_private *i915 =uc_to_gt (uc)->i915; -drm_info (&i915->drm,"%s firmware %s version %u.%u\n" , +drm_info (&i915->drm,"%s firmware %s version %u.%u.%u\n" ,intel_uc_fw_type_repr (fw->type), fw->file_selected.path, - fw->file_selected.major_ver, fw->file_selected.minor_ver); + fw->file_selected.major_ver, + fw->file_selected.minor_ver, + fw->file_selected.patch_ver); }static int __uc_init_hw (struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +27
-9@@ -447,10 +447,12 @@ static int check_gsc_manifest(const struct firmware *fw, struct intel_uc_fw *uc_fw) {u32 *dw = (u32 *)fw->data; -u32 version = dw[HUC_GSC_VERSION_DW ]; +u32 version_hi = dw[HUC_GSC_VERSION_HI_DW ]; +u32 version_lo = dw[HUC_GSC_VERSION_LO_DW ]; - uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_MASK , version); - uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_MASK , version); + uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_HI_MASK , version_hi); + uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_HI_MASK , version_hi); + uc_fw->file_selected.patch_ver =FIELD_GET (HUC_GSC_PATCH_VER_LO_MASK , version_lo);return 0 ; }@@ -512,6 +514,8 @@ static int check_ccs_header(struct drm_i915_private *i915, css->sw_version); uc_fw->file_selected.minor_ver =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->sw_version); + uc_fw->file_selected.patch_ver =FIELD_GET (CSS_SW_VERSION_UC_PATCH , + css->sw_version);if (uc_fw->type ==INTEL_UC_FW_TYPE_GUC ) uc_fw->private_data_size = css->private_data_size;@@ -1000,6 +1004,8 @@ size_t intel_uc_fw_copy_rsa(struct intel_uc_fw *uc_fw, void *dst, u32 max_len)*/ void intel_uc_fw_dump (const struct intel_uc_fw *uc_fw,struct drm_printer *p) { +u32 ver_sel, ver_want; +drm_printf (p,"%s firmware: %s\n" ,intel_uc_fw_type_repr (uc_fw->type), uc_fw->file_selected.path);if (uc_fw->file_selected.path != uc_fw->file_wanted.path)@@ -1007,13 +1013,25 @@ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_wanted.path);drm_printf (p,"\tstatus: %s\n" ,intel_uc_fw_status_repr (uc_fw->status)); -if (uc_fw->file_wanted.major_ver) -drm_printf (p,"\tversion: wanted %u.%u, found %u.%u\n" , - uc_fw->file_wanted.major_ver, uc_fw->file_wanted.minor_ver, - uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); + ver_sel =MAKE_UC_VER (uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver); + ver_want =MAKE_UC_VER (uc_fw->file_wanted.major_ver, + uc_fw->file_wanted.minor_ver, + uc_fw->file_wanted.patch_ver); +if (ver_sel < ver_want) +drm_printf (p,"\tversion: wanted %u.%u.%u, found %u.%u.%u\n" , + uc_fw->file_wanted.major_ver, + uc_fw->file_wanted.minor_ver, + uc_fw->file_wanted.patch_ver, + uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver);else -drm_printf (p,"\tversion: found %u.%u\n" , - uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); +drm_printf (p,"\tversion: found %u.%u.%u\n" , + uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver);drm_printf (p,"\tuCode: %u bytes\n" , uc_fw->ucode_size);drm_printf (p,"\tRSA: %u bytes\n" , uc_fw->rsa_size); }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +1
-0@@ -73,6 +73,7 @@ struct intel_uc_fw_file {const char *path;u16 major_ver;u16 minor_ver; +u16 patch_ver; };/*
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h struct intel_uc_fw { · line 115
Quoted 7 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +4
-0@@ -108,6 +109,11 @@ struct intel_uc_fw {bool loaded_via_gsc; }; +#define MAKE_UC_VER (maj, min, pat) ((pat) | ((min) << 8) | ((maj) << 16)) +#define GET_UC_VER (uc) (MAKE_UC_VER((uc)->fw.file_selected.major_ver, \ + (uc)->fw.file_selected.minor_ver, \ + (uc)->fw.file_selected.patch_ver))
Might be worth saving this in a variable to not have to recalculate it each time. not a blocker.
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +1
-0+#ifdef CONFIG_DRM_I915_DEBUG_GUC void intel_uc_fw_change_status (struct intel_uc_fw *uc_fw,enum intel_uc_fw_status status);drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +0
-0@@ -83,8 +83,10 @@ struct uc_css_header { } __packed;
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h struct uc_css_header { · line 90
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +5
-3static_assert (sizeof (struct uc_css_header ) ==128 ); -#define HUC_GSC_VERSION_DW 44 -#define HUC_GSC_MAJOR_VER_MASK (0xFF << 0) -#define HUC_GSC_MINOR_VER_MASK (0xFF << 16) +#define HUC_GSC_VERSION_HI_DW 44 +#define HUC_GSC_MAJOR_VER_HI_MASK (0xFF << 0) +#define HUC_GSC_MINOR_VER_HI_MASK (0xFF << 16) +#define HUC_GSC_VERSION_LO_DW 45 +#define HUC_GSC_PATCH_VER_LO_MASK (0xFF << 16)
AFAICS the patch version is in the lower 16 bits here, while the higher 16 are the build number. e.g for dg2_7.10.0_gsc.bin (available in drm-firmware) I see:
[00000b0] 0007 000a 0000 0574
Daniele
Quoted 2 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +0
-0#endif /* _INTEL_UC_FW_ABI_H */
Re: [PATCH v2 2/3] drm/i915/uc: Add patch level version number support
Quoted 207 lines · Daniele
Quoted 175 lines · On 8/25/2022 8:05 PM, [email protected] wrote:
From: John Harrison <[email protected]>
With the move to un-versioned filenames, it becomes more difficult to know exactly what version of a given firmware is being used. So add the patch level version number to the debugfs output.
Also, support matching by patch level when selecting code paths for firmware compatibility. While a patch level change cannot be backwards breaking, it is potentially possible that a new feature only works from a given patch level onwards (even though it was theoretically added in an earlier version that bumped the major or minor version).
Signed-off-by John Harrison <[email protected]>---
.../gpu/drm/i915/gt/uc/intel_guc_submission.c| 10 +++--- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 6 ++-- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 36 ++++++++++++++----- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 6 ++++ drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 8 +++--5 files changed, 47 insertions(+), 19 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -1868,7 +1868,7 @@ int intel_guc_submission_init(struct intel_guc *guc) if (guc->submission_initialized) return 0; - if (guc->fw.file_selected.major_ver < 70) { + if (GET_UC_VER(guc) < MAKE_UC_VER(70, 0, 0)) { ret = guc_lrc_desc_pool_create_v69(guc); if (ret)return ret;
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -2303,7 +2303,7 @@ static int register_context(struct intel_context *ce, bool loop) GEM_BUG_ON(intel_context_is_child(ce)); trace_intel_context_register(ce); - if (guc->fw.file_selected.major_ver >= 70) + if (GET_UC_VER(guc) >= MAKE_UC_VER(70, 0, 0)) ret = register_context_v70(guc, ce, loop);else
ret =register_context_v69(guc, ce, loop);drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0@@ -2315,7 +2315,7 @@ static int register_context(struct intel_context *ce, bool loop) set_context_registered(ce); spin_unlock_irqrestore(&ce->guc_state.lock, flags); - if (guc->fw.file_selected.major_ver >= 70) + if (GET_UC_VER(guc) >= MAKE_UC_VER(70, 0, 0)) guc_context_policy_init_v70(ce, loop); }@@ -2921,7 +2921,7 @@ static void __guc_context_set_preemption_timeout(struct
intel_guc*guc, u16guc_id,
u32preemption_timeout)
{
- if (guc->fw.file_selected.major_ver>= 70) {
+ if (GET_UC_VER(guc)>=MAKE_UC_VER(70, 0, 0)) {
structcontext_policypolicy;
__guc_context_policy_start_klv(&policy, guc_id);drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-1@@ -3186,7 +3186,7 @@ static int guc_context_alloc(struct intel_context *ce) static void __guc_context_set_prio(struct intel_guc *guc, struct intel_context *ce) { - if (guc->fw.file_selected.major_ver >= 70) { + if (GET_UC_VER(guc) >= MAKE_UC_VER(70, 0, 0)) { struct context_policy policy; __guc_context_policy_start_klv(&policy, ce->guc_id.id);drivers/gpu/drm/i915/gt/uc/intel_uc.c +4
-1@@ -435,9 +435,11 @@ static void print_fw_ver(struct intel_uc *uc, struct intel_uc_fw *fw) { struct drm_i915_private *i915 = uc_to_gt(uc)->i915; - drm_info(&i915->drm, "%s firmware %s version %u.%u\n", + drm_info(&i915->drm, "%s firmware %s version %u.%u.%u\n", intel_uc_fw_type_repr(fw->type), fw->file_selected.path, - fw->file_selected.major_ver, fw->file_selected.minor_ver); + fw->file_selected.major_ver, + fw->file_selected.minor_ver, + fw->file_selected.patch_ver); } static int __uc_init_hw(struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +5
-2@@ -447,10 +447,12 @@ static int check_gsc_manifest(const struct firmware *fw, struct intel_uc_fw *uc_fw) { u32 *dw = (u32 *)fw->data; - u32 version = dw[HUC_GSC_VERSION_DW]; + u32 version_hi = dw[HUC_GSC_VERSION_HI_DW]; + u32 version_lo = dw[HUC_GSC_VERSION_LO_DW]; - uc_fw->file_selected.major_ver = FIELD_GET(HUC_GSC_MAJOR_VER_MASK, version); - uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_MASK , version); + uc_fw->file_selected.major_ver =FIELD_GET (HUC_GSC_MAJOR_VER_HI_MASK , version_hi); + uc_fw->file_selected.minor_ver =FIELD_GET (HUC_GSC_MINOR_VER_HI_MASK , version_hi); + uc_fw->file_selected.patch_ver =
FIELD_GET(HUC_GSC_PATCH_VER_LO_MASK, version_lo);
return 0;
}drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +4
-0@@ -512,6 +514,8 @@ static int check_ccs_header(structdrm_i915_private *i915, css->sw_version); uc_fw->file_selected.minor_ver = FIELD_GET(CSS_SW_VERSION_UC_MINOR, css->sw_version); + uc_fw->file_selected.patch_ver = FIELD_GET(CSS_SW_VERSION_UC_PATCH, + css->sw_version); if (uc_fw->type == INTEL_UC_FW_TYPE_GUC) uc_fw->private_data_size = css->private_data_size;@@ -1000,6 +1004,8 @@ size_t intel_uc_fw_copy_rsa(struct intel_uc_fw*uc_fw, void *dst, u32 max_len) */ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) { + u32 ver_sel, ver_want; + drm_printf(p, "%s firmware: %s\n", intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path);if (
uc_fw->file_selected.path!=uc_fw->file_wanted.path)drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +14
-4@@ -1007,13 +1013,25 @@ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p) intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_wanted.path); drm_printf(p, "\tstatus: %s\n", intel_uc_fw_status_repr(uc_fw->status)); - if (uc_fw->file_wanted.major_ver) - drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n", - uc_fw->file_wanted.major_ver, uc_fw->file_wanted.minor_ver, - uc_fw->file_selected.major_ver, uc_fw->file_selected.minor_ver); + ver_sel = MAKE_UC_VER(uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver); + ver_want = MAKE_UC_VER(uc_fw->file_wanted.major_ver, + uc_fw->file_wanted.minor_ver, + uc_fw->file_wanted.patch_ver); + if (ver_sel < ver_want) + drm_printf(p, "\tversion: wanted %u.%u.%u, found %u.%u.%u\n", + uc_fw->file_wanted.major_ver, + uc_fw->file_wanted.minor_ver, + uc_fw->file_wanted.patch_ver, + uc_fw->file_selected.major_ver, + uc_fw->file_selected.minor_ver, + uc_fw->file_selected.patch_ver);else
- drm_printf(p, "\tversion: found %u.%u\n",
-uc_fw->file_selected.major_ver,uc_fw->file_selected.minor_ver);
+ drm_printf(p, "\tversion: found %u.%u.%u\n", +uc_fw->file_selected.major_ver,
+uc_fw->file_selected.minor_ver,
+uc_fw->file_selected.patch_ver);drm_printf(p, "\tuCode: %u bytes\n", uc_fw->ucode_size);drm_printf(p, "\tRSA: %u bytes\n", uc_fw->rsa_size); }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +1
-0@@ -73,6 +73,7 @@ struct intel_uc_fw_file { const char *path; u16 major_ver; u16 minor_ver; + u16 patch_ver; }; /*drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h struct intel_uc_fw { · line 114
Quoted 6 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +3
-0@@ -108,6 +109,11 @@ struct intel_uc_fw { bool loaded_via_gsc; }; +#define MAKE_UC_VER(maj, min, pat) ((pat) | ((min) << 8) | ((maj) << 16)) +#define GET_UC_VER (uc) (MAKE_UC_VER((uc)->fw.file_selected.major_ver, \ + (uc)->fw.file_selected.minor_ver, \ + (uc)->fw.file_selected.patch_ver))Might be worth saving this in a variable to not have to recalculate it each time. not a blocker.
Quoted 12 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +1
-0+ #ifdef CONFIG_DRM_I915_DEBUG_GUC void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, enum intel_uc_fw_status status);drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +0
-0@@ -83,8 +83,10 @@ struct uc_css_header { } __packed; static_assert(sizeof(struct uc_css_header) == 128);-#define HUC_GSC_VERSION_DW 44
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h struct uc_css_header { · line 90
Quoted 7 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +5
-2-#define HUC_GSC_MAJOR_VER_MASK (0xFF << 0) -#define HUC_GSC_MINOR_VER_MASK (0xFF << 16) +#define HUC_GSC_VERSION_HI_DW 44 +#define HUC_GSC_MAJOR_VER_HI_MASK (0xFF << 0) +#define HUC_GSC_MINOR_VER_HI_MASK (0xFF << 16) +#define HUC_GSC_VERSION_LO_DW 45 +#define HUC_GSC_PATCH_VER_LO_MASK (0xFF << 16)AFAICS the patch version is in the lower 16 bits here, while the higher 16 are the build number. e.g for dg2_7.10.0_gsc.bin (available in drm-firmware) I see:
Quoted 3 lines
[00000b0] 0007 000a 0000 0574
Daniele
Hmm. You would indeed be correct. I swear I tested it. But probably I tested on a non-GSC version or something!
John.
Quoted 3 lines
Quoted 2 lines
#endif /*
_INTEL_UC_FW_ABI_H*/
PATCH v2 3/3 drm/i915/uc: Enable version reduced firmware files for newest platforms
In reply to [email protected]From: John Harrison <[email protected]>
Going forwards, the intention is for GuC firmware files to be named for their major version only and HuC firmware files to have no version number in the name at all. This patch adds those entries for DG1/2 and ADL-P/S.
--- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +7 -1
@@ -72,11 +72,14 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,* security fixes, etc. to be enabled. */ #define INTEL_GUC_FIRMWARE_DEFS (fw_def, guc_maj, guc_mmp) \ - fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(DG2, 0, guc_maj(dg2, 70, 4)) \ + fw_def(ALDERLAKE_P, 0, guc_maj(adlp, 70, 1)) \ fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_maj(tgl, 70, 1)) \ fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_maj(dg1, 70, 1)) \ fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \
@@ -92,8 +95,11 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1))#define INTEL_HUC_FIRMWARE_DEFS (fw_def, huc_raw, huc_mmp) \ + fw_def(ALDERLAKE_P, 0, huc_raw(tgl)) \ fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_raw(tgl)) \ fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_raw(dg1)) \ fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \
Signature · 1 line
2.37.2
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Drop version numbers from firmware files (rev3)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Drop version numbers from firmware files (rev3)
URL : https://patchwork.freedesktop.org/series/107340/
State : warning
== Summary ==
Error: dim checkpatch failede1d3119cb4c3 drm/i915/uc: Support for version reduced and multiple firmware files -:171: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #171: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:74:
+#define INTEL_GUC_FIRMWARE_DEFS(fw_def, guc_maj, guc_mmp) \
+ fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ + fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ELKHARTLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ICELAKE, 0, guc_mmp(icl, 70, 1, 1)) \ + fw_def(COMETLAKE, 5, guc_mmp(cml, 70, 1, 1)) \ + fw_def(COMETLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(COFFEELAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(GEMINILAKE, 0, guc_mmp(glk, 70, 1, 1)) \ + fw_def(KABYLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(BROXTON, 0, guc_mmp(bxt, 70, 1, 1)) \ + fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1))
-:171: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fw_def' - possible side-effects? #171: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:74:
+#define INTEL_GUC_FIRMWARE_DEFS(fw_def, guc_maj, guc_mmp) \
+ fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ + fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ELKHARTLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ICELAKE, 0, guc_mmp(icl, 70, 1, 1)) \ + fw_def(COMETLAKE, 5, guc_mmp(cml, 70, 1, 1)) \ + fw_def(COMETLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(COFFEELAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(GEMINILAKE, 0, guc_mmp(glk, 70, 1, 1)) \ + fw_def(KABYLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(BROXTON, 0, guc_mmp(bxt, 70, 1, 1)) \ + fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1))
-:171: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'guc_mmp' - possible side-effects? #171: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:74:
+#define INTEL_GUC_FIRMWARE_DEFS(fw_def, guc_maj, guc_mmp) \
+ fw_def(DG2, 0, guc_mmp(dg2, 70, 4, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ + fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ + fw_def(DG1, 0, guc_mmp(dg1, 70, 1, 1)) \ + fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ + fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ELKHARTLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ + fw_def(ICELAKE, 0, guc_mmp(icl, 70, 1, 1)) \ + fw_def(COMETLAKE, 5, guc_mmp(cml, 70, 1, 1)) \ + fw_def(COMETLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(COFFEELAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(GEMINILAKE, 0, guc_mmp(glk, 70, 1, 1)) \ + fw_def(KABYLAKE, 0, guc_mmp(kbl, 70, 1, 1)) \ + fw_def(BROXTON, 0, guc_mmp(bxt, 70, 1, 1)) \ + fw_def(SKYLAKE, 0, guc_mmp(skl, 70, 1, 1))
-:191: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #191: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:94:
+#define INTEL_HUC_FIRMWARE_DEFS(fw_def, huc_raw, huc_mmp) \
+ fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ + fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(JASPERLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ELKHARTLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ICELAKE, 0, huc_mmp(icl, 9, 0, 0)) \ + fw_def(COMETLAKE, 5, huc_mmp(cml, 4, 0, 0)) \ + fw_def(COMETLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(COFFEELAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(GEMINILAKE, 0, huc_mmp(glk, 4, 0, 0)) \ + fw_def(KABYLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \ + fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0))
-:191: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fw_def' - possible side-effects? #191: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:94:
+#define INTEL_HUC_FIRMWARE_DEFS(fw_def, huc_raw, huc_mmp) \
+ fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ + fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(JASPERLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ELKHARTLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ICELAKE, 0, huc_mmp(icl, 9, 0, 0)) \ + fw_def(COMETLAKE, 5, huc_mmp(cml, 4, 0, 0)) \ + fw_def(COMETLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(COFFEELAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(GEMINILAKE, 0, huc_mmp(glk, 4, 0, 0)) \ + fw_def(KABYLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \ + fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0))
-:191: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'huc_mmp' - possible side-effects? #191: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:94:
+#define INTEL_HUC_FIRMWARE_DEFS(fw_def, huc_raw, huc_mmp) \
+ fw_def(ALDERLAKE_P, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(ALDERLAKE_S, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(DG1, 0, huc_mmp(dg1, 7, 9, 3)) \ + fw_def(ROCKETLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(TIGERLAKE, 0, huc_mmp(tgl, 7, 9, 3)) \ + fw_def(JASPERLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ELKHARTLAKE, 0, huc_mmp(ehl, 9, 0, 0)) \ + fw_def(ICELAKE, 0, huc_mmp(icl, 9, 0, 0)) \ + fw_def(COMETLAKE, 5, huc_mmp(cml, 4, 0, 0)) \ + fw_def(COMETLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(COFFEELAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(GEMINILAKE, 0, huc_mmp(glk, 4, 0, 0)) \ + fw_def(KABYLAKE, 0, huc_mmp(kbl, 4, 0, 0)) \ + fw_def(BROXTON, 0, huc_mmp(bxt, 2, 0, 0)) \ + fw_def(SKYLAKE, 0, huc_mmp(skl, 2, 0, 0))
-:295: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'major_' - possible side-effects? #295: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:183:
+#define GUC_FW_BLOB(prefix_, major_, minor_) \
+ UC_FW_BLOB_NEW(major_, minor_, 0, \
+ MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_))
-:295: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'minor_' - possible side-effects? #295: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:183:
+#define GUC_FW_BLOB(prefix_, major_, minor_) \
+ UC_FW_BLOB_NEW(major_, minor_, 0, \
+ MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_))
-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'major_' - possible side-effects? #302: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:187:
+#define GUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \
+ UC_FW_BLOB_OLD(major_, minor_, patch_, \
+ MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))
-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'minor_' - possible side-effects? #302: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:187:
+#define GUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \
+ UC_FW_BLOB_OLD(major_, minor_, patch_, \
+ MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))
-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'patch_' - possible side-effects? #302: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:187:
+#define GUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \
+ UC_FW_BLOB_OLD(major_, minor_, patch_, \
+ MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))
-:309: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'major_' - possible side-effects? #309: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:194:
+#define HUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \
+ UC_FW_BLOB_OLD(major_, minor_, patch_, \
+ MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))
-:309: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'minor_' - possible side-effects? #309: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:194:
+#define HUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \
+ UC_FW_BLOB_OLD(major_, minor_, patch_, \
+ MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))
-:309: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'patch_' - possible side-effects? #309: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:194:
+#define HUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \
+ UC_FW_BLOB_OLD(major_, minor_, patch_, \
+ MAKE_HUC_FW_PATH_MMP(prefix_, major_, minor_, patch_))
total: 2 errors, 0 warnings, 12 checks, 766 lines checked d23062498c29 drm/i915/uc: Add patch level version number support -:172: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'uc' - possible side-effects? #172: FILE: drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:113:
+#define GET_UC_VER(uc) (MAKE_UC_VER((uc)->fw.file_selected.major_ver, \
+ (uc)->fw.file_selected.minor_ver, \
+ (uc)->fw.file_selected.patch_ver))
total: 0 errors, 0 warnings, 1 checks, 146 lines checked86e2aca8b8fc drm/i915/uc: Enable version reduced firmware files for newest platforms
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Drop version numbers from firmware files (rev3)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Drop version numbers from firmware files (rev3)
URL : https://patchwork.freedesktop.org/series/107340/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for Drop version numbers from firmware files (rev3)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Drop version numbers from firmware files (rev3)
URL : https://patchwork.freedesktop.org/series/107340/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12029 -> Patchwork_107340v3
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/index.html
Participating hosts (33 -> 32)
------------------------------
Missing (1): fi-kbl-soraka
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_107340v3:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_module_load@load:
- {bat-dg2-9}: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/bat-dg2-9/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/bat-dg2-9/igt@[email protected]
- {bat-dg2-8}: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/bat-dg2-8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/bat-dg2-8/igt@[email protected]
* igt@i915_selftest@live@ring_submission:
- {fi-ehl-2}: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-ehl-2/igt@i915_selftest@live@ring_submission.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-ehl-2/igt@i915_selftest@live@ring_submission.html
Known issues
------------
Here are the changes found in Patchwork_107340v3 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [PASS][7] -> [INCOMPLETE][8] ([i915#4785])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-hsw-4770/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-hsw-4770/igt@i915_selftest@[email protected]
- fi-hsw-g3258: [PASS][9] -> [INCOMPLETE][10] ([i915#3303] / [i915#4785])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-hsw-g3258/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-hsw-g3258/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- fi-pnv-d510: [PASS][11] -> [DMESG-FAIL][12] ([i915#4528])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-pnv-d510/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-pnv-d510/igt@i915_selftest@[email protected]
* igt@runner@aborted:
- fi-pnv-d510: NOTRUN -> [FAIL][13] ([fdo#109271] / [i915#2403] / [i915#4312])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-pnv-d510/igt@[email protected]
- fi-hsw-g3258: NOTRUN -> [FAIL][14] ([fdo#109271] / [i915#4312] / [i915#6246])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-hsw-g3258/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#6246]: https://gitlab.freedesktop.org/drm/intel/issues/6246
Build changes
-------------
* Linux: CI_DRM_12029 -> Patchwork_107340v3
CI-20190529: 20190529
CI_DRM_12029: 77ebe479d84890d78217fb7a6b556f7de71866f3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6636: 1298b5f0e1b3e010657ffba41d2e775fab028e08 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_107340v3: 77ebe479d84890d78217fb7a6b556f7de71866f3 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
9f6445fdae59 drm/i915/uc: Enable version reduced firmware files for newest platforms 29eb7ecd836a drm/i915/uc: Add patch level version number support 5636c16c1a4a drm/i915/uc: Support for version reduced and multiple firmware files
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/index.html
Re: [Intel-gfx] ✓ Fi.CI.BAT: success for Drop version numbers from firmware files (rev3)
Quoted 39 lines · Patchwork
Project List - Patchwork *Patch Details*
*Series:* Drop version numbers from firmware files (rev3)
*URL:* https://patchwork.freedesktop.org/series/107340/
*State:* success
*Details:* https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/index.htmlCI Bug Log - changes from
CI_DRM_12029->Patchwork_107340v3Summary
*SUCCESS*
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/index.html
Participating hosts (33 -> 32)Missing (1): fi-kbl-soraka
Possible new issues
Here are the unknown changes that may have been introduced in
Patchwork_107340v3:IGT changes
Suppressed
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
*
Quoted 16 lines
igt@i915_module_load@load:
o
{bat-dg2-9}: PASS
<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/bat-dg2-9/igt@[email protected]>
-> FAIL
<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/bat-dg2-9/igt@[email protected]>
o
{bat-dg2-8}: PASS
<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/bat-dg2-8/igt@[email protected]>
-> FAIL
<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/bat-dg2-8/igt@[email protected]>These are expected. Patch 3/3 sets DG2 to only allow the new style file name and the new files are not yet pushed to the repo. This was intentional to see that the load would fail as expected.
The DG1, ADL-S and RPL-S results shows that it tried to load the new style files, failed to find them (as expected), dropped back to the old style and successfully loaded those and ran with them:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/bat-dg1-6/igt@[email protected]
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-adl-ddr5/igt@[email protected]
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/bat-rpls-1/igt@[email protected]
Unfortunately, the ADL-P and ADL-M results are invalid because they are apparently failing to run due to IOMMU issues that do not appear to be i915 related. KBL and APL are showing the same failures.
John.
Quoted 97 lines
*
o
*igt@i915_selftest@live@ring_submission: o {fi-ehl-2}: PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-ehl-2/igt@i915_selftest@live@ring_submission.html> -> INCOMPLETE <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-ehl-2/igt@i915_selftest@live@ring_submission.html> Known issuesHere are the changes found in
Patchwork_107340v3that come from known issues:IGT changes
Issues hit
*
igt@i915_selftest@live@hangcheck: o fi-hsw-4770: PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-hsw-4770/igt@i915_selftest@[email protected]> -> INCOMPLETE <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-hsw-4770/igt@i915_selftest@[email protected]> (i915#4785 <https://gitlab.freedesktop.org/drm/intel/issues/4785>) o fi-hsw-g3258: PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-hsw-g3258/igt@i915_selftest@[email protected]> -> INCOMPLETE <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-hsw-g3258/igt@i915_selftest@[email protected]> (i915#3303 <https://gitlab.freedesktop.org/drm/intel/issues/3303> / i915#4785 <https://gitlab.freedesktop.org/drm/intel/issues/4785>)*
igt@i915_selftest@live@requests: o fi-pnv-d510: PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/fi-pnv-d510/igt@i915_selftest@[email protected]> -> DMESG-FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-pnv-d510/igt@i915_selftest@[email protected]> (i915#4528 <https://gitlab.freedesktop.org/drm/intel/issues/4528>)*
igt@runner@aborted: o fi-pnv-d510: NOTRUN -> FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-pnv-d510/igt@[email protected]> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2403 <https://gitlab.freedesktop.org/drm/intel/issues/2403> / i915#4312 <https://gitlab.freedesktop.org/drm/intel/issues/4312>) o fi-hsw-g3258: NOTRUN -> FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/fi-hsw-g3258/igt@[email protected]> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#4312 <https://gitlab.freedesktop.org/drm/intel/issues/4312> / i915#6246 <https://gitlab.freedesktop.org/drm/intel/issues/6246>){name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE).
Build changes
* Linux:
CI_DRM_12029->Patchwork_107340v3CI-20190529: 20190529
CI_DRM_12029:77ebe479d84890d78217fb7a6b556f7de71866f3@git://anongit.freedesktop.org/gfx-ci/linuxIGT_6636:1298b5f0e1b3e010657ffba41d2e775fab028e08@ https://gitlab.freedesktop.org/drm/igt-gpu-tools.gitPatchwork_107340v3:77ebe479d84890d78217fb7a6b556f7de71866f3@git://anongit.freedesktop.org/gfx-ci/linuxLinux commits
9f6445fdae59drm/i915/uc: Enable version reduced firmware files for newest platforms29eb7ecd836adrm/i915/uc: Add patch level version number support5636c16c1a4adrm/i915/uc: Support for version reduced and multiple firmware files
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for Drop version numbers from firmware files (rev3)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Drop version numbers from firmware files (rev3)
URL : https://patchwork.freedesktop.org/series/107340/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12029_full -> Patchwork_107340v3_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (12 -> 11)
------------------------------
Missing (1): shard-rkl
Known issues
------------
Here are the changes found in Patchwork_107340v3_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@feature_discovery@psr2:
- shard-iclb: NOTRUN -> [SKIP][1] ([i915#658])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@gem_ctx_isolation@preservation-s3@vcs0:
- shard-kbl: [PASS][2] -> [DMESG-WARN][3] ([i915#180]) +4 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-kbl7/igt@gem_ctx_isolation@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl4/igt@gem_ctx_isolation@[email protected]
* igt@gem_eio@kms:
- shard-tglb: [PASS][4] -> [FAIL][5] ([i915#5784])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-tglb7/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-tglb8/igt@[email protected]
* igt@gem_exec_balancer@parallel-ordering:
- shard-kbl: NOTRUN -> [FAIL][6] ([i915#6117])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl7/igt@[email protected]
* igt@gem_exec_balancer@parallel-out-fence:
- shard-iclb: [PASS][7] -> [SKIP][8] ([i915#4525])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb6/igt@[email protected]
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [PASS][9] -> [FAIL][10] ([i915#2842])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-apl8/igt@gem_exec_fair@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-apl2/igt@gem_exec_fair@[email protected]
- shard-glk: NOTRUN -> [FAIL][11] ([i915#2842])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@gem_exec_fair@[email protected]
* igt@gem_huc_copy@huc-copy:
- shard-kbl: NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#2190])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@gem_lmem_swapping@random-engines:
- shard-glk: NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#4613])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- shard-kbl: NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#4613]) +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][15] ([i915#4613])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-yf-tiled:
- shard-iclb: NOTRUN -> [SKIP][16] ([i915#768])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][17] -> [FAIL][18] ([i915#454])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb6/igt@[email protected]
* igt@i915_pm_rpm@dpms-lpsp:
- shard-kbl: NOTRUN -> [SKIP][19] ([fdo#109271]) +217 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@i915_suspend@debugfs-reader:
- shard-kbl: NOTRUN -> [DMESG-WARN][20] ([i915#180]) +3 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl4/igt@[email protected]
* igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
- shard-iclb: NOTRUN -> [SKIP][21] ([i915#5286])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
* igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][22] ([fdo#109271] / [i915#3886]) +1 similar issue
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_ccs@pipe-a-bad-pixel-format-4_tiled_dg2_rc_ccs:
- shard-iclb: NOTRUN -> [SKIP][23] ([fdo#109278]) +4 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@kms_ccs@pipe-a-bad-pixel-format-4_tiled_dg2_rc_ccs.html
* igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_rc_ccs_cc:
- shard-kbl: NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#3886]) +8 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_cdclk@mode-transition-all-outputs:
- shard-iclb: NOTRUN -> [SKIP][25] ([i915#3742])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@kms_chamelium@dp-crc-single:
- shard-glk: NOTRUN -> [SKIP][26] ([fdo#109271] / [fdo#111827]) +2 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@[email protected]
* igt@kms_chamelium@vga-hpd-after-suspend:
- shard-iclb: NOTRUN -> [SKIP][27] ([fdo#109284] / [fdo#111827])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@kms_color_chamelium@ctm-red-to-blue:
- shard-kbl: NOTRUN -> [SKIP][28] ([fdo#109271] / [fdo#111827]) +11 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-kbl: NOTRUN -> [FAIL][29] ([i915#4767])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend@a-vga1:
- shard-snb: NOTRUN -> [INCOMPLETE][30] ([i915#4839] / [i915#4939] / [i915#6598])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-snb6/igt@kms_flip@[email protected]
* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][31] ([i915#2672]) +4 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-default-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][32] ([i915#2672] / [i915#3555])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb6/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode.html
* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-iclb: NOTRUN -> [SKIP][33] ([fdo#109280]) +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-mmap-gtt.html
* igt@kms_hdr@bpc-switch-dpms:
- shard-iclb: NOTRUN -> [SKIP][34] ([i915#3555]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend@pipe-a-dp-1:
- shard-kbl: NOTRUN -> [DMESG-FAIL][35] ([i915#180])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl4/igt@kms_hdr@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-kbl: NOTRUN -> [FAIL][36] ([fdo#108145] / [i915#265])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
- shard-kbl: NOTRUN -> [FAIL][37] ([i915#265])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-d-alpha-opaque-fb:
- shard-glk: NOTRUN -> [SKIP][38] ([fdo#109271]) +40 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@[email protected]
* igt@kms_plane_lowres@tiling-yf@pipe-b-edp-1:
- shard-iclb: NOTRUN -> [SKIP][39] ([i915#3536]) +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@kms_plane_lowres@[email protected]
* igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-5@pipe-b-edp-1:
- shard-iclb: [PASS][40] -> [SKIP][41] ([i915#5176]) +2 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb3/igt@kms_plane_scaling@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb2/igt@kms_plane_scaling@[email protected]
* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf:
- shard-kbl: NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#658]) +2 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf:
- shard-glk: NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#658])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@[email protected]
* igt@kms_psr@psr2_suspend:
- shard-iclb: [PASS][44] -> [SKIP][45] ([fdo#109441]) +1 similar issue
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@kms_psr@psr2_suspend.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@kms_psr@psr2_suspend.html
* igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
- shard-tglb: [PASS][46] -> [SKIP][47] ([i915#5519])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-tglb7/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-tglb8/igt@[email protected]
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-iclb: NOTRUN -> [INCOMPLETE][48] ([fdo#111764])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@kms_writeback@writeback-check-output:
- shard-kbl: NOTRUN -> [SKIP][49] ([fdo#109271] / [i915#2437]) +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl7/igt@[email protected]
* igt@kms_writeback@writeback-fb-id:
- shard-glk: NOTRUN -> [SKIP][50] ([fdo#109271] / [i915#2437])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk6/igt@[email protected]
* igt@prime_nv_pcopy@test3_5:
- shard-iclb: NOTRUN -> [SKIP][51] ([fdo#109291])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@prime_nv_pcopy@test3_5.html
* igt@sysfs_clients@create:
- shard-kbl: NOTRUN -> [SKIP][52] ([fdo#109271] / [i915#2994]) +1 similar issue
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
#### Possible fixes ####
* igt@gem_busy@close-race:
- shard-snb: [TIMEOUT][53] ([i915#5748]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-snb2/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-snb6/igt@[email protected]
* igt@gem_eio@in-flight-contexts-1us:
- shard-tglb: [TIMEOUT][55] ([i915#3063]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-tglb1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-tglb3/igt@[email protected]
- shard-glk: [TIMEOUT][57] ([i915#3063]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-glk7/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk9/igt@[email protected]
* igt@gem_exec_balancer@parallel-keep-in-fence:
- shard-iclb: [SKIP][59] ([i915#4525]) -> [PASS][60] +1 similar issue
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb6/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb2/igt@[email protected]
* igt@gem_workarounds@suspend-resume-fd:
- shard-kbl: [DMESG-WARN][61] ([i915#180]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-kbl4/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-kbl1/igt@[email protected]
* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@bc-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][63] ([i915#2122]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-glk6/igt@kms_flip@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk5/igt@kms_flip@[email protected]
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][65] ([fdo#109441]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb3/igt@kms_psr@psr2_primary_mmap_cpu.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@perf_pmu@rc6-suspend:
- shard-iclb: [INCOMPLETE][67] -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
#### Warnings ####
* igt@gem_exec_balancer@parallel-ordering:
- shard-iclb: [SKIP][69] ([i915#4525]) -> [FAIL][70] ([i915#6117])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb6/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
- shard-apl: [INCOMPLETE][71] ([i915#6598]) -> [INCOMPLETE][72] ([i915#1982] / [i915#6598])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-apl2/igt@kms_flip@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-apl6/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@a-hdmi-a1:
- shard-glk: [INCOMPLETE][73] ([i915#6598]) -> [INCOMPLETE][74] ([i915#1982] / [i915#6598])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-glk6/igt@kms_flip@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-glk5/igt@kms_flip@[email protected]
* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf:
- shard-iclb: [SKIP][75] ([i915#2920]) -> [SKIP][76] ([i915#658])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb1/igt@[email protected]
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
- shard-iclb: [SKIP][77] ([i915#2920]) -> [SKIP][78] ([fdo#111068] / [i915#658])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb6/igt@[email protected]
* igt@kms_psr2_su@page_flip-p010:
- shard-iclb: [FAIL][79] ([i915#5939]) -> [SKIP][80] ([fdo#109642] / [fdo#111068] / [i915#658])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12029/shard-iclb2/igt@kms_psr2_su@page_flip-p010.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/shard-iclb7/igt@kms_psr2_su@page_flip-p010.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3536]: https://gitlab.freedesktop.org/drm/intel/issues/3536
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3828]: https://gitlab.freedesktop.org/drm/intel/issues/3828
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4839]: https://gitlab.freedesktop.org/drm/intel/issues/4839
[i915#4939]: https://gitlab.freedesktop.org/drm/intel/issues/4939
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519
[i915#5748]: https://gitlab.freedesktop.org/drm/intel/issues/5748
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#5939]: https://gitlab.freedesktop.org/drm/intel/issues/5939
[i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6598]: https://gitlab.freedesktop.org/drm/intel/issues/6598
[i915#768]: https://gitlab.freedesktop.org/drm/intel/issues/768
Build changes
-------------
* Linux: CI_DRM_12029 -> Patchwork_107340v3
CI-20190529: 20190529
CI_DRM_12029: 77ebe479d84890d78217fb7a6b556f7de71866f3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6636: 1298b5f0e1b3e010657ffba41d2e775fab028e08 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_107340v3: 77ebe479d84890d78217fb7a6b556f7de71866f3 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107340v3/index.html