summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-05-26 19:43:58 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:34:04 +0300
commit87c299fa3a97740ddc0fa9b19ee4054004686f76 (patch)
treed2ba265be06cd0844f0c535017fad7db3b46d1bc
parent3e488e98fb9eb4cd9220417e69e75c8271294a02 (diff)
downloadlinux-87c299fa3a97740ddc0fa9b19ee4054004686f76.tar.xz
drm/xe/guc: Port Wa_14014475959 to xe_wa and fix it
Port Wa_14014475959 to xe_wa fixing its condition. The workaround should only be applied on the primary GT, not on media. So just checking by MTL platform is not enough: checking GT is of the right type is also needed. Since the GRAPHICS_STEP() does checks the GT type, we could leave the first check as a platform one: it'd would be easier to understand and not go out of sync with the graphics_ip_map[] in drivers/gpu/drm/xe/xe_pci.c. However it also means that new platforms using the same IP wouldn't match. Prefer using the IP version. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230526164358.86393-22-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_guc.c4
-rw-r--r--drivers/gpu/drm/xe/xe_wa_oob.rules2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 3ed460d3b6ca..ecc843d91f62 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -142,9 +142,7 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
if (XE_WA(gt, 16011759253))
flags |= GUC_WA_GAM_CREDITS;
- /* Wa_14014475959 */
- if (IS_PLATFORM_STEP(xe, XE_METEORLAKE, STEP_A0, STEP_B0) ||
- xe->info.platform == XE_DG2)
+ if (XE_WA(gt, 14014475959))
flags |= GUC_WA_HOLD_CCS_SWITCHOUT;
if (XE_WA(gt, 22011391025) || XE_WA(gt, 14012197797))
diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
index f6c4a0e055e0..1ecb10390b28 100644
--- a/drivers/gpu/drm/xe/xe_wa_oob.rules
+++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
@@ -1,5 +1,7 @@
22012773006 GRAPHICS_VERSION_RANGE(1200, 1250)
16011759253 SUBPLATFORM(DG2, G10), GRAPHICS_STEP(A0, B0)
+14014475959 GRAPHICS_VERSION_RANGE(1270, 1271), GRAPHICS_STEP(A0, B0)
+ PLATFORM(DG2)
22011391025 PLATFORM(DG2)
14012197797 PLATFORM(DG2), GRAPHICS_STEP(A0, B0)
16011777198 SUBPLATFORM(DG2, G10), GRAPHICS_STEP(A0, C0)