1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-02 10:04:33 +00:00

Continue auto-management of fan and engine speeds even if a device is disabled for safety reasons.

This commit is contained in:
Con Kolivas 2012-02-05 17:28:53 +11:00
parent f8fed37e02
commit 23685aa41e
2 changed files with 4 additions and 3 deletions

5
adl.c
View File

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

View File

@ -3690,7 +3690,7 @@ static void *watchdog_thread(void *userdata)
gpu = thr->cgpu->device_id;
enable = &cgpu->enabled;
#ifdef HAVE_ADL
if (adl_active && gpus[gpu].has_adl && *enable)
if (adl_active && gpus[gpu].has_adl)
gpu_autotune(gpu, enable);
if (opt_debug && gpus[gpu].has_adl) {
int engineclock = 0, memclock = 0, activity = 0, fanspeed = 0, fanpercent = 0, powertune = 0;