Getting fan PWM for vega10 not based on fan RPM
Currently, for vega10 (vega56), we generate PWM for lmsensors based on RPMs of the fan what not right, and makes programs madness that tries to control fan speed.
- It's break read/write consistency for PWM.
- PWM number not immediately ready to read (actual number not stable and can be changed).
- Not possible to fan control with some precision.
Current function:
int vega10_fan_ctrl_get_fan_speed_pwm(struct pp_hwmgr *hwmgr,
uint32_t *speed)
{
uint32_t current_rpm;
uint32_t percent = 0;
if (hwmgr->thermal_controller.fanInfo.bNoFan)
return 0;
if (vega10_get_current_rpm(hwmgr, ¤t_rpm))
return -1;
if (hwmgr->thermal_controller.
advanceFanControlParameters.usMaxFanRPM != 0)
percent = current_rpm * 255 /
hwmgr->thermal_controller.
advanceFanControlParameters.usMaxFanRPM;
*speed = MIN(percent, 255);
return 0;
}
Do we have any chance to read PWM directly?
Related issue https://github.com/markusressel/fan2go/issues/148
Edited by Yury Zhuravlev