Skip to content

Commit b885ae2

Browse files
kpoosaThomas Hellström
authored andcommitted
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 <[email protected]> Fixes: 345dadc ("drm/xe/hwmon: Add infra to support card power and energy attributes") Reviewed-by: Badal Nilawar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit 25e963a) Signed-off-by: Thomas Hellström <[email protected]>
1 parent 25a2aa7 commit b885ae2

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,26 @@ Description: RO. Package default power limit (default TDP setting).
6060

6161
Only supported for particular Intel Xe graphics platforms.
6262

63-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_crit
64-
Date: February 2024
65-
KernelVersion: 6.8
63+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_crit
64+
Date: May 2025
65+
KernelVersion: 6.15
6666
67-
Description: RW. Package reactive critical (I1) power limit in microwatts.
67+
Description: RW. Card reactive critical (I1) power limit in microwatts.
6868

69-
Package reactive critical (I1) power limit in microwatts is exposed
69+
Card reactive critical (I1) power limit in microwatts is exposed
7070
for client products. The power controller will throttle the
7171
operating frequency if the power averaged over a window exceeds
7272
this limit.
7373

7474
Only supported for particular Intel Xe graphics platforms.
7575

76-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr2_crit
77-
Date: February 2024
78-
KernelVersion: 6.8
76+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr1_crit
77+
Date: May 2025
78+
KernelVersion: 6.15
7979
80-
Description: RW. Package reactive critical (I1) power limit in milliamperes.
80+
Description: RW. Card reactive critical (I1) power limit in milliamperes.
8181

82-
Package reactive critical (I1) power limit in milliamperes is
82+
Card reactive critical (I1) power limit in milliamperes is
8383
exposed for server products. The power controller will throttle
8484
the operating frequency if the power averaged over a window
8585
exceeds this limit.

drivers/gpu/drm/xe/xe_hwmon.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ static const struct attribute_group *hwmon_groups[] = {
632632
static const struct hwmon_channel_info * const hwmon_info[] = {
633633
HWMON_CHANNEL_INFO(temp, HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_LABEL,
634634
HWMON_T_INPUT | HWMON_T_LABEL),
635-
HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_LABEL,
636-
HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT | HWMON_P_LABEL),
635+
HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_LABEL | HWMON_P_CRIT,
636+
HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_LABEL),
637637
HWMON_CHANNEL_INFO(curr, HWMON_C_LABEL, HWMON_C_CRIT | HWMON_C_LABEL),
638638
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_LABEL),
639639
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)
773773
channel)) ? 0444 : 0;
774774
case hwmon_power_crit:
775775
case hwmon_power_label:
776-
if (channel == CHANNEL_PKG) {
776+
if (channel == CHANNEL_CARD) {
777777
xe_hwmon_pcode_read_i1(hwmon, &uval);
778778
return (uval & POWER_SETUP_I1_WATTS) ? (attr == hwmon_power_label) ?
779779
0444 : 0644 : 0;

0 commit comments

Comments
 (0)