mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Try to set temperature regardless of whether get fanspeed fails. This may need to be reverted if it causes problems.
This commit is contained in:
parent
12e99c83dd
commit
5a24c2829a
3
adl.c
3
adl.c
@ -760,7 +760,6 @@ static int set_fanspeed(int gpu, int iFanSpeed)
|
|||||||
if (ADL_Overdrive5_FanSpeed_Get(ga->iAdapterIndex, 0, &ga->lpFanSpeedValue) != ADL_OK) {
|
if (ADL_Overdrive5_FanSpeed_Get(ga->iAdapterIndex, 0, &ga->lpFanSpeedValue) != ADL_OK) {
|
||||||
if (opt_debug)
|
if (opt_debug)
|
||||||
applog(LOG_DEBUG, "GPU %d call to fanspeed get failed", gpu);
|
applog(LOG_DEBUG, "GPU %d call to fanspeed get failed", gpu);
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
if (!(ga->lpFanSpeedInfo.iFlags & ADL_DL_FANCTRL_SUPPORTS_PERCENT_WRITE)) {
|
if (!(ga->lpFanSpeedInfo.iFlags & ADL_DL_FANCTRL_SUPPORTS_PERCENT_WRITE)) {
|
||||||
/* Must convert speed to an RPM */
|
/* Must convert speed to an RPM */
|
||||||
@ -776,8 +775,8 @@ static int set_fanspeed(int gpu, int iFanSpeed)
|
|||||||
ga->lpFanSpeedValue.iFanSpeed = iFanSpeed;
|
ga->lpFanSpeedValue.iFanSpeed = iFanSpeed;
|
||||||
ret = ADL_Overdrive5_FanSpeed_Set(ga->iAdapterIndex, 0, &ga->lpFanSpeedValue);
|
ret = ADL_Overdrive5_FanSpeed_Set(ga->iAdapterIndex, 0, &ga->lpFanSpeedValue);
|
||||||
ga->managed = true;
|
ga->managed = true;
|
||||||
out:
|
|
||||||
unlock_adl();
|
unlock_adl();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user