Browse Source

Only increase gpu engine speed by a larger step if the temperature is below hysteresis instead of increasing it to max speed.

Con Kolivas 13 years ago
parent
commit
b6066217e0
1 changed files with 4 additions and 3 deletions
  1. 4 3
      adl.c

+ 4 - 3
adl.c

@@ -1192,11 +1192,12 @@ void gpu_autotune(int gpu, enum dev_enable *denable)
 			newengine = engine - ga->lpOdParameters.sEngineClock.iStep;
 			newengine = engine - ga->lpOdParameters.sEngineClock.iStep;
 			/* Only try to tune engine speed up if this GPU is not disabled */
 			/* Only try to tune engine speed up if this GPU is not disabled */
 		} else if (temp < ga->targettemp && engine < ga->maxspeed && fan_window && *denable == DEV_ENABLED) {
 		} else if (temp < ga->targettemp && engine < ga->maxspeed && fan_window && *denable == DEV_ENABLED) {
+			int iStep = ga->lpOdParameters.sEngineClock.iStep;
+
 			applog(LOG_DEBUG, "Temperature below target, increasing clock speed");
 			applog(LOG_DEBUG, "Temperature below target, increasing clock speed");
 			if (temp < ga->targettemp - opt_hysteresis)
 			if (temp < ga->targettemp - opt_hysteresis)
-				newengine = ga->maxspeed;
-			else
-				newengine = engine + ga->lpOdParameters.sEngineClock.iStep;
+				iStep *= 2;
+			newengine = engine + iStep;
 		} else if (temp < ga->targettemp && *denable == DEV_RECOVER && opt_restart) {
 		} else if (temp < ga->targettemp && *denable == DEV_RECOVER && opt_restart) {
 			applog(LOG_NOTICE, "Device recovered to temperature below target, re-enabling");
 			applog(LOG_NOTICE, "Device recovered to temperature below target, re-enabling");
 			*denable = DEV_ENABLED;
 			*denable = DEV_ENABLED;