Browse Source

fix bug where device is not restarted after overheating and cooling off

djm34
Jan Berdajs 10 years ago
parent
commit
3cbfe2547f
  1. 3
      adl.c

3
adl.c

@ -1310,6 +1310,7 @@ void gpu_autotune(int gpu, enum dev_enable *denable)
bool fan_optimal = true, fan_window = true; bool fan_optimal = true, fan_window = true;
struct cgpu_info *cgpu; struct cgpu_info *cgpu;
struct gpu_adl *ga; struct gpu_adl *ga;
unsigned int i;
cgpu = &gpus[gpu]; cgpu = &gpus[gpu];
ga = &cgpu->adl; ga = &cgpu->adl;
@ -1373,6 +1374,8 @@ void gpu_autotune(int gpu, enum dev_enable *denable)
} 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;
for (i = 0; i < cgpu->threads; i++)
cgsem_post(&cgpu->thr[i]->sem);
} }
if (newengine > ga->maxspeed) if (newengine > ga->maxspeed)

Loading…
Cancel
Save