From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <nitin.r.gote@intel.com>, Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [V3] drm/xe/nvl-p: Add Wa_14028564128
Date: Fri, 27 Nov 2026 11:51:46 -0300 [thread overview]
Message-ID: <87tsl2iayl.fsf@intel.com> (raw)
In-Reply-To: <20261127132613.3957154-2-tejas.upadhyay@intel.com>
Tejas Upadhyay <tejas.upadhyay@intel.com> writes:
> Wa_14028564128 requires all 2-way coherent PAT entries to be programmed
I would add ", except for PTA modes, " here.
> as non-promotable 1-way coherent entries with L3:UC. It applies to all
> steppings of graphics version 35.10.
>
> On Xe3p LPG this affects PAT indices 2, 7, 23, 27 and 31.
>
> V3:
> - Apply Wa_14028564128 before Wa_14026539277 and document the ordering
> - Drop xe_pat_wa_14028564128_safe_userptr_index()
>
> V2:
> - Add missing pat indexes to no_promote as asked by WA
>
> Co-authored-by: Nitin Gote <nitin.r.gote@intel.com>
Based on Documentation/process/submitting-patches.rst, I believe the
standard trailer for co-authorship is "Co-developed-by" and it also
requires a "Signed-off-by" by the same co-author.
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
With the above fixed,
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
I can apply those changes in the commit message when applying this patch
(after checking CI) if you and Nitin are okay with that.
--
Gustavo Sousa
> ---
> drivers/gpu/drm/xe/xe_pat.c | 29 ++++++++++++++++++++++++++++-
> drivers/gpu/drm/xe/xe_wa_oob.rules | 1 +
> 2 files changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
> index 5938fef22579..29062672bf2d 100644
> --- a/drivers/gpu/drm/xe/xe_pat.c
> +++ b/drivers/gpu/drm/xe/xe_pat.c
> @@ -337,6 +337,11 @@ bool xe_pat_wa_14026539277_reserved(struct xe_device *xe, u16 pat_index)
> }
> }
>
> + /* Wa_14028564128 also sets NO_PROMOTE, so MOCS can't promote these */
> + for_each_gt(gt, xe, id)
> + if (XE_GT_WA(gt, 14028564128))
> + return false;
> +
> /*
> * Disallow 2-way coherency for any L3 cache policy because
> * XE_L3_POLICY_UC could still be promoted to a cached policy
> @@ -358,6 +363,19 @@ static u32 wa_14026539277_fixup_pat_value(struct xe_gt *gt, u32 value)
> return value;
> }
>
> +static u32 wa_14028564128_fixup_pat_value(struct xe_gt *gt, u32 value)
> +{
> + if (XE_GT_WA(gt, 14028564128) &&
> + REG_FIELD_GET(XE2_COH_MODE, value) == XE_COH_2WAY) {
> + value &= ~(XE2_L3_POLICY | XE2_COH_MODE);
> + value |= XE2_NO_PROMOTE |
> + REG_FIELD_PREP(XE2_L3_POLICY, XE_L3_POLICY_UC) |
> + REG_FIELD_PREP(XE2_COH_MODE, XE_COH_1WAY);
> + }
> +
> + return value;
> +}
> +
> static const struct xe_pat_table_entry *gt_pta_entry(struct xe_gt *gt)
> {
> struct xe_device *xe = gt_to_xe(gt);
> @@ -418,7 +436,15 @@ static void program_pat_mcr(struct xe_gt *gt, const struct xe_pat_table_entry ta
>
> for (int i = 0; i < n_entries; i++) {
> struct xe_reg_mcr reg_mcr = XE_REG_MCR(_PAT_INDEX(i));
> - u32 pat = wa_14026539277_fixup_pat_value(gt, table[i].value);
> + u32 pat = table[i].value;
> +
> + /*
> + * Both WAs only act on 2-way coherent entries and turn them
> + * 1-way, so whichever runs first disables the other. Wa_14028564128
> + * is a superset of Wa_14026539277 and must be applied first.
> + */
> + pat = wa_14028564128_fixup_pat_value(gt, pat);
> + pat = wa_14026539277_fixup_pat_value(gt, pat);
>
> xe_gt_mcr_multicast_write(gt, reg_mcr, pat);
> }
> @@ -809,6 +835,7 @@ int xe_pat_dump_sw_config(struct xe_gt *gt, struct drm_printer *p)
> for (u32 i = 0; i < xe->pat.n_entries; i++) {
> u32 pat = xe->pat.table[i].value;
>
> + pat = wa_14028564128_fixup_pat_value(gt, pat);
> pat = wa_14026539277_fixup_pat_value(gt, pat);
>
> if (GRAPHICS_VER(xe) >= 20) {
> diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
> index 03b713f55dfb..908091dd72ab 100644
> --- a/drivers/gpu/drm/xe/xe_wa_oob.rules
> +++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
> @@ -74,6 +74,7 @@
> 16029897822 MEDIA_VERSION(3500)
> GRAPHICS_VERSION(3510)
> 14026539277 GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0)
> +14028564128 GRAPHICS_VERSION(3510)
> 14027054324 GRAPHICS_VERSION(3511)
> 14025941587 GRAPHICS_VERSION_RANGE(2001, 3511)
> MEDIA_VERSION_RANGE(1301, 3503)
> --
> 2.52.0
prev parent reply other threads:[~2026-11-27 14:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 13:26 [V3] drm/xe/nvl-p: Add Wa_14028564128 Tejas Upadhyay
2026-11-27 14:51 ` 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=87tsl2iayl.fsf@intel.com \
--to=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=nitin.r.gote@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