Can't set power limit in amdgpu with linux 5.13.1
Brief summary of the problem:
Can't set power limit using power1_cap.
Hardware description:
- CPU: AMD Ryzen 5950X
- GPU: Amd Radeon 6900XT
- System Memory: 128GB
- Display(s): 2x 2560x1440 @ 120Hz
- Type of Diplay Connection: Both connected via DP
System information:
- Distro name and Version: Manjaro Stable
- Kernel version: 5.13.1
How to reproduce the issue:
Try to set a power limit in linux 5.13.1 and check to see if it was set:
echo 160000000 | sudo tee /sys/class/drm/card0/device/hwmon/hwmon8/power1_cap
160000000
cat /sys/class/drm/card0/device/hwmon/hwmon8/power1_cap
1404490560
The value stored by power1_cap seems to be corrupted somehow, and the card's power seems to continue to be limited by power1_cap_max. In linux 5.12.16 with the same system it continues to work as expected, with power1_cap accepting the new value and properly limiting power.