From: sashiko-bot@kernel.org
To: "Karthik Poosa" <karthik.poosa@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 2/5] drm/xe/hwmon: Use VRAM temperature sensor count from thermal config on CRI
Date: Thu, 10 Sep 2026 18:47:54 +0000 [thread overview]
Message-ID: <20260910184755.201EB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260910182756.638830-3-karthik.poosa@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [Low] Kernel-doc syntax violation for struct member documentation.
Pre-existing issues:
- [High] xe_hwmon_pcode_rmw_power_limit ignores xe_pcode_read failures, leading to hardware state corruption.
- [High] Incorrect bounds check for CRI platforms causes silent field overflow when encoding power limits.
--
commit b3104079752794b6ca510cf54096b19d2c7bfc90
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Use VRAM temperature sensor count from thermal config on CRI
Read the number of VRAM temperature sensor channels from the second byte
of READ_THERMAL_CONFIG on CRI platforms. Use the reported count to avoid
exposing hwmon attributes for unavailable VRAM temperature sensors, while
retaining the maximum supported channel count on non-CRI platforms.
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> index f88bacf63c83c..74037a9c32f7e 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -178,6 +178,10 @@ struct xe_device {
> u8 has_drm_ras:1;
> /** @info.has_fan_control: Device supports fan control */
> u8 has_fan_control:1;
> + /*
> + * @info.has_fixed_vram_channels: Device has fixed VRAM temperature channel count.
> + */
> + u8 has_fixed_vram_channels:1;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Severity: Low]
Is this block comment meant to be a kernel-doc comment?
Using a standard C block comment (/*) instead of a kernel-doc comment (/**)
for the newly added has_fixed_vram_channels member will cause kernel-doc
tooling to emit a "not described" warning when generating documentation.
[ ... ]
[Severity: High]
This is a pre-existing issue, but does xe_hwmon_pcode_rmw_power_limit()
safely handle PCODE read failures?
If xe_pcode_read() fails, it logs the error but proceeds to perform a
read-modify-write on val0 and val1, which remain initialized to 0:
drivers/gpu/drm/xe/xe_hwmon.c:xe_hwmon_pcode_rmw_power_limit() {
...
ret = xe_pcode_read(root_tile, PCODE_MBOX(...), &val0, &val1);
if (ret)
drm_dbg(&hwmon->xe->drm, "read failed ch %d val0 0x%08x, val1 0x%08x, ret %d\n",
channel, val0, val1, ret);
if (attr == PL1_HWMON_ATTR)
val0 = (val0 & ~clr) | set;
else if (attr == PL2_HWMON_ATTR)
val1 = (val1 & ~clr) | set;
...
ret = xe_pcode_write64_timeout(root_tile, PCODE_MBOX(...), val0, val1, PL_WRITE_MBX_TIMEOUT_MS);
...
}
Writing these 0 values back via xe_pcode_write64_timeout() inadvertently zeroes
out the non-targeted power limit and its time windows. Can this disable critical
sustained power limits and cause severe performance throttling?
[Severity: High]
This is a pre-existing issue, but does xe_hwmon_power_max_interval_store()
properly validate the time window for CRI platforms?
The sysfs store function bounds-checks the input time window against max_win
(calculated using legacy encoding up to ~256 seconds) and then shifts the
value before placing it into the 7-bit PWR_LIM_TIME field:
drivers/gpu/drm/xe/xe_hwmon.c:xe_hwmon_power_max_interval_store() {
...
if (val > max_win)
return -EINVAL;
if (hwmon->xe->info.platform >= XE_CRESCENTISLAND) {
/* ... */
rxy = REG_FIELD_PREP(PWR_LIM_TIME, (val << 2));
}
...
}
Inputs larger than ~31 ms will silently overflow the 7-bit PWR_LIM_TIME field.
Will this write a truncated, drastically reduced time window to the hardware,
restricting the GPU's ability to absorb bursty workloads and causing immediate
throttling?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910182756.638830-1-karthik.poosa@intel.com?part=2
next prev parent reply other threads:[~2026-09-10 18:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 18:27 [PATCH v3 0/5] drm/xe/hwmon: Update hwmon thermal mailbox handling Karthik Poosa
2026-09-10 18:27 ` [PATCH v3 1/5] drm/xe/hwmon: Detect unavailable temperature sensors Karthik Poosa
2026-09-10 18:42 ` sashiko-bot
2026-09-10 18:27 ` [PATCH v3 2/5] drm/xe/hwmon: Use VRAM temperature sensor count from thermal config on CRI Karthik Poosa
2026-09-10 18:47 ` sashiko-bot [this message]
2026-09-10 18:27 ` [PATCH v3 3/5] drm/xe/hwmon: Fix memory controller thermal data handling Karthik Poosa
2026-09-10 18:27 ` [PATCH v3 4/5] drm/xe/hwmon: Decode CRI temperature registers as IEEE-754 Karthik Poosa
2026-09-10 18:27 ` [PATCH v3 5/5] drm/xe/hwmon: Disable memory controller and PCIe temperatures on CRI Karthik Poosa
2026-09-10 18:47 ` ✓ CI.KUnit: success for drm/xe/hwmon: Update hwmon thermal mailbox handling (rev3) Patchwork
2026-09-10 19:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-11 4:49 ` ✓ 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=20260910184755.201EB1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.