Skip to content

Commit 345dadc

Browse files
kpoosarodrigovivi
authored andcommitted
drm/xe/hwmon: Add infra to support card power and energy attributes
Add infra to support card power and energy attributes through channel 0. Package attributes will be now exposed through channel 1 rather than channel 0 as shown below. Channel 0 i.e power1/energy1_xxx used for card and channel 1 i.e power2/energy2_xxx used for package power,energy attributes. power1/curr1_crit and in0_input are moved to channel 1, i.e. power2/curr2_crit and in1_input as these are available for package only. This would be needed for future platforms where they might be separate registers for package and card power and energy. Each discrete GPU supported by Xe driver, would have a directory in /sys/class/hwmon/ with multiple channels under it. Each channel would have attributes for power, energy etc. Ex: /sys/class/hwmon/hwmon2/power1_max /power1_label /energy1_input /energy1_label Attributes will have a label to get more description of it. Labelling is as below. power1_label/energy1_label - "card", power2_label/energy2_label - "pkg". v2: Fix checkpatch errors. v3: - Update intel-xe-hwmon documentation. (Riana, Badal) - Rename hwmon card channel enum from CHANNEL_PLATFORM to CHANNEL_CARD. (Riana) v4: - Remove unrelated changes from patch. (Anshuman) - Fix typo in commit msg. v5: - Update commit message and intel-xe-hwmon documentation with "Xe" instead of xe when using it as a name. (Rodrigo) Signed-off-by: Karthik Poosa <[email protected]> Reviewed-by: Badal Nilawar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent c54eb24 commit 345dadc

File tree

2 files changed

+197
-109
lines changed

2 files changed

+197
-109
lines changed

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

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,101 @@ Description: RW. Card reactive sustained (PL1) power limit in microwatts.
1010
power limit is disabled, writing 0 disables the
1111
limit. Writing values > 0 and <= TDP will enable the power limit.
1212

13-
Only supported for particular Intel xe graphics platforms.
13+
Only supported for particular Intel Xe graphics platforms.
1414

1515
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_rated_max
1616
Date: September 2023
1717
KernelVersion: 6.5
1818
1919
Description: RO. Card default power limit (default TDP setting).
2020

21-
Only supported for particular Intel xe graphics platforms.
21+
Only supported for particular Intel Xe graphics platforms.
2222

23-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_crit
23+
24+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/energy1_input
2425
Date: September 2023
2526
KernelVersion: 6.5
2627
27-
Description: RW. Card reactive critical (I1) power limit in microwatts.
28+
Description: RO. Card energy input of device in microjoules.
29+
30+
Only supported for particular Intel Xe graphics platforms.
31+
32+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_max_interval
33+
Date: October 2023
34+
KernelVersion: 6.6
35+
36+
Description: RW. Card sustained power limit interval (Tau in PL1/Tau) in
37+
milliseconds over which sustained power is averaged.
38+
39+
Only supported for particular Intel Xe graphics platforms.
40+
41+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_max
42+
Date: February 2024
43+
KernelVersion: 6.8
44+
45+
Description: RW. Package reactive sustained (PL1) power limit in microwatts.
46+
47+
The power controller will throttle the operating frequency
48+
if the power averaged over a window (typically seconds)
49+
exceeds this limit. A read value of 0 means that the PL1
50+
power limit is disabled, writing 0 disables the
51+
limit. Writing values > 0 and <= TDP will enable the power limit.
52+
53+
Only supported for particular Intel Xe graphics platforms.
54+
55+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_rated_max
56+
Date: February 2024
57+
KernelVersion: 6.8
58+
59+
Description: RO. Package default power limit (default TDP setting).
2860

29-
Card reactive critical (I1) power limit in microwatts is exposed
61+
Only supported for particular Intel Xe graphics platforms.
62+
63+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_crit
64+
Date: February 2024
65+
KernelVersion: 6.8
66+
67+
Description: RW. Package reactive critical (I1) power limit in microwatts.
68+
69+
Package reactive critical (I1) power limit in microwatts is exposed
3070
for client products. The power controller will throttle the
3171
operating frequency if the power averaged over a window exceeds
3272
this limit.
3373

34-
Only supported for particular Intel xe graphics platforms.
74+
Only supported for particular Intel Xe graphics platforms.
3575

36-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr1_crit
37-
Date: September 2023
38-
KernelVersion: 6.5
76+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr2_crit
77+
Date: February 2024
78+
KernelVersion: 6.8
3979
40-
Description: RW. Card reactive critical (I1) power limit in milliamperes.
80+
Description: RW. Package reactive critical (I1) power limit in milliamperes.
4181

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

47-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/in0_input
48-
Date: September 2023
49-
KernelVersion: 6.5
87+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/energy2_input
88+
Date: February 2024
89+
KernelVersion: 6.8
5090
51-
Description: RO. Current Voltage in millivolt.
91+
Description: RO. Package energy input of device in microjoules.
5292

53-
Only supported for particular Intel xe graphics platforms.
93+
Only supported for particular Intel Xe graphics platforms.
5494

55-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/energy1_input
56-
Date: September 2023
57-
KernelVersion: 6.5
95+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_max_interval
96+
Date: February 2024
97+
KernelVersion: 6.8
5898
59-
Description: RO. Energy input of device in microjoules.
99+
Description: RW. Package sustained power limit interval (Tau in PL1/Tau) in
100+
milliseconds over which sustained power is averaged.
60101

61-
Only supported for particular Intel xe graphics platforms.
102+
Only supported for particular Intel Xe graphics platforms.
62103

63-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_max_interval
64-
Date: October 2023
65-
KernelVersion: 6.6
104+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/in1_input
105+
Date: February 2024
106+
KernelVersion: 6.8
66107
67-
Description: RW. Sustained power limit interval (Tau in PL1/Tau) in
68-
milliseconds over which sustained power is averaged.
108+
Description: RO. Package current voltage in millivolt.
69109

70-
Only supported for particular Intel xe graphics platforms.
110+
Only supported for particular Intel Xe graphics platforms.

0 commit comments

Comments
 (0)