From: sashiko-bot@kernel.org
To: "Nareshkumar Gollakoti" <naresh.kumar.g@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 1/7] drm/xe/devcoredump: Capture GT fuse registers in devcoredump
Date: Thu, 03 Sep 2026 14:32:26 +0000 [thread overview]
Message-ID: <20260903143227.28D741F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260903141834.1315675-2-naresh.kumar.g@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Hardcoded array index used to check the POWERGATE_ENABLE register is fragile.
--
commit b7d03cc3b56be0544af3370f72a4384e4131de66
Author: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
drm/xe/devcoredump: Capture GT fuse registers in devcoredump
Capture fuse-related GT register state in the Xe devcoredump to preserve
additional hardware configuration information for postmortem debugging.
> diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
> --- a/drivers/gpu/drm/xe/xe_devcoredump.c
> +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
[ ... ]
> +static const struct xe_reg_desc xe3p_gt_rpm_reglist[] = {
> + XE_REG_DESC(RPM_GCD, "RPM_GCD"),
> + XE_REG_DESC(POWERGATE_ENABLE, "POWERGATE_ENABLE"),
> +};
[ ... ]
> +static void xe_gt_rpm_snapshot_print(struct drm_printer *p,
> + const struct xe_dbg_reg_snapshot *snap)
> +{
> + xe_dbg_reg_snapshot_print(p, snap);
> +
> + if (snap && snap->num_regs >= 2 &&
> + !(snap->regs[1].value & RENDER_POWERGATE_ENABLE))
[Severity: Low]
Is it safe to use a hardcoded array index in xe_gt_rpm_snapshot_print() here?
This check tightly couples the print logic to the exact ordering of elements in
the xe3p_gt_rpm_reglist array, relying on POWERGATE_ENABLE remaining at index
1. If a future commit inserts or reorders elements in xe3p_gt_rpm_reglist,
it could silently break this print logic by evaluating the wrong register's
value.
Could this be made more robust against future modifications to the underlying
static register list?
> + drm_puts(p, "render powergating appears not enabled\n");
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260903141834.1315675-1-naresh.kumar.g@intel.com?part=1
next prev parent reply other threads:[~2026-09-03 14:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 14:18 [PATCH v3 0/7] drm/xe: Capture additional HW register state in devcoredump Nareshkumar Gollakoti
2026-09-03 14:18 ` [PATCH v3 1/7] drm/xe/devcoredump: Capture GT fuse registers " Nareshkumar Gollakoti
2026-09-03 14:32 ` sashiko-bot [this message]
2026-09-03 14:18 ` [PATCH v3 2/7] drm/xe/devcoredump: Add GuC register snapshot to devcoredump Nareshkumar Gollakoti
2026-09-03 14:18 ` [PATCH v3 3/7] drm/xe/guc: Print register addresses in capture snapshot output Nareshkumar Gollakoti
2026-09-03 14:18 ` [PATCH v3 4/7] drm/xe: dump GAM page fault report registers in devcoredump Nareshkumar Gollakoti
2026-09-03 14:18 ` [PATCH v3 5/7] drm/xe/guc: add TDL, SLICE gfx registers to capture list Nareshkumar Gollakoti
2026-09-03 14:18 ` [PATCH v3 6/7] drm/xe: capture L3 node status registers in devcoredump Nareshkumar Gollakoti
2026-09-03 14:18 ` [PATCH v3 7/7] drm/xe/guc: capture additional engine state registers Nareshkumar Gollakoti
2026-09-03 14:33 ` sashiko-bot
2026-09-03 14:54 ` ✗ CI.checkpatch: warning for drm/xe: Capture additional HW register state in devcoredump (rev3) Patchwork
2026-09-03 14:56 ` ✓ CI.KUnit: success " Patchwork
2026-09-03 15:39 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-04 2:01 ` ✗ 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=20260903143227.28D741F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=naresh.kumar.g@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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