Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Shekhar Chauhan <shekhar.chauhan@intel.com>,
	Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>,
	Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [PATCH v2 20/22] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs
Date: Thu, 16 Oct 2025 09:30:58 -0300	[thread overview]
Message-ID: <176061785811.3168.4643994654849150356@intel.com> (raw)
In-Reply-To: <20251015-xe3p-v2-20-b9189b3056a2@intel.com>

Quoting Lucas De Marchi (2025-10-15 19:06:35-03:00)
>From: Matt Roper <matthew.d.roper@intel.com>
>
>The compression overfetch tuning settings only apply to platforms that
>support FlatCCS.  In Xe3p_XPC (and any future IPs that also lack
>compression) some of the registers being adjusted by this tuning will
>not exist or may have been repurposed for something else, so we should
>take care not to try to program them.
>
>Note that our xe_rtp_match_has_flatccs() function will also return false
>on platforms that do have FlatCCS in the hardware design, but have
>compression manually disabled in the BIOS.  On such platforms the
>registers still exist (and it would be fine to continue programming
>them), but they would have no effect, so skipping that tuning is also
>safe.
>
>Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
>Reviewed-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
>Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>---
> drivers/gpu/drm/xe/xe_rtp.c    |  7 +++++++
> drivers/gpu/drm/xe/xe_rtp.h    | 12 ++++++++++++
> drivers/gpu/drm/xe/xe_tuning.c |  9 ++++++---
> 3 files changed, 25 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
>index 66707cc89ec97..ed509b1c8cfcd 100644
>--- a/drivers/gpu/drm/xe/xe_rtp.c
>+++ b/drivers/gpu/drm/xe/xe_rtp.c
>@@ -378,3 +378,10 @@ bool xe_rtp_match_gt_has_discontiguous_dss_groups(const struct xe_device *xe,
> {
>         return xe_gt_has_discontiguous_dss_groups(gt);
> }
>+
>+bool xe_rtp_match_has_flat_ccs(const struct xe_device *xe,
>+                               const struct xe_gt *gt,
>+                               const struct xe_hw_engine *hwe)
>+{
>+        return xe->info.has_flat_ccs;
>+}

One possible issue here is that OOB RTP entries are processed before we
call probe_has_flat_ccs().  Not a real problem right now, because we are
only using xe_rtp_match_has_flat_ccs() in gt_tunnings, but this could be
problematic if in the future someone added a
FUNC(xe_rtp_match_has_flat_ccs) in OOB rules files.

--
Gustavo Sousa

>diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
>index e5b8a9452e29e..ba5f940c0a961 100644
>--- a/drivers/gpu/drm/xe/xe_rtp.h
>+++ b/drivers/gpu/drm/xe/xe_rtp.h
>@@ -491,4 +491,16 @@ bool xe_rtp_match_gt_has_discontiguous_dss_groups(const struct xe_device *xe,
>                                                   const struct xe_gt *gt,
>                                                   const struct xe_hw_engine *hwe);
> 
>+/**
>+ * xe_rtp_match_has_flat_ccs - Match when platform has FlatCCS compression
>+ * @xe: Device structure
>+ * @gt: GT structure
>+ * @hwe: Engine instance
>+ *
>+ * Returns: true if platform has FlatCCS compression, false otherwise
>+ */
>+bool xe_rtp_match_has_flat_ccs(const struct xe_device *xe,
>+                               const struct xe_gt *gt,
>+                               const struct xe_hw_engine *hwe);
>+
> #endif
>diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c
>index fd58ea5e78bf6..7c140d8cb1e07 100644
>--- a/drivers/gpu/drm/xe/xe_tuning.c
>+++ b/drivers/gpu/drm/xe/xe_tuning.c
>@@ -40,7 +40,8 @@ static const struct xe_rtp_entry_sr gt_tunings[] = {
>                                    REG_FIELD_PREP(L3_PWM_TIMER_INIT_VAL_MASK, 0x7f)))
>         },
>         { XE_RTP_NAME("Tuning: Compression Overfetch"),
>-          XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED)),
>+          XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED),
>+                       FUNC(xe_rtp_match_has_flat_ccs)),
>           XE_RTP_ACTIONS(CLR(CCCHKNREG1, ENCOMPPERFFIX),
>                          SET(CCCHKNREG1, L3CMPCTRL))
>         },
>@@ -58,12 +59,14 @@ static const struct xe_rtp_entry_sr gt_tunings[] = {
>           XE_RTP_ACTIONS(SET(XE2LPM_L3SQCREG3, COMPPWOVERFETCHEN))
>         },
>         { XE_RTP_NAME("Tuning: L2 Overfetch Compressible Only"),
>-          XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED)),
>+          XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED),
>+                       FUNC(xe_rtp_match_has_flat_ccs)),
>           XE_RTP_ACTIONS(SET(L3SQCREG2,
>                              COMPMEMRD256BOVRFETCHEN))
>         },
>         { XE_RTP_NAME("Tuning: L2 Overfetch Compressible Only - media"),
>-          XE_RTP_RULES(MEDIA_VERSION_RANGE(2000, XE_RTP_END_VERSION_UNDEFINED)),
>+          XE_RTP_RULES(MEDIA_VERSION_RANGE(2000, XE_RTP_END_VERSION_UNDEFINED),
>+                       FUNC(xe_rtp_match_has_flat_ccs)),
>           XE_RTP_ACTIONS(SET(XE2LPM_L3SQCREG2,
>                              COMPMEMRD256BOVRFETCHEN))
>         },
>
>-- 
>2.51.0
>

  reply	other threads:[~2025-10-16 12:31 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 22:06 [PATCH v2 00/22] drm/xe: Add Xe3p support Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 01/22] drm/xe/xe3: Add support for graphics IP versions 30.04 & 30.05 Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 02/22] drm/xe/xe3p_lpm: Add support for media IP versions 35.00 & 35.03 Lucas De Marchi
