|
|
@@ -204,8 +204,6 @@ struct x6500_fpga_data {
|
|
|
// Time the clock was last reduced due to temperature
|
|
|
time_t last_cutoff_reduced;
|
|
|
|
|
|
- float temp;
|
|
|
-
|
|
|
uint32_t prepwork_last_register;
|
|
|
};
|
|
|
|
|
|
@@ -490,15 +488,16 @@ void x6500_get_temperature(struct cgpu_info *x6500)
|
|
|
if (!fpga) continue;
|
|
|
|
|
|
if (code[i] == 0xffff || !code[i]) {
|
|
|
- fpga->temp = 0;
|
|
|
+ x6500->temp = 0;
|
|
|
continue;
|
|
|
}
|
|
|
if ((code[i] >> 15) & 1)
|
|
|
code[i] -= 0x10000;
|
|
|
- fpga->temp = (float)(code[i] >> 2) * 0.03125f;
|
|
|
- applog(LOG_DEBUG,"x6500_get_temperature: fpga[%d]->temp=%.1fC",i,fpga->temp);
|
|
|
+ x6500->temp = (float)(code[i] >> 2) * 0.03125f;
|
|
|
+ applog(LOG_DEBUG,"x6500_get_temperature: fpga[%d]->temp=%.1fC",
|
|
|
+ i, x6500->temp);
|
|
|
|
|
|
- int temperature = round(fpga->temp);
|
|
|
+ int temperature = round(x6500->temp);
|
|
|
if (temperature > x6500->targettemp + opt_hysteresis) {
|
|
|
time_t now = time(NULL);
|
|
|
if (fpga->last_cutoff_reduced != now) {
|
|
|
@@ -508,7 +507,7 @@ void x6500_get_temperature(struct cgpu_info *x6500)
|
|
|
applog(LOG_NOTICE, "%"PRIprepr": Frequency dropped from %u to %u MHz (temp: %.1fC)",
|
|
|
x6500->proc_repr,
|
|
|
oldFreq * 2, fpga->dclk.freqM * 2,
|
|
|
- fpga->temp
|
|
|
+ x6500->temp
|
|
|
);
|
|
|
fpga->dclk.freqMaxM = fpga->dclk.freqM;
|
|
|
}
|
|
|
@@ -536,7 +535,6 @@ bool x6500_all_idle(struct cgpu_info *any_proc)
|
|
|
|
|
|
static bool x6500_get_stats(struct cgpu_info *x6500)
|
|
|
{
|
|
|
- float hottest = 0;
|
|
|
if (x6500_all_idle(x6500)) {
|
|
|
struct cgpu_info *cgpu = x6500->device;
|
|
|
// Getting temperature more efficiently while running
|
|
|
@@ -549,18 +547,6 @@ static bool x6500_get_stats(struct cgpu_info *x6500)
|
|
|
mutex_unlock(mutexp);
|
|
|
}
|
|
|
|
|
|
- for (int i = x6500->threads; i--; ) {
|
|
|
- struct thr_info *thr = x6500->thr[i];
|
|
|
- struct x6500_fpga_data *fpga = thr->cgpu_data;
|
|
|
- if (!fpga)
|
|
|
- continue;
|
|
|
- float temp = fpga->temp;
|
|
|
- if (temp > hottest)
|
|
|
- hottest = temp;
|
|
|
- }
|
|
|
-
|
|
|
- x6500->temp = hottest;
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -583,8 +569,6 @@ get_x6500_api_extra_device_status(struct cgpu_info *x6500)
|
|
|
struct x6500_fpga_data *fpga = thr->cgpu_data;
|
|
|
double d;
|
|
|
|
|
|
- if (fpga->temp)
|
|
|
- root = api_add_temp(root, "Temperature", &fpga->temp, true);
|
|
|
d = (double)fpga->dclk.freqM * 2;
|
|
|
root = api_add_freq(root, "Frequency", &d, true);
|
|
|
d = (double)fpga->dclk.freqMaxM * 2;
|