drm/xe/hwmon: Move card reactive critical power under channel card

Move power2/curr2_crit to channel 1 i.e power1/curr1_crit as this
represents the entire card critical power/current.

v2: Update the date of curr1_crit also in hwmon documentation.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Fixes: 345dadc4f6 ("drm/xe/hwmon: Add infra to support card power and energy attributes")
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Link: https://lore.kernel.org/r/20250529163458.2354509-3-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Karthik Poosa 2025-05-29 22:04:54 +05:30 committed by Rodrigo Vivi
parent 7596d839f6
commit 25e963a09e
No known key found for this signature in database
GPG Key ID: FA625F640EEB13CA
2 changed files with 13 additions and 13 deletions

View File

@ -60,26 +60,26 @@ Description: RO. Package default power limit (default TDP setting).
Only supported for particular Intel Xe graphics platforms. Only supported for particular Intel Xe graphics platforms.
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_crit What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_crit
Date: February 2024 Date: May 2025
KernelVersion: 6.8 KernelVersion: 6.15
Contact: intel-xe@lists.freedesktop.org Contact: intel-xe@lists.freedesktop.org
Description: RW. Package reactive critical (I1) power limit in microwatts. Description: RW. Card reactive critical (I1) power limit in microwatts.
Package reactive critical (I1) power limit in microwatts is exposed Card reactive critical (I1) power limit in microwatts is exposed
for client products. The power controller will throttle the for client products. The power controller will throttle the
operating frequency if the power averaged over a window exceeds operating frequency if the power averaged over a window exceeds
this limit. this limit.
Only supported for particular Intel Xe graphics platforms. Only supported for particular Intel Xe graphics platforms.
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr2_crit What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr1_crit
Date: February 2024 Date: May 2025
KernelVersion: 6.8 KernelVersion: 6.15
Contact: intel-xe@lists.freedesktop.org Contact: intel-xe@lists.freedesktop.org
Description: RW. Package reactive critical (I1) power limit in milliamperes. Description: RW. Card reactive critical (I1) power limit in milliamperes.
Package reactive critical (I1) power limit in milliamperes is Card reactive critical (I1) power limit in milliamperes is
exposed for server products. The power controller will throttle exposed for server products. The power controller will throttle
the operating frequency if the power averaged over a window the operating frequency if the power averaged over a window
exceeds this limit. exceeds this limit.

View File

@ -632,8 +632,8 @@ static const struct attribute_group *hwmon_groups[] = {
static const struct hwmon_channel_info * const hwmon_info[] = { static const struct hwmon_channel_info * const hwmon_info[] = {
HWMON_CHANNEL_INFO(temp, HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_LABEL, HWMON_CHANNEL_INFO(temp, HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL), HWMON_T_INPUT | HWMON_T_LABEL),
HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_LABEL, HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_LABEL | HWMON_P_CRIT,
HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT | HWMON_P_LABEL), HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_LABEL),
HWMON_CHANNEL_INFO(curr, HWMON_C_LABEL, HWMON_C_CRIT | HWMON_C_LABEL), HWMON_CHANNEL_INFO(curr, HWMON_C_LABEL, HWMON_C_CRIT | HWMON_C_LABEL),
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_LABEL), HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_LABEL),
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT | HWMON_E_LABEL, HWMON_E_INPUT | HWMON_E_LABEL), HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT | HWMON_E_LABEL, HWMON_E_INPUT | HWMON_E_LABEL),
@ -773,7 +773,7 @@ xe_hwmon_power_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
channel)) ? 0444 : 0; channel)) ? 0444 : 0;
case hwmon_power_crit: case hwmon_power_crit:
case hwmon_power_label: case hwmon_power_label:
if (channel == CHANNEL_PKG) { if (channel == CHANNEL_CARD) {
xe_hwmon_pcode_read_i1(hwmon, &uval); xe_hwmon_pcode_read_i1(hwmon, &uval);
return (uval & POWER_SETUP_I1_WATTS) ? (attr == hwmon_power_label) ? return (uval & POWER_SETUP_I1_WATTS) ? (attr == hwmon_power_label) ?
0444 : 0644 : 0; 0444 : 0644 : 0;