drm/i915/guc: Enable WA 14018913170
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Fri, 6 Oct 2023 01:35:53 +0000 (18:35 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Mon, 9 Oct 2023 23:35:04 +0000 (16:35 -0700)
The GuC handles the WA, the KMD just needs to set the flag to enable
it on the appropriate platforms.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231006013553.1339418-1-John.C.Harrison@Intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc.c
drivers/gpu/drm/i915/gt/uc/intel_guc.h
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h

index 27df41c53b89046426834c56b31659ceade8fe24..3f3df1166b8604dd234f970ac7a003fb31a4d79c 100644 (file)
@@ -319,6 +319,12 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
        if (!RCS_MASK(gt))
                flags |= GUC_WA_RCS_REGS_IN_CCS_REGS_LIST;
 
+       /* Wa_14018913170 */
+       if (GUC_FIRMWARE_VER(guc) >= MAKE_GUC_VER(70, 7, 0)) {
+               if (IS_DG2(gt->i915) || IS_METEORLAKE(gt->i915) || IS_PONTEVECCHIO(gt->i915))
+                       flags |= GUC_WA_ENABLE_TSC_CHECK_ON_RC6;
+       }
+
        return flags;
 }
 
index 6c392bad29c1966f42cca3a1496c6983787f3e02..818c8c146fd479d63665aaba34c9fd2631bc719f 100644 (file)
@@ -295,6 +295,7 @@ struct intel_guc {
 #define MAKE_GUC_VER(maj, min, pat)    (((maj) << 16) | ((min) << 8) | (pat))
 #define MAKE_GUC_VER_STRUCT(ver)       MAKE_GUC_VER((ver).major, (ver).minor, (ver).patch)
 #define GUC_SUBMIT_VER(guc)            MAKE_GUC_VER_STRUCT((guc)->submission_version)
+#define GUC_FIRMWARE_VER(guc)          MAKE_GUC_VER_STRUCT((guc)->fw.file_selected.ver)
 
 static inline struct intel_guc *log_to_guc(struct intel_guc_log *log)
 {
index b4d56eccfb1f0aff724ba93a98e57bf5cbe0449a..123ad75d2eb28c6971b40e98d43fef32f1c80bc9 100644 (file)
 #define   GUC_WA_HOLD_CCS_SWITCHOUT    BIT(17)
 #define   GUC_WA_POLLCS                        BIT(18)
 #define   GUC_WA_RCS_REGS_IN_CCS_REGS_LIST     BIT(21)
+#define   GUC_WA_ENABLE_TSC_CHECK_ON_RC6       BIT(22)
 
 #define GUC_CTL_FEATURE                        2
 #define   GUC_CTL_ENABLE_SLPC          BIT(2)