Browse Source

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

Con Kolivas 14 years ago
parent
commit
23685aa41e
2 changed files with 4 additions and 3 deletions
  1. 3 2
      adl.c
  2. 1 1
      cgminer.c

+ 3 - 2
adl.c

@@ -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;

+ 1 - 1
cgminer.c

@@ -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;