Skip to content

Commit

Permalink
Do a complete cgminer restart if the ATI Display Library fails, as it…
Browse files Browse the repository at this point in the history
… does on windows after running for some time, when fanspeed reporting fails.
  • Loading branch information
ckolivas committed Apr 14, 2012
1 parent 7c6090f commit dc70fe9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions adl.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,16 @@ int gpu_fanpercent(int gpu)
lock_adl();
ret = __gpu_fanpercent(ga);
unlock_adl();
if (unlikely(ga->has_fanspeed && ret == -1)) {
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
if (opt_restart) {
applog(LOG_WARNING, "Restart enabled, will restart cgminer");
applog(LOG_WARNING, "You can disable this with the --no-restart option");
app_restart();
}
applog(LOG_WARNING, "Disabling fanspeed monitoring on this device");
ga->has_fanspeed = false;
}
return ret;
}

Expand Down
1 change: 1 addition & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,5 +657,6 @@ extern void tq_freeze(struct thread_q *tq);
extern void tq_thaw(struct thread_q *tq);
extern bool successful_connect;
extern void adl(void);
extern void app_restart(void);

#endif /* __MINER_H__ */

0 comments on commit dc70fe9

Please sign in to comment.