|
|
@ -866,12 +866,12 @@ void gpu_autotune(int gpu, bool *enable) |
|
|
|
applog(LOG_WARNING, "Overheat detected, decreasing GPU %d clock speed", gpu); |
|
|
|
applog(LOG_WARNING, "Overheat detected, decreasing GPU %d clock speed", gpu); |
|
|
|
newengine = ga->minspeed; |
|
|
|
newengine = ga->minspeed; |
|
|
|
/* Only try to tune engine speed if the current performance level is at max */ |
|
|
|
/* Only try to tune engine speed if the current performance level is at max */ |
|
|
|
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels) && |
|
|
|
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels - 1) && |
|
|
|
(temp > ga->targettemp + opt_hysteresis && engine > ga->minspeed && fan_optimal)) { |
|
|
|
(temp > ga->targettemp + opt_hysteresis && engine > ga->minspeed && fan_optimal)) { |
|
|
|
if (opt_debug) |
|
|
|
if (opt_debug) |
|
|
|
applog(LOG_DEBUG, "Temperature %d degrees over target, decreasing clock speed", opt_hysteresis); |
|
|
|
applog(LOG_DEBUG, "Temperature %d degrees over target, decreasing clock speed", opt_hysteresis); |
|
|
|
newengine = engine - ga->lpOdParameters.sEngineClock.iStep; |
|
|
|
newengine = engine - ga->lpOdParameters.sEngineClock.iStep; |
|
|
|
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels) && |
|
|
|
} else if ((ga->lpActivity.iCurrentPerformanceLevel == ga->lpOdParameters.iNumberOfPerformanceLevels - 1) && |
|
|
|
(temp < ga->targettemp && engine < ga->maxspeed)) { |
|
|
|
(temp < ga->targettemp && engine < ga->maxspeed)) { |
|
|
|
if (opt_debug) |
|
|
|
if (opt_debug) |
|
|
|
applog(LOG_DEBUG, "Temperature below target, increasing clock speed"); |
|
|
|
applog(LOG_DEBUG, "Temperature below target, increasing clock speed"); |
|
|
|