2025-10-16 16:12   ` Gustavo Sousa
2025-10-16 16:46     ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 03/22] drm/xe: Drop CTC_MODE register read Lucas De Marchi
2025-10-15 23:26   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 04/22] drm/xe: Add GT_VER() to check version specific to gt type Lucas De Marchi
2025-10-15 23:34   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 05/22] drm/xe/xe3p_lpm: Skip disabling NOA on unsupported IPs Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 06/22] drm/xe/xe3p_lpm: Handle MCR steering Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 07/22] drm/xe/xe3p: Stop programming RCU_MODE's fixed slice mode setting Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 08/22] drm/xe/xe3p: Determine service copy availability from fuse Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 09/22] drm/xe: Dump CURRENT_LRCA register Lucas De Marchi
2025-10-15 23:28   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 10/22] drm/xe/xe3p: Dump CSMQDEBUG register Lucas De Marchi
2025-10-15 23:33   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 11/22] drm/xe/nvl: Define NVL-S platform Lucas De Marchi
2025-10-16 16:41   ` Gustavo Sousa
2025-10-15 22:06 ` [PATCH v2 12/22] drm/xe/nvls: Define GuC firmware for NVL-S Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 13/22] drm/xe/nvls: Attach MOCS table " Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 14/22] drm/xe/xe3p_xpc: Add Xe3p_XPC IP definition Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 15/22] drm/xe/xe3p_xpc: Add L3 bank mask Lucas De Marchi
2025-10-15 23:29   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 16/22] drm/xe/xe3p_xpc: Add MCR steering Lucas De Marchi
2025-10-16 11:44   ` Gustavo Sousa
2025-10-16 19:48     ` Lucas De Marchi
2025-10-16 20:16       ` Gustavo Sousa
2025-10-15 22:06 ` [PATCH v2 17/22] drm/xe/irq: Rename fuse mask variables Lucas De Marchi
2025-10-15 23:39   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 18/22] drm/xe/irq: Split irq mask per engine class Lucas De Marchi
2025-10-15 23:52   ` Matt Roper
2025-10-16  4:38     ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 19/22] drm/xe/xe3p_xpc: Add support for compute walker for non-MSIx Lucas De Marchi
2025-10-16  0:07   ` Matt Roper
2025-10-16  5:33     ` Lucas De Marchi
2025-10-16  6:52       ` Muqthyar Ahmed, Syed Abdul
2025-10-16 13:59         ` Lucas De Marchi
2025-10-17  6:52           ` Joonas Lahtinen
2025-10-15 22:06 ` [PATCH v2 20/22] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs Lucas De Marchi
2025-10-16 12:30   ` Gustavo Sousa [this message]
2025-10-16 16:54     ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 21/22] drm/xe/xe3p_xpc: Setup PAT table Lucas De Marchi
2025-10-16 14:30   ` Vivekanandan, Balasubramani
2025-10-16 20:22     ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 22/22] drm/xe/xe3p: Add xe3p EU stall data format Lucas De Marchi
2025-10-15 23:58   ` Dixit, Ashutosh
2025-10-16  3:25     ` Lucas De Marchi
2025-10-16  5:11 ` ✗ CI.checkpatch: warning for drm/xe: Add Xe3p support (rev2) Patchwork
2025-10-16  5:13 ` ✓ CI.KUnit: success " Patchwork
2025-10-16  5:55 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-16 23:29 ` ✗ Xe.CI.Full: " 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=176061785811.3168.4643994654849150356@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=balasubramani.vivekanandan@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=shekhar.chauhan@intel.com \
    --cc=tejas.upadhyay@intel.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