1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

Off by one error in performance level.

This commit is contained in:
Con Kolivas 2011-12-24 08:06:53 +11:00
parent f4d657ee7f
commit 400cb21d8b

4
adl.c
View File

@ -866,12 +866,12 @@ void gpu_autotune(int gpu, bool *enable)
applog(LOG_WARNING, "Overheat detected, decreasing GPU %d clock speed", gpu);
newengine = ga->minspeed;
/* Only try to tune engine speed if the current performance level is at max */
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels) &&
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels - 1) &&
(temp > ga->targettemp + opt_hysteresis && engine > ga->minspeed && fan_optimal)) {
if (opt_debug)
applog(LOG_DEBUG, "Temperature %d degrees over target, decreasing clock speed", opt_hysteresis);
newengine = engine - ga->lpOdParameters.sEngineClock.iStep;
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels) &&
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels - 1) &&
(temp < ga->targettemp && engine < ga->maxspeed)) {
if (opt_debug)
applog(LOG_DEBUG, "Temperature below target, increasing clock speed");