Vicki Pfau
20227416e1
power: Make GPUPerformanceLevel::from_str implementation consistent with others
2024-05-13 18:55:38 -07:00
Vicki Pfau
e25b1a7ca7
steamosctl: Use GPUPerformanceLevel where applicable
2024-05-13 18:55:38 -07:00
Jeremy Whiting
f3e5c8b576
Use hwmon to determine which sysfs path to use for gpu/power bits.
...
Instead of always using /sys/class/drm/card0 based paths, use
/sys/class/hwmon looking for amdgpu name file to determine where
to look.
Fixes reading TDPLimit, GPUPerformanceLevel and ManualGPUClock
in cases where sysfs uses card1 or other paths.
NOTE: Using wrong cardX path is a bug and will be fixed, but
this makes steamos-manager a bit more resilient to those bugs.
2024-05-01 21:17:45 -06:00
Vicki Pfau
fc77feef2a
power: Return 0 if no GPU clock can be found
2024-05-01 19:13:03 -07:00
Vicki Pfau
a182d580fd
power: Idiom fix
2024-04-16 18:44:59 -07:00
Vicki Pfau
f004035f7f
power: Make sure to flush writes before dropping the files
2024-04-16 18:41:04 -07:00
Vicki Pfau
b962bbf548
Fix clippy warnings, and an actual bug with FanControl::try_from<u32>
2024-04-05 15:30:15 -07:00
Vicki Pfau
92817223d5
power: Fix get_tdp_limit not handling trailing newline
2024-04-05 15:01:31 -07:00
Vicki Pfau
cf962b26c5
Fix test build warnings
2024-04-04 18:38:39 -07:00
Vicki Pfau
cf4d7b9ba9
manager: Add manual_gpu_clock tests
2024-04-04 18:08:21 -07:00
Vicki Pfau
bc6af282eb
power: Add get/set_gpu_clocks and get_tdp_limit tests
2024-04-04 18:08:21 -07:00
Vicki Pfau
3c62c57d52
manager: Add get/set_gpu_performance_level tests
2024-04-04 18:08:21 -07:00
Vicki Pfau
9ddbc9997d
power: Add get/set_gpu_performance_level tests
2024-04-04 18:08:21 -07:00
Vicki Pfau
eabf6d5a98
power: Implement get_tdp_limit and TDPLimit
2024-04-04 18:08:21 -07:00
Vicki Pfau
d13010dcb0
power: Implement get_gpu_clocks and ManualGPUClock
2024-04-04 18:08:21 -07:00
Vicki Pfau
35e520712d
Realign enums that had UnsupportedFeature to start at 0
2024-04-04 18:08:21 -07:00
Vicki Pfau
452690adee
Kill UnsupportedFeature
2024-04-04 18:08:21 -07:00
Vicki Pfau
69e6477053
manager: Implement new API
2024-04-04 18:08:13 -07:00
Vicki Pfau
27493c647d
power: Redo hwmon handling
2024-04-02 18:20:09 -07:00
Vicki Pfau
6e3ac42e8e
power: Split out from manager
2024-04-02 18:20:09 -07:00