Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Harish Chegondi <harish.chegondi@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: <balasubramani.vivekanandan@intel.com>,
	Harish Chegondi <harish.chegondi@intel.com>
Subject: Re: [PATCH 1/1] drm/xe/eu_stall: Disable TDL clk gating during EU stall sampling
Date: Thu, 26 Nov 2026 12:58:40 -0300	[thread overview]
Message-ID: <8733sna8jz.fsf@intel.com> (raw)
In-Reply-To: <b7f4a7dcfca32729740cc2485201abef639b5572.1795683151.git.harish.chegondi@intel.com>

Harish Chegondi <harish.chegondi@intel.com> writes:

> 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) {

The programming note in the Bspec update doesn't seem to restrict the
recommendation to CRI.  We probably need clarification to confirm that
the is really needed only for CRI.

Furthermore, in case the recomendation really doesn't apply broadly, is
checking for CRI the right thing here? Or should we actually be checking
the graphics version?

I would assume the latter.

--
Gustavo Sousa

> +		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

      parent reply	other threads:[~2026-11-26 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Gustavo Sousa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8733sna8jz.fsf@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=balasubramani.vivekanandan@intel.com \
    --cc=harish.chegondi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox