Commit 1e3888336be2326d0a7adb8c78e52a79ea69c979

Con Kolivas 2012-06-14T11:24:32

Consider the fan optimal if fanspeed is dropping but within the optimal speed window.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/adl.c b/adl.c
index a920d95..473cba0 100644
--- a/adl.c
+++ b/adl.c
@@ -1065,6 +1065,11 @@ static bool fan_autotune(int gpu, int temp, int fanpercent, int lasttemp, bool *
 	if (newpercent != fanpercent) {
 		applog(LOG_INFO, "Setting GPU %d fan percentage to %d", gpu, newpercent);
 		set_fanspeed(gpu, newpercent);
+		/* If the fanspeed is going down and we're below the top speed,
+		 * consider the fan optimal to prevent minute changes in
+		 * fanspeed delaying GPU engine speed changes */
+		if (newpercent < fanpercent && *fan_window)
+			return true;
 		return false;
 	}
 	return true;