]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/gsc: Track the platform in the compatibility version
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 28 Aug 2024 21:51:56 +0000 (14:51 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 29 Aug 2024 17:32:19 +0000 (10:32 -0700)
The GSC compatibility version number is reset for each new platform. To
indicate this, the version includes a number that identifies the
platform (102 = MTL, 104 = LNL); this matches what happens for the
release version, where the major number also identifies a platform.

To make it clearer in our logs that the compatibility version is
specific to the platform, it is useful to include this platform number.
However, given that our binary names already include the platform, it is
not necessary to add this extra number there.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240828215158.2743994-4-daniele.ceraolospurio@intel.com
drivers/gpu/drm/xe/xe_gsc.c
drivers/gpu/drm/xe/xe_uc_fw.c

index 6a94d51fb933b7fa4287c8d9bd34d7350b943157..50ff43f5426aa5c654d18fc28bbc615098734adb 100644 (file)
@@ -165,10 +165,11 @@ static int query_compatibility_version(struct xe_gsc *gsc)
                return err;
        }
 
-       compat->major = version_query_rd(xe, &bo->vmap, rd_offset, compat_major);
-       compat->minor = version_query_rd(xe, &bo->vmap, rd_offset, compat_minor);
+       compat->major = version_query_rd(xe, &bo->vmap, rd_offset, proj_major);
+       compat->minor = version_query_rd(xe, &bo->vmap, rd_offset, compat_major);
+       compat->patch = version_query_rd(xe, &bo->vmap, rd_offset, compat_minor);
 
-       xe_gt_info(gt, "found GSC cv%u.%u\n", compat->major, compat->minor);
+       xe_gt_info(gt, "found GSC cv%u.%u.%u\n", compat->major, compat->minor, compat->patch);
 
 out_bo:
        xe_bo_unpin_map_no_vm(bo);
index 4bb2a4a80ddca57cf8b18030072754e1d22d0e03..d431d0031185eb2c0f76cfa45f1aca4fdbf3cfd8 100644 (file)
@@ -129,8 +129,8 @@ struct fw_blobs_by_type {
 
 /* for the GSC FW we match the compatibility version and not the release one */
 #define XE_GSC_FIRMWARE_DEFS(fw_def, major_ver)                \
-       fw_def(LUNARLAKE,       major_ver(xe,   gsc,    lnl,    1, 0, 0)) \
-       fw_def(METEORLAKE,      major_ver(i915, gsc,    mtl,    1, 0, 0))
+       fw_def(LUNARLAKE,       major_ver(xe,   gsc,    lnl,    104, 1, 0)) \
+       fw_def(METEORLAKE,      major_ver(i915, gsc,    mtl,    102, 1, 0))
 
 #define MAKE_FW_PATH(dir__, uc__, shortname__, version__)                      \
        __stringify(dir__) "/" __stringify(shortname__) "_" __stringify(uc__) version__ ".bin"
@@ -141,6 +141,8 @@ struct fw_blobs_by_type {
        MAKE_FW_PATH(dir_, uc_, shortname_, "_" __stringify(a))
 #define fw_filename_no_ver(dir_, uc_, shortname_)                              \
        MAKE_FW_PATH(dir_, uc_, shortname_, "")
+#define fw_filename_gsc(dir_, uc_, shortname_, a, b, c)                                \
+       MAKE_FW_PATH(dir_, uc_, shortname_, "_" __stringify(b))
 
 #define uc_fw_entry_mmp_ver(dir_, uc_, shortname_, a, b, c)                    \
        { fw_filename_mmp_ver(dir_, uc_, shortname_, a, b, c),                  \
@@ -151,6 +153,9 @@ struct fw_blobs_by_type {
 #define uc_fw_entry_no_ver(dir_, uc_, shortname_)                              \
        { fw_filename_no_ver(dir_, uc_, shortname_),                            \
          0, 0 }
+#define uc_fw_entry_gsc(dir_, uc_, shortname_, a, b, c)                                \
+       { fw_filename_gsc(dir_, uc_, shortname_, a, b, c),                      \
+         a, b, c }
 
 /* All blobs need to be declared via MODULE_FIRMWARE() */
 #define XE_UC_MODULE_FIRMWARE(platform__, fw_filename)                         \
@@ -166,7 +171,7 @@ XE_GUC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE,
                     fw_filename_mmp_ver, fw_filename_major_ver)
 XE_HUC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE,
                     fw_filename_mmp_ver, fw_filename_no_ver)
-XE_GSC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE, fw_filename_major_ver)
+XE_GSC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE, fw_filename_gsc)
 
 static struct xe_gt *
 __uc_fw_to_gt(struct xe_uc_fw *uc_fw, enum xe_uc_fw_type type)
@@ -209,7 +214,7 @@ uc_fw_auto_select(struct xe_device *xe, struct xe_uc_fw *uc_fw)
                                     uc_fw_entry_no_ver)
        };
        static const struct uc_fw_entry entries_gsc[] = {
-               XE_GSC_FIRMWARE_DEFS(XE_UC_FW_ENTRY, uc_fw_entry_major_ver)
+               XE_GSC_FIRMWARE_DEFS(XE_UC_FW_ENTRY, uc_fw_entry_gsc)
        };
        static const struct fw_blobs_by_type blobs_all[XE_UC_FW_NUM_TYPES] = {
                [XE_UC_FW_TYPE_GUC] = { entries_guc, ARRAY_SIZE(entries_guc) },