Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: <intel-xe@lists.freedesktop.org>, <kernel-dev@igalia.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH 4/5] drm/xe/xelp: L3 recommended hashing mask
Date: Thu, 27 Feb 2025 13:21:10 -0800	[thread overview]
Message-ID: <20250227212110.GS4460@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20250227101304.46660-5-tvrtko.ursulin@igalia.com>

On Thu, Feb 27, 2025 at 10:13:03AM +0000, Tvrtko Ursulin wrote:
> According to the i915 codebase xe missed to set the recommended
> performance tuning for L3 hashing which is applicable to all legacy XeLP
> platforms. Lets add it.
> 
> v2:
>  * Rename prefixes to XELP_.
>  * Tweak version end point.
> 
> v3:
>  * Add bspec tag.
>  * Tweak version range.
> 
> v4:
>  * Move from LRC to engine tunings list.
> 
> Bspec: 31870
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> References: c46c5fb725be ("drm/i915/gen12: Apply recommended L3 hashing mask")
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/xe/regs/xe_gt_regs.h | 5 ++++-
>  drivers/gpu/drm/xe/xe_tuning.c       | 5 +++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> index 282afd22b68b..da833a147c0c 100644
> --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> @@ -365,10 +365,13 @@
>  #define FORCEWAKE_MEDIA_VEBOX(n)		XE_REG(0xa560 + (n) * 4)
>  #define FORCEWAKE_GSC				XE_REG(0xa618)
>  
> +/* L3 Cache Control */

Did you mean to move this comment?  This was originally intended to
refer to the "l3cc" MOCS values in the LNCFMOCS registers that people
may remember from older platforms on i915.  Even though 0xb004 is also
doing L3-related stuff, it's not providing the specific l3cc values the
comment here was originally written for.

I'd be inclined to just drop the comment completely at this point; I'm
not sure it's really providing any useful insight to anyone.

Anyway, the actual tuning looks correct, so aside from the comment,

        Reviewed-by: Matt Roper <matthew.d.roper@intel.com>


Matt

> +#define XELP_GARBCNTL				XE_REG(0xb004)
> +#define   XELP_BUS_HASH_CTL_BIT_EXC		REG_BIT(7)
> +
>  #define XEHPC_LNCFMISCCFGREG0			XE_REG_MCR(0xb01c, XE_REG_OPTION_MASKED)
>  #define   XEHPC_OVRLSCCC			REG_BIT(0)
>  
> -/* L3 Cache Control */
>  #define LNCFCMOCS_REG_COUNT			32
>  #define XELP_LNCFCMOCS(i)			XE_REG(0xb020 + (i) * 4)
>  #define XEHP_LNCFCMOCS(i)			XE_REG_MCR(0xb020 + (i) * 4)
> diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c
> index 3c78f3d71559..551c2f308e1c 100644
> --- a/drivers/gpu/drm/xe/xe_tuning.c
> +++ b/drivers/gpu/drm/xe/xe_tuning.c
> @@ -88,6 +88,11 @@ static const struct xe_rtp_entry_sr gt_tunings[] = {
>  };
>  
>  static const struct xe_rtp_entry_sr engine_tunings[] = {
> +	{ XE_RTP_NAME("Tuning: L3 Hashing Mask"),
> +	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, 1210),
> +		       FUNC(xe_rtp_match_first_render_or_compute)),
> +	  XE_RTP_ACTIONS(CLR(XELP_GARBCNTL, XELP_BUS_HASH_CTL_BIT_EXC))
> +	},
>  	{ XE_RTP_NAME("Tuning: Set Indirect State Override"),
>  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, 1274),
>  		       ENGINE_CLASS(RENDER)),
> -- 
> 2.48.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

  parent reply	other threads:[~2025-02-27 21:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-27 10:12 [PATCH v4 0/5] Workaround fixes, improvements, additions Tvrtko Ursulin
2025-02-27 10:13 ` [PATCH 1/5] drm/xe: Fix GT "for each engine" workarounds Tvrtko Ursulin
2025-02-27 10:13 ` [PATCH 2/5] drm/xe/xelp: Move Wa_16011163337 from tunings to workarounds Tvrtko Ursulin
2025-02-27 20:58   ` Lucas De Marchi
2025-02-28  8:08     ` Tvrtko Ursulin
2025-03-01  0:55       ` Lucas De Marchi
2025-02-27 10:13 ` [PATCH 3/5] drm/xe/xelp: Add Wa_1604555607 Tvrtko Ursulin
2025-02-27 21:13   ` Matt Roper
2025-02-27 21:13   ` Lucas De Marchi
2025-02-27 10:13 ` [PATCH 4/5] drm/xe/xelp: L3 recommended hashing mask Tvrtko Ursulin
2025-02-27 21:16   ` Lucas De Marchi
2025-02-27 21:21   ` Matt Roper [this message]
2025-03-01  5:48     ` Lucas De Marchi
2025-03-03 16:28       ` Tvrtko Ursulin
2025-02-27 10:13 ` [PATCH 5/5] drm/xe: Add performance tunings to debugfs Tvrtko Ursulin
2025-02-27 10:54 ` ✓ CI.Patch_applied: success for Workaround fixes, improvements, additions (rev4) Patchwork
2025-02-27 10:54 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-27 10:55 ` ✓ CI.KUnit: success " Patchwork
2025-02-27 11:12 ` ✓ CI.Build: " Patchwork
2025-02-27 11:15 ` ✓ CI.Hooks: " Patchwork
2025-02-27 11:16 ` ✓ CI.checksparse: " Patchwork
2025-02-27 11:42 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-27 13:52 ` ✗ Xe.CI.Full: failure " Patchwork

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=20250227212110.GS4460@mdroper-desk1.amr.corp.intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=lucas.demarchi@intel.com \
    --cc=tvrtko.ursulin@igalia.com \
    /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