From: "Vivekanandan, Balasubramani" <balasubramani.vivekanandan@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Shekhar Chauhan <shekhar.chauhan@intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [PATCH 22/23] drm/xe/xe3p_xpc: Setup PAT table
Date: Thu, 16 Oct 2025 19:37:04 +0530 [thread overview]
Message-ID: <aPD8CCUkpAAhFjS9@bvivekan-mobl1> (raw)
In-Reply-To: <20251013-xe3p-v1-22-bfb74f038215@intel.com>
On 13.10.2025 20:24, Lucas De Marchi wrote:
> From: Matt Roper <matthew.d.roper@intel.com>
>
> Xe3p_XPC IP requires a new PAT table; note that this table has one fewer
> column than the Xe2/Xe3 tables since compression is not supported.
> There's also no "WT" entry (which we wouldn't have used on a platform
> without display anyway).
>
> Bspec: 71582
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pat.c | 96 ++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 95 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
> index 6e48ff84ad0a0..7649b554942aa 100644
> --- a/drivers/gpu/drm/xe/xe_pat.c
> +++ b/drivers/gpu/drm/xe/xe_pat.c
> @@ -154,6 +154,41 @@ static const struct xe_pat_table_entry xe2_pat_table[] = {
> static const struct xe_pat_table_entry xe2_pat_ats = XE2_PAT( 0, 0, 0, 0, 3, 3 );
> static const struct xe_pat_table_entry xe2_pat_pta = XE2_PAT( 0, 0, 0, 0, 3, 0 );
>
> +/*
> + * Xe3p_XPC PAT table uses the same layout as Xe2/Xe3, except that there's no
> + * option for compression. Also note that the "L3" and "L4" register fields
> + * actually control L2 and L3 cache respectively on this platform.
> + */
> +#define XE3P_XPC_PAT(no_promote, l3clos, l3_policy, l4_policy, __coh_mode) \
> + XE2_PAT(no_promote, 0, l3clos, l3_policy, l4_policy, __coh_mode)
> +
> +static const struct xe_pat_table_entry xe3p_xpc_pat_ats = XE3P_XPC_PAT( 0, 0, 0, 0, 3 );
> +static const struct xe_pat_table_entry xe3p_xpc_pat_pta = XE3P_XPC_PAT( 0, 0, 0, 0, 0 );
> +
> +static const struct xe_pat_table_entry xe3p_xpc_pat_table[] = {
> + [ 0] = XE3P_XPC_PAT( 0, 0, 0, 0, 0 ),
> + [ 1] = XE3P_XPC_PAT( 0, 0, 0, 0, 2 ),
> + [ 2] = XE3P_XPC_PAT( 0, 0, 0, 0, 3 ),
> + [ 3] = XE3P_XPC_PAT( 0, 0, 3, 3, 0 ),
> + [ 4] = XE3P_XPC_PAT( 0, 0, 3, 3, 2 ),
> + [ 5] = XE3P_XPC_PAT( 0, 0, 3, 0, 0 ),
> + [ 6] = XE3P_XPC_PAT( 0, 0, 3, 0, 2 ),
> + [ 7] = XE3P_XPC_PAT( 0, 0, 3, 0, 3 ),
> + [ 8] = XE3P_XPC_PAT( 0, 0, 0, 3, 0 ),
> + [ 9] = XE3P_XPC_PAT( 0, 0, 0, 3, 2 ),
> + [10] = XE3P_XPC_PAT( 0, 0, 0, 3, 3 ),
> + /* 11..22 are reserved; leave set to all 0's */
> + [23] = XE3P_XPC_PAT( 0, 1, 0, 0, 0 ),
> + [24] = XE3P_XPC_PAT( 0, 1, 0, 0, 2 ),
> + [25] = XE3P_XPC_PAT( 0, 1, 0, 0, 3 ),
> + [26] = XE3P_XPC_PAT( 0, 2, 0, 0, 0 ),
> + [27] = XE3P_XPC_PAT( 0, 2, 0, 0, 2 ),
> + [28] = XE3P_XPC_PAT( 0, 2, 0, 0, 3 ),
> + [29] = XE3P_XPC_PAT( 0, 3, 0, 0, 0 ),
> + [30] = XE3P_XPC_PAT( 0, 3, 0, 0, 2 ),
> + [31] = XE3P_XPC_PAT( 0, 3, 0, 0, 3 ),
> +};
> +
> u16 xe_pat_index_get_coh_mode(struct xe_device *xe, u16 pat_index)
> {
> WARN_ON(pat_index >= xe->pat.n_entries);
> @@ -380,9 +415,68 @@ static const struct xe_pat_ops xe2_pat_ops = {
> .dump = xe2_dump,
> };
>
> +static int xe3p_xpc_dump(struct xe_gt *gt, struct drm_printer *p)
> +{
> + struct xe_device *xe = gt_to_xe(gt);
> + unsigned int fw_ref;
> + u32 pat;
> + int i;
> +
> + fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> + if (!fw_ref)
> + return -ETIMEDOUT;
> +
> + drm_printf(p, "PAT table:\n");
> +
> + for (i = 0; i < xe->pat.n_entries; i++) {
> + pat = xe_gt_mcr_unicast_read_any(gt, XE_REG_MCR(_PAT_INDEX(i)));
> +
> + drm_printf(p, "PAT[%2d] = [ %u, %u, %u, %u, %u ] (%#8x)\n", i,
> + !!(pat & XE2_NO_PROMOTE),
> + REG_FIELD_GET(XE2_L3_CLOS, pat),
> + REG_FIELD_GET(XE2_L3_POLICY, pat),
> + REG_FIELD_GET(XE2_L4_POLICY, pat),
> + REG_FIELD_GET(XE2_COH_MODE, pat),
> + pat);
> + }
> +
> + /*
> + * Also print PTA_MODE, which describes how the hardware accesses
> + * PPGTT entries.
> + */
> + pat = xe_gt_mcr_unicast_read_any(gt, XE_REG_MCR(_PAT_PTA));
> +
> + drm_printf(p, "Page Table Access:\n");
> + drm_printf(p, "PTA_MODE= [ %u, %u, %u, %u, %u ] (%#8x)\n",
> + !!(pat & XE2_NO_PROMOTE),
> + REG_FIELD_GET(XE2_L3_CLOS, pat),
> + REG_FIELD_GET(XE2_L3_POLICY, pat),
> + REG_FIELD_GET(XE2_L4_POLICY, pat),
> + REG_FIELD_GET(XE2_COH_MODE, pat),
> + pat);
For completeness, we can print the _PTA_ATS register also.
Outside that, patch LGTM.
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> +
> + xe_force_wake_put(gt_to_fw(gt), fw_ref);
> + return 0;
> +}
> +
> +static const struct xe_pat_ops xe3p_xpc_pat_ops = {
> + .program_graphics = program_pat_mcr,
> + .program_media = program_pat,
> + .dump = xe3p_xpc_dump,
> +};
> +
> void xe_pat_init_early(struct xe_device *xe)
> {
> - if (GRAPHICS_VER(xe) == 30 || GRAPHICS_VER(xe) == 20) {
> + if (GRAPHICS_VERx100(xe) == 3511) {
> + xe->pat.ops = &xe3p_xpc_pat_ops;
> + xe->pat.table = xe3p_xpc_pat_table;
> + xe->pat.pat_ats = &xe3p_xpc_pat_ats;
> + xe->pat.pat_pta = &xe3p_xpc_pat_pta;
> + xe->pat.n_entries = ARRAY_SIZE(xe3p_xpc_pat_table);
> + xe->pat.idx[XE_CACHE_NONE] = 3;
> + xe->pat.idx[XE_CACHE_WT] = 3; /* N/A (no display); use UC */
> + xe->pat.idx[XE_CACHE_WB] = 2;
> + } else if (GRAPHICS_VER(xe) == 30 || GRAPHICS_VER(xe) == 20) {
> xe->pat.ops = &xe2_pat_ops;
> xe->pat.table = xe2_pat_table;
> xe->pat.pat_ats = &xe2_pat_ats;
>
> --
> 2.51.0
>
next prev parent reply other threads:[~2025-10-16 14:07 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 3:24 [PATCH 00/23] drm/xe: Add Xe3p support Lucas De Marchi
2025-10-14 3:24 ` [PATCH 01/23] drm/xe/xe3: Add support for graphics IP versions 30.04 & 30.05 Lucas De Marchi
2025-10-14 6:17 ` Shekhar Chauhan
2025-10-14 16:11 ` Matt Roper
2025-10-14 3:24 ` [PATCH 02/23] drm/xe/xe3p_lpm: Add support for media IP versions 35.00 & 35.03 Lucas De Marchi
2025-10-14 6:22 ` Shekhar Chauhan
2025-10-14 16:14 ` Matt Roper
2025-10-14 3:24 ` [PATCH 03/23] drm/xe/xe3p_lpm: Configure MAIN_GAMCTRL_QUEUE_SELECT Lucas De Marchi
2025-10-14 16:34 ` Matt Roper
2025-10-15 2:28 ` Lucas De Marchi
2025-10-15 6:36 ` Vivekanandan, Balasubramani
2025-10-15 14:03 ` Lucas De Marchi
2025-10-16 14:20 ` Vivekanandan, Balasubramani
2025-10-15 14:59 ` Matt Roper
2025-10-14 3:24 ` [PATCH 04/23] drm/xe/xe3p_lpm: Add special check in Media GT for Main GAMCTRL Lucas De Marchi
2025-10-14 16:36 ` Matt Roper
2025-10-14 3:24 ` [PATCH 05/23] drm/xe/xe3p_lpm: Stop reading the CTC_MODE register Lucas De Marchi
2025-10-14 11:58 ` Shekhar Chauhan
2025-10-14 16:52 ` Matt Roper
2025-10-15 3:41 ` Lucas De Marchi
2025-10-15 9:19 ` Vivekanandan, Balasubramani
2025-10-15 15:04 ` Matt Roper
2025-10-14 16:40 ` Matt Roper
2025-10-14 16:53 ` Matt Roper
2025-10-14 3:24 ` [PATCH 06/23] drm/xe/xe3p_lpm: Skip disabling NOA on unsupported IPs Lucas De Marchi
2025-10-14 17:04 ` Matt Roper
2025-10-14 3:24 ` [PATCH 07/23] drm/xe/xe3p_lpm: Handle MCR steering Lucas De Marchi
2025-10-15 9:56 ` Vivekanandan, Balasubramani
2025-10-14 3:24 ` [PATCH 08/23] drm/xe/xe3p: Stop programming RCU_MODE's fixed slice mode setting Lucas De Marchi
2025-10-15 12:24 ` Vivekanandan, Balasubramani
2025-10-14 3:24 ` [PATCH 09/23] drm/xe/xe3p: Determine service copy availability from fuse Lucas De Marchi
2025-10-15 20:14 ` Gustavo Sousa
2025-10-14 3:24 ` [PATCH 10/23] drm/xe/xe3p: Skip TD flush Lucas De Marchi
2025-10-14 19:35 ` Matt Roper
2025-10-14 3:24 ` [PATCH 11/23] drm/xe/xe3p: Enable L2 flush optimization feature Lucas De Marchi
2025-10-14 19:43 ` Matt Roper
2025-10-15 4:02 ` Lucas De Marchi
2025-10-14 3:24 ` [PATCH 12/23] drm/xe/xe3p: Flush userptr/shrinker bo cachelines manually Lucas De Marchi
2025-10-14 12:58 ` Thomas Hellström
2025-10-15 18:42 ` Lucas De Marchi
2025-10-14 3:24 ` [PATCH 13/23] drm/xe: Dump CURRENT_LRCA and CSMQDEBUG registers Lucas De Marchi
2025-10-14 17:24 ` Matt Roper
2025-10-15 4:07 ` Lucas De Marchi
2025-10-14 3:24 ` [PATCH 14/23] drm/xe/nvl: Define NVL-S platform Lucas De Marchi
2025-10-14 7:34 ` Shekhar Chauhan
2025-10-14 3:24 ` [PATCH 15/23] drm/xe/nvls: Define GuC firmware for NVL-S Lucas De Marchi
2025-10-15 18:49 ` Lucas De Marchi
2025-10-14 3:24 ` [PATCH 16/23] drm/xe/nvls: Attach MOCS table " Lucas De Marchi
2025-10-14 7:45 ` Shekhar Chauhan
2025-10-14 3:24 ` [PATCH 17/23] drm/xe/xe3p_xpc: Add Xe3p_XPC IP definition Lucas De Marchi
2025-10-14 8:04 ` Shekhar Chauhan
2025-10-14 8:12 ` Shekhar Chauhan
2025-10-14 17:33 ` Matt Roper
2025-10-15 2:47 ` Shekhar Chauhan
2025-10-14 17:36 ` Matt Roper
2025-10-14 3:24 ` [PATCH 18/23] drm/xe/xe3p_xpc: Add L3 bank mask Lucas De Marchi
2025-10-14 17:46 ` Matt Roper
2025-10-14 3:24 ` [PATCH 19/23] drm/xe/xe3p_xpc: Add MCR steering Lucas De Marchi
2025-10-14 3:24 ` [PATCH 20/23] drm/xe/xe3p_xpc: Add support for compute walker for non-MSIx Lucas De Marchi
2025-10-14 18:07 ` Matt Roper
2025-10-15 17:07 ` Lucas De Marchi
2025-10-15 17:12 ` Matt Roper
2025-10-14 3:24 ` [PATCH 21/23] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs Lucas De Marchi
2025-10-14 8:09 ` Shekhar Chauhan
2025-10-14 8:13 ` Shekhar Chauhan
2025-10-14 18:14 ` Matt Roper
2025-10-15 2:52 ` Shekhar Chauhan
2025-10-15 14:38 ` Lucas De Marchi
2025-10-15 15:34 ` Shekhar Chauhan
2025-10-14 3:24 ` [PATCH 22/23] drm/xe/xe3p_xpc: Setup PAT table Lucas De Marchi
2025-10-16 14:07 ` Vivekanandan, Balasubramani [this message]
2025-10-14 3:24 ` [PATCH 23/23] drm/xe/xe3p: Add xe3p EU stall data format Lucas De Marchi
2025-10-14 19:11 ` Matt Roper
2025-10-15 23:05 ` Harish Chegondi
2025-10-14 3:45 ` ✗ CI.checkpatch: warning for drm/xe: Add Xe3p support Patchwork
2025-10-14 3:47 ` ✓ CI.KUnit: success " Patchwork
2025-10-14 4:22 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-14 12:06 ` ✓ 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=aPD8CCUkpAAhFjS9@bvivekan-mobl1 \
--to=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