Commit 4995b7c241fae47bd50944625b92eed2643831e3

ckolivas 2012-01-25T16:34:39

On dual GPUs, only autotune the shared fan once per gpu autotune cycle.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/adl.c b/adl.c
index de5b0b3..323f1e8 100644
--- a/adl.c
+++ b/adl.c
@@ -917,7 +917,9 @@ void gpu_autotune(int gpu, bool *enable)
 	if (temp && fanpercent >= 0 && ga->autofan) {
 		if (!ga->twin)
 			fan_autotune(gpu, temp, fanpercent, &fan_optimal);
-		else {
+		else if (ga->autofan && (ga->has_fanspeed || !ga->twin->autofan)) {
+			/* On linked GPUs, we autotune the fan only once, based
+			 * on the highest temperature from either GPUs */
 			int hightemp, fan_gpu;
 
 			if (twintemp > temp)