mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Revert "Adjust engine speed up according to performance level engine setting, not the current engine speed."
This reverts commit 68217ef6ee
.
This did not have the desired effect and only added complexity.
This commit is contained in:
parent
c42709745a
commit
66ea9304af
17
adl.c
17
adl.c
@ -1009,8 +1009,7 @@ static void fan_autotune(int gpu, int temp, int fanpercent, bool __maybe_unused
|
|||||||
|
|
||||||
void gpu_autotune(int gpu, bool *enable)
|
void gpu_autotune(int gpu, bool *enable)
|
||||||
{
|
{
|
||||||
int lev, temp, fanpercent, engine, levengine, newengine, twintemp = 0;
|
int temp, fanpercent, engine, newengine, twintemp = 0;
|
||||||
ADLODPerformanceLevels *lpOdPerformanceLevels;
|
|
||||||
bool fan_optimal = true;
|
bool fan_optimal = true;
|
||||||
struct cgpu_info *cgpu;
|
struct cgpu_info *cgpu;
|
||||||
struct gpu_adl *ga;
|
struct gpu_adl *ga;
|
||||||
@ -1018,12 +1017,7 @@ void gpu_autotune(int gpu, bool *enable)
|
|||||||
cgpu = &gpus[gpu];
|
cgpu = &gpus[gpu];
|
||||||
ga = &cgpu->adl;
|
ga = &cgpu->adl;
|
||||||
|
|
||||||
lev = ga->lpOdParameters.iNumberOfPerformanceLevels - 1;
|
|
||||||
lpOdPerformanceLevels = alloca(sizeof(ADLODPerformanceLevels) + (lev * sizeof(ADLODPerformanceLevel)));
|
|
||||||
lpOdPerformanceLevels->iSize = sizeof(ADLODPerformanceLevels) + sizeof(ADLODPerformanceLevel) * lev;
|
|
||||||
|
|
||||||
lock_adl();
|
lock_adl();
|
||||||
ADL_Overdrive5_ODPerformanceLevels_Get(ga->iAdapterIndex, 0, lpOdPerformanceLevels);
|
|
||||||
ADL_Overdrive5_CurrentActivity_Get(ga->iAdapterIndex, &ga->lpActivity);
|
ADL_Overdrive5_CurrentActivity_Get(ga->iAdapterIndex, &ga->lpActivity);
|
||||||
temp = __gpu_temp(ga);
|
temp = __gpu_temp(ga);
|
||||||
if (ga->twin)
|
if (ga->twin)
|
||||||
@ -1032,7 +1026,6 @@ void gpu_autotune(int gpu, bool *enable)
|
|||||||
unlock_adl();
|
unlock_adl();
|
||||||
|
|
||||||
newengine = engine = gpu_engineclock(gpu) * 100;
|
newengine = engine = gpu_engineclock(gpu) * 100;
|
||||||
levengine = lpOdPerformanceLevels->aLevels[lev].iEngineClock * 100;
|
|
||||||
|
|
||||||
if (temp && fanpercent >= 0 && ga->autofan) {
|
if (temp && fanpercent >= 0 && ga->autofan) {
|
||||||
if (!ga->twin)
|
if (!ga->twin)
|
||||||
@ -1065,12 +1058,10 @@ void gpu_autotune(int gpu, bool *enable)
|
|||||||
} else if (temp > ga->targettemp + opt_hysteresis && engine > ga->minspeed && fan_optimal) {
|
} else if (temp > ga->targettemp + opt_hysteresis && engine > ga->minspeed && fan_optimal) {
|
||||||
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;
|
||||||
/* Only try to tune engine speed up if this GPU is not
|
/* Only try to tune engine speed up if this GPU is not disabled */
|
||||||
* disabled, and work off the performance level engine
|
} else if (temp < ga->targettemp && engine < ga->maxspeed && *enable) {
|
||||||
* speed, not the current engine speed. */
|
|
||||||
} else if (temp < ga->targettemp && levengine < ga->maxspeed && *enable) {
|
|
||||||
applog(LOG_DEBUG, "Temperature below target, increasing clock speed");
|
applog(LOG_DEBUG, "Temperature below target, increasing clock speed");
|
||||||
newengine = levengine + ga->lpOdParameters.sEngineClock.iStep;
|
newengine = engine + ga->lpOdParameters.sEngineClock.iStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newengine > ga->maxspeed)
|
if (newengine > ga->maxspeed)
|
||||||
|
Loading…
Reference in New Issue
Block a user