Browse Source

Merge branch 'bugfix_thermal_spam' into bfgminer

Luke Dashjr 13 years ago
parent
commit
b0b3ea8baa
2 changed files with 11 additions and 6 deletions
  1. 6 3
      adl.c
  2. 5 3
      driver-bitforce.c

+ 6 - 3
adl.c

@@ -1154,13 +1154,16 @@ void gpu_autotune(int gpu, enum dev_enable *denable)
 
 	if (engine && ga->autoengine) {
 		if (temp > cgpu->cutofftemp) {
-			applog(LOG_WARNING, "Hit thermal cutoff limit on GPU %d, disabling!", gpu);
-			*denable = DEV_RECOVER;
+			if (*denable == DEV_ENABLED) {
+				applog(LOG_WARNING, "Hit thermal cutoff limit on GPU %d, disabling!", gpu);
+				*denable = DEV_RECOVER;
+				++cgpu->dev_thermal_cutoff_count;
+			}
+
 			newengine = ga->minspeed;
 
 			cgpu->device_last_not_well = time(NULL);
 			cgpu->device_not_well_reason = REASON_DEV_THERMAL_CUTOFF;
-			cgpu->dev_thermal_cutoff_count++;
 		} else if (temp > ga->overtemp && engine > ga->minspeed) {
 			applog(LOG_WARNING, "Overheat detected, decreasing GPU %d clock speed", gpu);
 			newengine = ga->minspeed;

+ 5 - 3
driver-bitforce.c

@@ -309,12 +309,14 @@ static bool bitforce_get_temp(struct cgpu_info *bitforce)
 		if (temp > 0) {
 			bitforce->temp = temp;
 			if (unlikely(bitforce->cutofftemp > 0 && temp > bitforce->cutofftemp)) {
-				applog(LOG_WARNING, "BFL%i: Hit thermal cutoff limit, disabling!", bitforce->device_id);
-				bitforce->deven = DEV_RECOVER;
+				if (bitforce->deven == DEV_ENABLED) {
+					applog(LOG_WARNING, "BFL%i: Hit thermal cutoff limit, disabling!", bitforce->device_id);
+					bitforce->deven = DEV_RECOVER;
+					++bitforce->dev_thermal_cutoff_count;
+				}
 
 				bitforce->device_last_not_well = time(NULL);
 				bitforce->device_not_well_reason = REASON_DEV_THERMAL_CUTOFF;
-				bitforce->dev_thermal_cutoff_count++;
 			}
 		}
 	} else {