Commit f8fed37e02d7d455c40e11fc73506ff6f5fdb24f

Con Kolivas 2012-02-05T17:24:26

No need to check we're highest performance level when throttling GPU engine speed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/adl.c b/adl.c
index 4d0e65e..e2434e2 100644
--- a/adl.c
+++ b/adl.c
@@ -1062,12 +1062,11 @@ void gpu_autotune(int gpu, bool *enable)
 		} else if (temp > ga->overtemp && engine > ga->minspeed) {
 			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 - 1) &&
-			   (temp > ga->targettemp + opt_hysteresis && engine > ga->minspeed && fan_optimal)) {
+		} else if (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;
+			/* Only try to tune engine speed if the current performance level is at max */
 		} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels - 1) &&
 			   (temp < ga->targettemp && engine < ga->maxspeed)) {
 			if (opt_debug)