From: sashiko-bot@kernel.org
To: "Tejas Upadhyay" <tejas.upadhyay@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH V2] drm/xe/nvl-p: Add Wa_14028564128
Date: Thu, 19 Nov 2026 08:08:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-222643@kernel.org> (raw)
In-Reply-To: <20261119075242.3292552-2-tejas.upadhyay@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Low] drm/xe: dead xe_pat_wa_14028564128_safe_userptr_index() check in
VM bind/madvise
- [Low] drm/xe: xe_pat_wa_14026539277_reserved() is dead code under
Wa_14028564128
- [Low] drm/xe: commit message lacks Wa_14028564128 description and
stepping scope
--
commit a633547ef8e235a15273f650a42f77a0dff5896d
Author: Tejas Upadhyay <tejas.upadhyay@intel.com>
> drm/xe/nvl-p: Add Wa_14028564128
>
> Wa_14028564128 applies to 35.10
>
> V2:
> - Add missing pat indexes to no_promote as asked by WA
>
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
[Severity: Low]
Could the commit message explain what Wa_14028564128 does and why it lifts
the UAPI reservation of 2-way coherent PAT indices? Also, the commit
message says the workaround applies to 35.10, while xe_wa_oob.rules
restricts it to steppings [A0, B0) of graphics version 35.10.
> diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
> index 5938fef22579a..24caed2626425 100644
> --- a/drivers/gpu/drm/xe/xe_pat.c
> +++ b/drivers/gpu/drm/xe/xe_pat.c
> @@ -337,6 +337,18 @@ bool xe_pat_wa_14026539277_reserved(struct xe_device *xe, u16 pat_index)
> }
> }
>
> + /*
> + * Wa_14028564128 remaps every PAT index that is statically 2-way
> + * coherent (indices 2, 7, 23, 27 and 31 in this table) to a safe
> + * no-promote/UC/1-way value, so none of them are subject to this
> + * restriction once that WA is enabled.
> + */
> + for_each_gt(gt, xe, id) {
> + if (XE_GT_WA(gt, 14028564128) &&
> + xe_pat_index_get_coh_mode(xe, pat_index) == XE_COH_2WAY)
> + return false;
> + }
> +
> /*
> * Disallow 2-way coherency for any L3 cache policy because
> * XE_L3_POLICY_UC could still be promoted to a cached policy
> @@ -345,6 +357,21 @@ bool xe_pat_wa_14026539277_reserved(struct xe_device *xe, u16 pat_index)
> return has_wa && xe_pat_index_get_coh_mode(xe, pat_index) == XE_COH_2WAY;
> }
[Severity: Low]
Does xe_pat_wa_14026539277_reserved() ever return true now?
In xe_wa_oob.rules, both 14026539277 and 14028564128 match the exact same
rule: GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0). Whenever has_wa is
true and xe_pat_index_get_coh_mode(xe, pat_index) == XE_COH_2WAY, the new
loop above already returns false. In addition, the comment here says
Wa_14028564128 remaps those entries to no-promote/UC/1-way, whereas
wa_14028564128_fixup_pat_value() only sets XE2_NO_PROMOTE and relies on
wa_14026539277_fixup_pat_value() having already converted them to L3 UC and
1-way coherency.
> +bool xe_pat_wa_14028564128_safe_userptr_index(struct xe_device *xe, u16 pat_index)
> +{
> + struct xe_gt *gt;
> + u8 id;
> +
> + if (pat_index != 2)
> + return false;
> +
> + for_each_gt(gt, xe, id)
> + if (XE_GT_WA(gt, 14028564128))
> + return true;
> +
> + return false;
> +}
[ ... ]
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index dd855876f571c..80ccaa44720ce 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -3888,7 +3888,8 @@ static int vm_bind_ioctl_check_args(struct xe_device *xe, struct xe_vm *vm,
> XE_IOCTL_DBG(xe, xe_device_is_l2_flush_optimized(xe) &&
> (op == DRM_XE_VM_BIND_OP_MAP_USERPTR ||
> is_cpu_addr_mirror) &&
> - (pat_index != 19 && coh_mode != XE_COH_2WAY)) ||
> + (pat_index != 19 && coh_mode != XE_COH_2WAY &&
> + !xe_pat_wa_14028564128_safe_userptr_index(xe, pat_index))) ||
> XE_IOCTL_DBG(xe, comp_en &&
> op == DRM_XE_VM_BIND_OP_MAP_USERPTR) ||
> XE_IOCTL_DBG(xe, op == DRM_XE_VM_BIND_OP_MAP_USERPTR &&
[Severity: Low]
Is xe_pat_wa_14028564128_safe_userptr_index() dead code across all four
call sites in xe_vm.c and xe_vm_madvise.c?
xe_pat_index_get_coh_mode() reads the static xe->pat.table[pat_index].coh_mode
entry, which is XE_COH_2WAY for PAT index 2 (as well as 7, 23, 27, and 31)
in xe3p_lpg_pat_table. Because xe_pat_wa_14028564128_safe_userptr_index()
only returns true when pat_index == 2, coh_mode != XE_COH_2WAY is already
false whenever the helper could return true, so the condition short-circuits
before the helper's result can have any effect. Once
xe_pat_wa_14026539277_reserved() stops rejecting the 2-way coherent PAT
indices, the existing coh_mode != XE_COH_2WAY checks already accept them
without this helper.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119075242.3292552-2-tejas.upadhyay@intel.com?part=1
next prev parent reply other threads:[~2026-11-19 8:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 7:52 [PATCH V2] drm/xe/nvl-p: Add Wa_14028564128 Tejas Upadhyay
2026-11-19 8:08 ` sashiko-bot [this message]
2026-11-19 9:48 ` ✓ CI.KUnit: success for drm/xe/nvl-p: Add Wa_14028564128 (rev2) Patchwork
2026-11-19 10:47 ` ✓ Xe.CI.BAT: " 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=sashiko-outbox-222643@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--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