Browse Source

Revert "Do a complete cgminer restart if the ATI Display Library fails, as it does on windows after running for some time, when fanspeed reporting fails."

This reverts commit dc70fe9ce0daefb3192baa06e139b48fc352eeff.

Conflicts:

	adl.c
Luke Dashjr 13 years ago
parent
commit
e0ad72ec44
2 changed files with 0 additions and 36 deletions
  1. 0 35
      adl.c
  2. 0 1
      miner.h

+ 0 - 35
adl.c

@@ -694,29 +694,6 @@ static int __gpu_fanpercent(struct gpu_adl *ga)
 	return ga->lpFanSpeedValue.iFanSpeed;
 	return ga->lpFanSpeedValue.iFanSpeed;
 }
 }
 
 
-/* Failure log messages are handled by another (new) thread, since
- * gpu_fanpercent is called inside a curses UI update (which holds
- * the console lock, and would deadlock if we tried to log from
- * within) */
-static void *gpu_fanpercent_failure(void *userdata)
-{
-	int *data = userdata;
-	bool had_twin = data[0];
-	int gpu = data[1];
-
-	applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
-	if (opt_restart) {
-		applog(LOG_WARNING, "Restart enabled, will attempt to restart BFGMiner");
-		applog(LOG_WARNING, "You can disable this with the --no-restart option");
-		app_restart();
-	}
-	applog(LOG_WARNING, "Disabling fanspeed monitoring on this device");
-	if (had_twin) {
-		applog(LOG_WARNING, "Disabling fanspeed linking on GPU twins");
-	}
-	return NULL;
-}
-
 int gpu_fanpercent(int gpu)
 int gpu_fanpercent(int gpu)
 {
 {
 	struct gpu_adl *ga;
 	struct gpu_adl *ga;
@@ -729,18 +706,6 @@ int gpu_fanpercent(int gpu)
 	lock_adl();
 	lock_adl();
 	ret = __gpu_fanpercent(ga);
 	ret = __gpu_fanpercent(ga);
 	unlock_adl();
 	unlock_adl();
-	if (unlikely(ga->has_fanspeed && ret == -1)) {
-		pthread_t thr;
-		int *data = malloc(sizeof(int) * 2);
-		data[0] = ga->twin ? 1 : 0;
-		data[1] = gpu;
-		ga->has_fanspeed = false;
-		if (ga->twin) {
-			ga->twin->twin = NULL;;
-			ga->twin = NULL;
-		}
-		pthread_create(&thr, NULL, gpu_fanpercent_failure, data);
-	}
 	return ret;
 	return ret;
 }
 }
 
 

+ 0 - 1
miner.h

@@ -901,7 +901,6 @@ extern void tq_freeze(struct thread_q *tq);
 extern void tq_thaw(struct thread_q *tq);
 extern void tq_thaw(struct thread_q *tq);
 extern bool successful_connect;
 extern bool successful_connect;
 extern void adl(void);
 extern void adl(void);
-extern void app_restart(void);
 
 
 enum api_data_type {
 enum api_data_type {
 	API_ESCAPE,
 	API_ESCAPE,