Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe: Remove unused revid from firmware name

The rev field is always 0 so it ends up never used. In i915 it was
introduced because of CML: up to rev 5 it reuses the guc and huc
firmware blobs from KBL. After that there is a specific firmware for
that platform. This can be reintroduced later if ever needed.

With the removal of revid the packed attribute in
uc_fw_platform_requirement, which is there only for reducing the space
these tables take, can also be removed since it has even more limited
usefulness: currently there's only padding of 2 bytes. Remove the
attribute to avoid the unaligned access.

$ pahole -C uc_fw_platform_requirement build64/drivers/gpu/drm/xe/xe_uc_fw.o
struct uc_fw_platform_requirement {
enum xe_platform p; /* 0 4 */
const struct uc_fw_blob blob; /* 4 10 */

/* size: 16, cachelines: 1, members: 2 */
/* padding: 2 */
/* last cacheline: 16 bytes */
};

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230324051754.1346390-2-lucas.demarchi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Lucas De Marchi and committed by
Rodrigo Vivi
6b8ddaf3 1bf1d86f

+15 -18
+15 -18
drivers/gpu/drm/xe/xe_uc_fw.c
··· 39 39 40 40 /* 41 41 * List of required GuC and HuC binaries per-platform. 42 - * Must be ordered based on platform + revid, from newer to older. 42 + * Must be ordered based on platform, from newer to older. 43 43 */ 44 44 #define XE_GUC_FIRMWARE_DEFS(fw_def, guc_def) \ 45 - fw_def(METEORLAKE, 0, guc_def(mtl, 70, 5, 2)) \ 46 - fw_def(ALDERLAKE_P, 0, guc_def(adlp, 70, 5, 2)) \ 47 - fw_def(ALDERLAKE_S, 0, guc_def(tgl, 70, 5, 2)) \ 48 - fw_def(PVC, 0, guc_def(pvc, 70, 5, 2)) \ 49 - fw_def(DG2, 0, guc_def(dg2, 70, 5, 2)) \ 50 - fw_def(DG1, 0, guc_def(dg1, 70, 5, 2)) \ 51 - fw_def(TIGERLAKE, 0, guc_def(tgl, 70, 5, 2)) 45 + fw_def(METEORLAKE, guc_def(mtl, 70, 5, 2)) \ 46 + fw_def(ALDERLAKE_P, guc_def(adlp, 70, 5, 2)) \ 47 + fw_def(ALDERLAKE_S, guc_def(tgl, 70, 5, 2)) \ 48 + fw_def(PVC, guc_def(pvc, 70, 5, 2)) \ 49 + fw_def(DG2, guc_def(dg2, 70, 5, 2)) \ 50 + fw_def(DG1, guc_def(dg1, 70, 5, 2)) \ 51 + fw_def(TIGERLAKE, guc_def(tgl, 70, 5, 2)) 52 52 53 53 #define XE_HUC_FIRMWARE_DEFS(fw_def, huc_def, huc_ver) \ 54 - fw_def(ALDERLAKE_S, 0, huc_def(tgl)) \ 55 - fw_def(DG1, 0, huc_def(dg1)) \ 56 - fw_def(TIGERLAKE, 0, huc_def(tgl)) 54 + fw_def(ALDERLAKE_S, huc_def(tgl)) \ 55 + fw_def(DG1, huc_def(dg1)) \ 56 + fw_def(TIGERLAKE, huc_def(tgl)) 57 57 58 58 #define __MAKE_HUC_FW_PATH(prefix_, name_) \ 59 59 "i915/" \ ··· 82 82 83 83 84 84 /* All blobs need to be declared via MODULE_FIRMWARE() */ 85 - #define XE_UC_MODULE_FW(platform_, revid_, uc_) \ 85 + #define XE_UC_MODULE_FW(platform_, uc_) \ 86 86 MODULE_FIRMWARE(uc_); 87 87 88 88 XE_GUC_FIRMWARE_DEFS(XE_UC_MODULE_FW, MAKE_GUC_FW_PATH) ··· 109 109 UC_FW_BLOB(major_, minor_, \ 110 110 MAKE_HUC_FW_PATH_FULL_VER(prefix_, major_, minor_, bld_num_)) 111 111 112 - struct __packed uc_fw_platform_requirement { 112 + struct uc_fw_platform_requirement { 113 113 enum xe_platform p; 114 - u8 rev; /* first platform rev using this FW */ 115 114 const struct uc_fw_blob blob; 116 115 }; 117 116 118 - #define MAKE_FW_LIST(platform_, revid_, uc_) \ 117 + #define MAKE_FW_LIST(platform_, uc_) \ 119 118 { \ 120 119 .p = XE_##platform_, \ 121 - .rev = revid_, \ 122 120 .blob = uc_, \ 123 121 }, 124 122 ··· 141 143 static const struct uc_fw_platform_requirement *fw_blobs; 142 144 enum xe_platform p = xe->info.platform; 143 145 u32 fw_count; 144 - u8 rev = xe->info.revid; 145 146 int i; 146 147 147 148 XE_BUG_ON(uc_fw->type >= ARRAY_SIZE(blobs_all)); ··· 148 151 fw_count = blobs_all[uc_fw->type].count; 149 152 150 153 for (i = 0; i < fw_count && p <= fw_blobs[i].p; i++) { 151 - if (p == fw_blobs[i].p && rev >= fw_blobs[i].rev) { 154 + if (p == fw_blobs[i].p) { 152 155 const struct uc_fw_blob *blob = &fw_blobs[i].blob; 153 156 154 157 uc_fw->path = blob->path;