Browse Source

GPUs cannot be hotplugged

djm34
Jan Berdajs 10 years ago
parent
commit
7507790880
  1. 4
      driver-opencl.c
  2. 2
      miner.h
  3. 5
      sgminer.c

4
driver-opencl.c

@ -668,7 +668,7 @@ char *set_rawintensity(const char *_arg) @@ -668,7 +668,7 @@ char *set_rawintensity(const char *_arg)
void print_ndevs(int *ndevs)
{
opt_log_output = true;
opencl_drv.drv_detect(false);
opencl_drv.drv_detect();
clear_adl(*ndevs);
applog(LOG_INFO, "%i GPU devices max detected", *ndevs);
}
@ -1129,7 +1129,7 @@ out: @@ -1129,7 +1129,7 @@ out:
return NULL;
}
static void opencl_detect(bool hotplug)
static void opencl_detect(void)
{
int i;

2
miner.h

@ -382,7 +382,7 @@ struct device_drv { @@ -382,7 +382,7 @@ struct device_drv {
char *name;
// DRV-global functions
void (*drv_detect)(bool);
void (*drv_detect)(void);
// Device-specific functions
void (*reinit_device)(struct cgpu_info *);

5
sgminer.c

@ -7934,7 +7934,7 @@ static void noop_thread_enable(struct thr_info __maybe_unused *thr) @@ -7934,7 +7934,7 @@ static void noop_thread_enable(struct thr_info __maybe_unused *thr)
{
}
static void noop_detect(bool __maybe_unused hotplug)
static void noop_detect(void)
{
}
#define noop_flush_work noop_reinit_device
@ -8192,7 +8192,6 @@ static void *restart_mining_threads_thread(void *userdata) @@ -8192,7 +8192,6 @@ static void *restart_mining_threads_thread(void *userdata)
}
#define DRIVER_FILL_DEVICE_DRV(X) fill_device_drv(&X##_drv);
#define DRIVER_DRV_DETECT_ALL(X) X##_drv.drv_detect(false);
int main(int argc, char *argv[])
{
@ -8370,7 +8369,7 @@ int main(int argc, char *argv[]) @@ -8370,7 +8369,7 @@ int main(int argc, char *argv[])
DRIVER_PARSE_COMMANDS(DRIVER_FILL_DEVICE_DRV)
// this will set total_devices
opencl_drv.drv_detect(false);
opencl_drv.drv_detect();
if (opt_display_devs) {
applog(LOG_ERR, "Devices detected:");

Loading…
Cancel
Save