|
@@ -853,6 +853,18 @@ void opencl_wlogprint_status(struct cgpu_info *cgpu)
|
|
|
float temp = 0, vddc = 0;
|
|
float temp = 0, vddc = 0;
|
|
|
|
|
|
|
|
if (gpu_stats(cgpu->device_id, &temp, &engineclock, &memclock, &vddc, &activity, &fanspeed, &fanpercent, &powertune)) {
|
|
if (gpu_stats(cgpu->device_id, &temp, &engineclock, &memclock, &vddc, &activity, &fanspeed, &fanpercent, &powertune)) {
|
|
|
|
|
+ if (fanspeed != -1 || fanpercent != -1) {
|
|
|
|
|
+ tailsprintf(logline, "F: ");
|
|
|
|
|
+ if (fanpercent != -1)
|
|
|
|
|
+ {
|
|
|
|
|
+ tailsprintf(logline, "%d%% ", fanpercent);
|
|
|
|
|
+ if (fanspeed != -1)
|
|
|
|
|
+ tailsprintf(logline, "(%d RPM) ", fanspeed);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ tailsprintf(logline, "%d RPM ", fanspeed);
|
|
|
|
|
+ tailsprintf(logline, " ");
|
|
|
|
|
+ }
|
|
|
if (engineclock != -1)
|
|
if (engineclock != -1)
|
|
|
tailsprintf(logline, "E: %d MHz ", engineclock);
|
|
tailsprintf(logline, "E: %d MHz ", engineclock);
|
|
|
if (memclock != -1)
|
|
if (memclock != -1)
|
|
@@ -1412,7 +1424,9 @@ static void reinit_opencl_device(struct cgpu_info *gpu)
|
|
|
tq_push(control_thr[gpur_thr_id].q, gpu);
|
|
tq_push(control_thr[gpur_thr_id].q, gpu);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void get_opencl_statline_before(char *buf, struct cgpu_info *gpu)
|
|
|
|
|
|
|
+// FIXME: Legacy (called by TUI) for side effects
|
|
|
|
|
+static
|
|
|
|
|
+bool override_opencl_statline_temp(char *buf, struct cgpu_info *gpu, __maybe_unused bool per_processor)
|
|
|
{
|
|
{
|
|
|
#ifdef HAVE_SENSORS
|
|
#ifdef HAVE_SENSORS
|
|
|
struct opencl_device_data *data = gpu->device_data;
|
|
struct opencl_device_data *data = gpu->device_data;
|
|
@@ -1433,33 +1447,18 @@ static void get_opencl_statline_before(char *buf, struct cgpu_info *gpu)
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
gpu->temp = val;
|
|
gpu->temp = val;
|
|
|
- tailsprintf(buf, "%5.1fC | ", val);
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
#ifdef HAVE_ADL
|
|
#ifdef HAVE_ADL
|
|
|
if (gpu->has_adl) {
|
|
if (gpu->has_adl) {
|
|
|
int gpuid = gpu->device_id;
|
|
int gpuid = gpu->device_id;
|
|
|
- float gt = gpu_temp(gpuid);
|
|
|
|
|
- int gf = gpu_fanspeed(gpuid);
|
|
|
|
|
- int gp;
|
|
|
|
|
-
|
|
|
|
|
- if (gt != -1)
|
|
|
|
|
- tailsprintf(buf, "%5.1fC ", gt);
|
|
|
|
|
- else
|
|
|
|
|
- tailsprintf(buf, " ");
|
|
|
|
|
- if (gf != -1)
|
|
|
|
|
- tailsprintf(buf, "%4dRPM ", gf);
|
|
|
|
|
- else if ((gp = gpu_fanpercent(gpuid)) != -1)
|
|
|
|
|
- tailsprintf(buf, "%3d%% ", gp);
|
|
|
|
|
- else
|
|
|
|
|
- tailsprintf(buf, " ");
|
|
|
|
|
- tailsprintf(buf, "| ");
|
|
|
|
|
|
|
+ gpu_temp(gpuid);
|
|
|
|
|
+ gpu_fanspeed(gpuid);
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
#endif
|
|
#endif
|
|
|
- tailsprintf(buf, " | ");
|
|
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static struct api_data*
|
|
static struct api_data*
|
|
@@ -1762,7 +1761,7 @@ struct device_drv opencl_api = {
|
|
|
.name = "OCL",
|
|
.name = "OCL",
|
|
|
.drv_detect = opencl_detect,
|
|
.drv_detect = opencl_detect,
|
|
|
.reinit_device = reinit_opencl_device,
|
|
.reinit_device = reinit_opencl_device,
|
|
|
- .get_statline_before = get_opencl_statline_before,
|
|
|
|
|
|
|
+ .override_statline_temp = override_opencl_statline_temp,
|
|
|
#ifdef HAVE_CURSES
|
|
#ifdef HAVE_CURSES
|
|
|
.proc_wlogprint_status = opencl_wlogprint_status,
|
|
.proc_wlogprint_status = opencl_wlogprint_status,
|
|
|
.proc_tui_wlogprint_choices = opencl_tui_wlogprint_choices,
|
|
.proc_tui_wlogprint_choices = opencl_tui_wlogprint_choices,
|