From: sashiko-bot@kernel.org
To: "Karthik Poosa" <karthik.poosa@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm/xe/hwmon: Improve mailbox power limit init and visibility
Date: Mon, 23 Nov 2026 14:18:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-229384@kernel.org> (raw)
In-Reply-To: <20261123140847.338842-3-karthik.poosa@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/xe/hwmon: inconsistent boot-limit visibility for power
interval and label
--
commit f47de5c9c860a6b4f7079857684d0af6687419b7
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Improve mailbox power limit init and visibility
This commit initializes fixed mailbox power, energy, and time shifts
before reading boot power limits, and bases hwmon_power_max and
hwmon_power_cap visibility on the cached boot limits instead of a
separate pcode read.
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 8e0d295aabc88..a616b9eb62ca1 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> @@ -1429,7 +1429,8 @@ xe_hwmon_power_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
> case hwmon_power_max:
> case hwmon_power_cap:
> if (hwmon->xe->info.has_mbx_power_limits) {
> - xe_hwmon_pcode_read_power_limit(hwmon, attr, channel, &uval);
> + uval = attr == hwmon_power_max ? hwmon->pl1_on_boot[channel] :
> + hwmon->pl2_on_boot[channel];
> } else if (attr != PL2_HWMON_ATTR) {
> reg = xe_hwmon_get_reg(hwmon, REG_PKG_RAPL_LIMIT, channel);
> if (xe_reg_is_valid(reg))
[Severity: Medium]
Should the hwmon_power_label case below in xe_hwmon_power_is_visible()
and the interval visibility check in xe_hwmon_attributes_visible() also
use pl1_on_boot[channel] and pl2_on_boot[channel] instead of calling
xe_hwmon_pcode_read_power_limit()?
Both still perform separate pcode reads:
drivers/gpu/drm/xe/xe_hwmon.c:xe_hwmon_attributes_visible() {
...
if (hwmon->xe->info.has_mbx_power_limits) {
xe_hwmon_pcode_read_power_limit(hwmon, power_attr, channel, &uval);
} else if (power_attr != PL2_HWMON_ATTR) {
...
}
drivers/gpu/drm/xe/xe_hwmon.c:xe_hwmon_power_is_visible() {
...
case hwmon_power_label:
if (hwmon->xe->info.has_mbx_power_limits) {
xe_hwmon_pcode_read_power_limit(hwmon, attr, channel, &uval);
} else {
...
}
When a boot-time pcode read fails transiently in
xe_hwmon_get_preregistration_info(), powerN_max or powerN_cap is hidden
and xe_hwmon_pcode_set_default_power_limits() is skipped, but if the
separate pcode read in xe_hwmon_attributes_visible() or
xe_hwmon_power_is_visible() succeeds, the corresponding
powerN_max_interval, powerN_cap_interval, or powerN_label attribute is
still exposed. Conversely, if the boot read succeeds and the later pcode
read fails, the visible power limit loses its companion interval or label
attribute.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123140847.338842-1-karthik.poosa@intel.com?part=2
next prev parent reply other threads:[~2026-11-23 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 14:08 [PATCH v2 0/2] Expose power1_cap_max Karthik Poosa
2026-11-23 14:08 ` [PATCH v2 1/2] drm/xe/hwmon: Expose powerX_cap_max Karthik Poosa
2026-11-23 14:08 ` [PATCH v2 2/2] drm/xe/hwmon: Improve mailbox power limit init and visibility Karthik Poosa
2026-11-23 14:18 ` sashiko-bot [this message]
2026-11-23 15:35 ` Poosa, Karthik
2026-11-23 14:57 ` ✗ CI.KUnit: failure for Expose power1_cap_max 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-229384@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.