Remove more unused GPU code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
diff --git a/cgminer.c b/cgminer.c
index b28c9ba..aa11fe6 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1096,14 +1096,6 @@ static struct opt_table opt_config_table[] = {
OPT_WITH_ARG("--api-port",
set_int_1_to_65535, opt_show_intval, &opt_api_port,
"Port number of miner API"),
-#ifdef HAVE_ADL
- OPT_WITHOUT_ARG("--auto-fan",
- opt_set_bool, &opt_autofan,
- "Automatically adjust all GPU fan speeds to maintain a target temperature"),
- OPT_WITHOUT_ARG("--auto-gpu",
- opt_set_bool, &opt_autoengine,
- "Automatically adjust all GPU engine clock speeds to maintain a target temperature"),
-#endif
OPT_WITHOUT_ARG("--balance",
set_balance, &pool_strategy,
"Change multipool strategy from failover to even share balance"),
@@ -1229,14 +1221,6 @@ static struct opt_table opt_config_table[] = {
OPT_WITHOUT_ARG("--net-delay",
opt_set_bool, &opt_delaynet,
"Impose small delays in networking to not overload slow routers"),
- OPT_WITHOUT_ARG("--no-adl",
- opt_set_bool, &opt_noadl,
-#ifdef HAVE_ADL
- "Disable the ATI display library used for monitoring and setting GPU parameters"
-#else
- opt_hidden
-#endif
- ),
OPT_WITHOUT_ARG("--no-pool-disable",
opt_set_invbool, &opt_disable_pool,
opt_hidden),
@@ -1307,22 +1291,11 @@ static struct opt_table opt_config_table[] = {
opt_set_bool, &use_syslog,
"Use system log for output messages (default: standard error)"),
#endif
-#if defined(HAVE_ADL) || defined(USE_BITFORCE) || defined(USE_MODMINER) || defined(USE_BFLSC)
+#if defined(USE_BITFORCE) || defined(USE_MODMINER) || defined(USE_BFLSC)
OPT_WITH_ARG("--temp-cutoff",
set_temp_cutoff, opt_show_intval, &opt_cutofftemp,
"Temperature where a device will be automatically disabled, one value or comma separated list"),
#endif
-#ifdef HAVE_ADL
- OPT_WITH_ARG("--temp-hysteresis",
- set_int_1_to_10, opt_show_intval, &opt_hysteresis,
- "Set how much the temperature can fluctuate outside limits when automanaging speeds"),
- OPT_WITH_ARG("--temp-overheat",
- set_temp_overheat, opt_show_intval, &opt_overheattemp,
- "Overheat temperature when automatically managing fan and GPU speeds, one value or comma separated list"),
- OPT_WITH_ARG("--temp-target",
- set_temp_target, opt_show_intval, &opt_targettemp,
- "Target temperature when automatically managing fan and GPU speeds, one value or comma separated list"),
-#endif
OPT_WITHOUT_ARG("--text-only|-T",
opt_set_invbool, &use_curses,
#ifdef HAVE_CURSES
@@ -1331,11 +1304,6 @@ static struct opt_table opt_config_table[] = {
opt_hidden
#endif
),
-#ifdef USE_SCRYPT
- OPT_WITH_ARG("--thread-concurrency",
- set_thread_concurrency, NULL, NULL,
- "Set GPU thread concurrency for scrypt mining, comma separated"),
-#endif
OPT_WITH_ARG("--url|-o",
set_url, NULL, NULL,
"URL for bitcoin JSON-RPC server"),
@@ -7053,19 +7021,6 @@ static void *watchdog_thread(void __maybe_unused *userdata)
denable = &cgpu->deven;
snprintf(dev_str, sizeof(dev_str), "%s%d", cgpu->drv->name, gpu);
-#ifdef HAVE_ADL
- if (adl_active && cgpu->has_adl)
- gpu_autotune(gpu, denable);
- if (opt_debug && cgpu->has_adl) {
- int engineclock = 0, memclock = 0, activity = 0, fanspeed = 0, fanpercent = 0, powertune = 0;
- float temp = 0, vddc = 0;
-
- if (gpu_stats(gpu, &temp, &engineclock, &memclock, &vddc, &activity, &fanspeed, &fanpercent, &powertune))
- applog(LOG_DEBUG, "%.1f C F: %d%%(%dRPM) E: %dMHz M: %dMhz V: %.3fV A: %d%% P: %d%%",
- temp, fanpercent, fanspeed, engineclock, memclock, vddc, activity, powertune);
- }
-#endif
-
/* Thread is waiting on getwork or disabled */
if (thr->getwork || *denable == DEV_DISABLED)
continue;
@@ -7082,12 +7037,6 @@ static void *watchdog_thread(void __maybe_unused *userdata)
cgtime(&thr->sick);
dev_error(cgpu, REASON_DEV_SICK_IDLE_60);
-#ifdef HAVE_ADL
- if (adl_active && cgpu->has_adl && gpu_activity(gpu) > 50) {
- applog(LOG_ERR, "GPU still showing activity suggesting a hard hang.");
- applog(LOG_ERR, "Will not attempt to auto-restart it.");
- } else
-#endif
if (opt_restart) {
applog(LOG_ERR, "%s: Attempting to restart", dev_str);
reinit_device(cgpu);
@@ -7102,11 +7051,6 @@ static void *watchdog_thread(void __maybe_unused *userdata)
(cgpu->status == LIFE_SICK || cgpu->status == LIFE_DEAD)) {
/* Attempt to restart a GPU that's sick or dead once every minute */
cgtime(&thr->sick);
-#ifdef HAVE_ADL
- if (adl_active && cgpu->has_adl && gpu_activity(gpu) > 50) {
- /* Again do not attempt to restart a device that may have hard hung */
- } else
-#endif
if (opt_restart)
reinit_device(cgpu);
}
diff --git a/configure.ac b/configure.ac
index 5e4e657..6dc182b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,13 +392,6 @@ fi
AC_DEFINE_UNQUOTED([CGMINER_PREFIX], ["$prefix/bin"], [Path to cgminer install])
-AC_DEFINE_UNQUOTED([PHATK_KERNNAME], ["phatk121016"], [Filename for phatk kernel])
-AC_DEFINE_UNQUOTED([POCLBM_KERNNAME], ["poclbm130302"], [Filename for poclbm kernel])
-AC_DEFINE_UNQUOTED([DIAKGCN_KERNNAME], ["diakgcn121016"], [Filename for diakgcn kernel])
-AC_DEFINE_UNQUOTED([DIABLO_KERNNAME], ["diablo130302"], [Filename for diablo kernel])
-AC_DEFINE_UNQUOTED([SCRYPT_KERNNAME], ["scrypt130511"], [Filename for scrypt kernel])
-
-
AC_SUBST(JANSSON_LIBS)
AC_SUBST(PTHREAD_FLAGS)
AC_SUBST(DLOPEN_FLAGS)
@@ -409,7 +402,6 @@ AC_SUBST(WS2_LIBS)
AC_SUBST(MM_LIBS)
AC_SUBST(MATH_LIBS)
AC_SUBST(RT_LIBS)
-AC_SUBST(ADL_CPPFLAGS)
AC_CONFIG_FILES([
Makefile
diff --git a/miner.h b/miner.h
index b2c1718..b8aed7d 100644
--- a/miner.h
+++ b/miner.h
@@ -115,10 +115,6 @@ static inline int fsync (int fd)
#endif
-#ifdef HAVE_ADL
- #include "ADL_SDK/adl_sdk.h"
-#endif
-
#ifdef USE_USBUTILS
#include <libusb.h>
#endif
@@ -285,44 +281,6 @@ struct strategies {
struct cgpu_info;
-#ifdef HAVE_ADL
-struct gpu_adl {
- ADLTemperature lpTemperature;
- int iAdapterIndex;
- int lpAdapterID;
- int iBusNumber;
- char strAdapterName[256];
-
- ADLPMActivity lpActivity;
- ADLODParameters lpOdParameters;
- ADLODPerformanceLevels *DefPerfLev;
- ADLFanSpeedInfo lpFanSpeedInfo;
- ADLFanSpeedValue lpFanSpeedValue;
- ADLFanSpeedValue DefFanSpeedValue;
-
- int iEngineClock;
- int iMemoryClock;
- int iVddc;
- int iPercentage;
-
- bool autofan;
- bool autoengine;
- bool managed; /* Were the values ever changed on this card */
-
- int lastengine;
- int lasttemp;
- int targetfan;
- int targettemp;
- int overtemp;
- int minspeed;
- int maxspeed;
-
- int gpu;
- bool has_fanspeed;
- struct gpu_adl *twin;
-};
-#endif
-
extern void blank_get_statline_before(char *buf, size_t bufsiz, struct cgpu_info __maybe_unused *cgpu);
struct api_data;
@@ -390,15 +348,6 @@ enum dev_enable {
DEV_RECOVER,
};
-enum cl_kernels {
- KL_NONE,
- KL_POCLBM,
- KL_PHATK,
- KL_DIAKGCN,
- KL_DIABLO,
- KL_SCRYPT,
-};
-
enum dev_reason {
REASON_THREAD_FAIL_INIT,
REASON_THREAD_ZERO_HASH,
@@ -995,7 +944,6 @@ extern bool opt_api_listen;
extern bool opt_api_network;
extern bool opt_delaynet;
extern bool opt_restart;
-extern bool opt_nogpu;
extern char *opt_icarus_options;
extern char *opt_icarus_timing;
extern bool opt_worktime;
@@ -1067,14 +1015,6 @@ extern void kill_work(void);
extern void reinit_device(struct cgpu_info *cgpu);
-#ifdef HAVE_ADL
-extern bool gpu_stats(int gpu, float *temp, int *engineclock, int *memclock, float *vddc, int *activity, int *fanspeed, int *fanpercent, int *powertune);
-extern int set_fanspeed(int gpu, int iFanSpeed);
-extern int set_vddc(int gpu, float fVddc);
-extern int set_engineclock(int gpu, int iEngineClock);
-extern int set_memoryclock(int gpu, int iMemoryClock);
-#endif
-
extern void api(int thr_id);
extern struct pool *current_pool(void);
@@ -1086,31 +1026,8 @@ extern void adjust_quota_gcd(void);
extern struct pool *add_pool(void);
extern bool add_pool_details(struct pool *pool, bool live, char *url, char *user, char *pass);
-#define MAX_GPUDEVICES 16
#define MAX_DEVICES 4096
-#define MIN_SHA_INTENSITY -10
-#define MIN_SHA_INTENSITY_STR "-10"
-#define MAX_SHA_INTENSITY 14
-#define MAX_SHA_INTENSITY_STR "14"
-#define MIN_SCRYPT_INTENSITY 8
-#define MIN_SCRYPT_INTENSITY_STR "8"
-#define MAX_SCRYPT_INTENSITY 20
-#define MAX_SCRYPT_INTENSITY_STR "20"
-#ifdef USE_SCRYPT
-#define MIN_INTENSITY (opt_scrypt ? MIN_SCRYPT_INTENSITY : MIN_SHA_INTENSITY)
-#define MIN_INTENSITY_STR (opt_scrypt ? MIN_SCRYPT_INTENSITY_STR : MIN_SHA_INTENSITY_STR)
-#define MAX_INTENSITY (opt_scrypt ? MAX_SCRYPT_INTENSITY : MAX_SHA_INTENSITY)
-#define MAX_INTENSITY_STR (opt_scrypt ? MAX_SCRYPT_INTENSITY_STR : MAX_SHA_INTENSITY_STR)
-#define MAX_GPU_INTENSITY MAX_SCRYPT_INTENSITY
-#else
-#define MIN_INTENSITY MIN_SHA_INTENSITY
-#define MIN_INTENSITY_STR MIN_SHA_INTENSITY_STR
-#define MAX_INTENSITY MAX_SHA_INTENSITY
-#define MAX_INTENSITY_STR MAX_SHA_INTENSITY_STR
-#define MAX_GPU_INTENSITY MAX_SHA_INTENSITY
-#endif
-
extern bool hotplug_mode;
extern int hotplug_time;
extern struct list_head scan_devices;
@@ -1121,13 +1038,6 @@ extern bool use_syslog;
extern bool opt_quiet;
extern struct thr_info *control_thr;
extern struct thr_info **mining_thr;
-extern struct cgpu_info gpus[MAX_GPUDEVICES];
-extern int gpu_threads;
-#ifdef USE_SCRYPT
-extern bool opt_scrypt;
-#else
-#define opt_scrypt (0)
-#endif
extern double total_secs;
extern int mining_threads;
extern int total_devices;
@@ -1325,9 +1235,7 @@ struct work {
unsigned char target[32];
unsigned char hash[32];
-#ifdef USE_SCRYPT
unsigned char device_target[32];
-#endif
double device_diff;
uint64_t share_diff;