Commit c009c6cd740324eae9de7a075c7e26ab16158897

ckolivas 2012-01-25T16:16:28

Don't try to explicitly drift to exactly the target temperature, aim for just below it.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/adl.c b/adl.c
index 198e1ed..de5b0b3 100644
--- a/adl.c
+++ b/adl.c
@@ -872,7 +872,7 @@ static void fan_autotune(int gpu, int temp, int fanpercent, bool *fan_optimal)
 	} else {
 		/* We're in the optimal range, make minor adjustments if the
 		 * temp is still drifting */
-		if (fanpercent > bot && temp < ga->lasttemp && temp < ga->targettemp) {
+		if (fanpercent > bot && temp < ga->lasttemp && ga->lasttemp < ga->targettemp) {
 			if (opt_debug)
 				applog(LOG_DEBUG, "Temperature dropping while in target range, decreasing fanspeed");
 			newpercent = ga->targetfan - 1;