Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/xe/eu_stall: Disable TDL clk gating during EU stall sampling
@ 2026-11-26  8:58 Harish Chegondi
  2026-11-26 10:18 ` ✓ CI.KUnit: success for series starting with [1/1] " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Harish Chegondi @ 2026-11-26  8:58 UTC (permalink / raw)
  To: intel-xe; +Cc: balasubramani.vivekanandan, gustavo.sousa, Harish Chegondi

As per the recent BSpec update, disable TDL clock gating during
EU stall sampling on CRI.

The patch is still under testing.

Bspec: 60997
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
---
 drivers/gpu/drm/xe/regs/xe_gt_regs.h |  1 +
 drivers/gpu/drm/xe/xe_eu_stall.c     | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 06d45b1f2218..973901feb09c 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -378,6 +378,7 @@
 
 #define SUBSLICE_UNIT_LEVEL_CLKGATE2		XE_REG_MCR(0x9528)
 #define   CPSSUNIT_CLKGATE_DIS			REG_BIT(9)
+#define   TDLUNIT_CLKGATE_DIS			REG_BIT(0)
 
 #define SSMCGCTL9530				XE_REG_MCR(0x9530)
 #define   RTFUNIT_CLKGATE_DIS			REG_BIT(18)
diff --git a/drivers/gpu/drm/xe/xe_eu_stall.c b/drivers/gpu/drm/xe/xe_eu_stall.c
index c918fe3851c4..3ad450d8c6c3 100644
--- a/drivers/gpu/drm/xe/xe_eu_stall.c
+++ b/drivers/gpu/drm/xe/xe_eu_stall.c
@@ -719,6 +719,12 @@ static int xe_eu_stall_stream_enable(struct xe_eu_stall_data_stream *stream)
 		xe_gt_mcr_multicast_write(gt, ROW_CHICKEN2,
 					  REG_MASKED_FIELD_ENABLE(DISABLE_DOP_GATING));
 
+	if (gt_to_xe(gt)->info.platform == XE_CRESCENTISLAND) {
+		reg_value = xe_gt_mcr_unicast_read_any(gt, SUBSLICE_UNIT_LEVEL_CLKGATE2);
+		reg_value |= TDLUNIT_CLKGATE_DIS;
+		xe_gt_mcr_multicast_write(gt, SUBSLICE_UNIT_LEVEL_CLKGATE2, reg_value);
+	}
+
 	for_each_dss_steering(xecore, gt, group, instance) {
 		write_ptr_reg = xe_gt_mcr_unicast_read(gt, XEHPC_EUSTALL_REPORT, group, instance);
 		/* Clear any drop bits set and not cleared in the previous session. */
@@ -864,6 +870,7 @@ static int xe_eu_stall_enable_locked(struct xe_eu_stall_data_stream *stream)
 static int xe_eu_stall_disable_locked(struct xe_eu_stall_data_stream *stream)
 {
 	struct xe_gt *gt = stream->gt;
+	u32 reg_value;
 	int ret = 0;
 
 	if (!stream->enabled)
@@ -875,6 +882,12 @@ static int xe_eu_stall_disable_locked(struct xe_eu_stall_data_stream *stream)
 
 	cancel_delayed_work_sync(&stream->buf_poll_work);
 
+	if (gt_to_xe(gt)->info.platform == XE_CRESCENTISLAND) {
+		reg_value = xe_gt_mcr_unicast_read_any(gt, SUBSLICE_UNIT_LEVEL_CLKGATE2);
+		reg_value &= ~TDLUNIT_CLKGATE_DIS;
+		xe_gt_mcr_multicast_write(gt, SUBSLICE_UNIT_LEVEL_CLKGATE2, reg_value);
+	}
+
 	if (XE_GT_WA(gt, 22016596838))
 		xe_gt_mcr_multicast_write(gt, ROW_CHICKEN2,
 					  REG_MASKED_FIELD_DISABLE(DISABLE_DOP_GATING));
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-26 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  8:58 [PATCH 1/1] drm/xe/eu_stall: Disable TDL clk gating during EU stall sampling Harish Chegondi
2026-11-26 10:18 ` ✓ CI.KUnit: success for series starting with [1/1] " Patchwork
2026-11-26 11:07 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-26 15:58 ` [PATCH 1/1] " Gustavo Sousa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox