[PATCH V3] drm/xe/xe2lpm: Add permanent Wa_14020756599

Tejas Upadhyay tejas.upadhyay at intel.com
Thu May 30 10:52:29 UTC 2024


For xe2_lpm Wa_14020756599 is applied to all steppings and
when RCS is present on graphics GT.

V3(MattR):
  - Rename rtp api name
  - Use MEDIA_VERx100
V2:
  - Remove engine filter video decode
  - Fix typo GRAPHICS/MEDIA/s - Himal

Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
---
 drivers/gpu/drm/xe/xe_rtp.c | 10 ++++++++++
 drivers/gpu/drm/xe/xe_rtp.h | 12 ++++++++++++
 drivers/gpu/drm/xe/xe_wa.c  |  4 ++++
 3 files changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index fb44cc7521d8..608ad1c57613 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -323,3 +323,13 @@ bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
 
 	return dss >= dss_per_gslice;
 }
+
+bool xe_rtp_match_rcs_when_media2000(const struct xe_gt *gt,
+				     const struct xe_hw_engine *hwe)
+{
+	if (!xe_gt_is_media_type((struct xe_gt *)gt) &&
+	    hwe->class == XE_ENGINE_CLASS_RENDER)
+		return (gt_to_xe(gt))->info.media_verx100 == 2000;
+
+	return false;
+}
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
index 337b1ef1959c..76e3ee55c4fc 100644
--- a/drivers/gpu/drm/xe/xe_rtp.h
+++ b/drivers/gpu/drm/xe/xe_rtp.h
@@ -427,4 +427,16 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
 bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
 					 const struct xe_hw_engine *hwe);
 
+/*
+ * xe_rtp_match_rcs_when_media2000 - Match when media GT version 2000 and
+ * rcs engine present on graphics GT
+ *
+ * @gt: GT structure
+ * @hwe: Engine instance
+ *
+ * Returns: true if media GT version 2000 and rcs engine matched on graphics
+ * GT, false otherwise.
+ */
+bool xe_rtp_match_rcs_when_media2000(const struct xe_gt *gt,
+				     const struct xe_hw_engine *hwe);
 #endif
diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
index 64bc595fc727..0288499dc226 100644
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@ -227,6 +227,10 @@ static const struct xe_rtp_entry_sr gt_was[] = {
 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F08(0), CG3DDISHRS_CLKGATE_DIS)),
 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
 	},
+	{ XE_RTP_NAME("14020756599"),
+	  XE_RTP_RULES(FUNC(xe_rtp_match_rcs_when_media2000)),
+	  XE_RTP_ACTIONS(SET(WM_CHICKEN3, HIZ_PLANE_COMPRESSION_DIS))
+	},
 
 	/* Xe2_HPM */
 
-- 
2.25.1



More information about the Intel-xe mailing list