mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Re-initialising ADL simply made the driver fail since it is corruption over time within the windows driver that's responsible.
Revert "Attempt to re-initialise ADL should a device that previously reported fanspeed stops reporting it." This reverts commit d4c513030f6d6da4cb54c0d1499d332a3987c376.
This commit is contained in:
parent
0a39a22c2d
commit
1152b4b4e0
14
adl.c
14
adl.c
@ -639,8 +639,6 @@ static inline int __gpu_fanspeed(struct gpu_adl *ga)
|
|||||||
return ga->lpFanSpeedValue.iFanSpeed;
|
return ga->lpFanSpeedValue.iFanSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reinit_adl(void);
|
|
||||||
|
|
||||||
int gpu_fanspeed(int gpu)
|
int gpu_fanspeed(int gpu)
|
||||||
{
|
{
|
||||||
struct gpu_adl *ga;
|
struct gpu_adl *ga;
|
||||||
@ -669,8 +667,6 @@ static int __gpu_fanpercent(struct gpu_adl *ga)
|
|||||||
return ga->lpFanSpeedValue.iFanSpeed;
|
return ga->lpFanSpeedValue.iFanSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int gpu_fanpercent(int gpu)
|
int gpu_fanpercent(int gpu)
|
||||||
{
|
{
|
||||||
struct gpu_adl *ga;
|
struct gpu_adl *ga;
|
||||||
@ -683,11 +679,6 @@ int gpu_fanpercent(int gpu)
|
|||||||
lock_adl();
|
lock_adl();
|
||||||
ret = __gpu_fanpercent(ga);
|
ret = __gpu_fanpercent(ga);
|
||||||
unlock_adl();
|
unlock_adl();
|
||||||
if (unlikely(ga->has_fanspeed && ret == -1)) {
|
|
||||||
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed", gpu);
|
|
||||||
applog(LOG_WARNING, "Will attempt to re-initialise ADL");
|
|
||||||
reinit_adl();
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1368,7 +1359,7 @@ void clear_adl(int nDevs)
|
|||||||
free_adl();
|
free_adl();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reinit_adl(void)
|
void reinit_adl(void)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
lock_adl();
|
lock_adl();
|
||||||
@ -1377,8 +1368,7 @@ static void reinit_adl(void)
|
|||||||
if (!ret) {
|
if (!ret) {
|
||||||
adl_active = false;
|
adl_active = false;
|
||||||
applog(LOG_WARNING, "Attempt to re-initialise ADL has failed, disabling");
|
applog(LOG_WARNING, "Attempt to re-initialise ADL has failed, disabling");
|
||||||
} else
|
}
|
||||||
applog(LOG_WARNING, "ADL re-initialisation complete");
|
|
||||||
unlock_adl();
|
unlock_adl();
|
||||||
}
|
}
|
||||||
#endif /* HAVE_ADL */
|
#endif /* HAVE_ADL */
|
||||||
|
2
adl.h
2
adl.h
@ -19,10 +19,12 @@ bool gpu_stats(int gpu, float *temp, int *engineclock, int *memclock, float *vdd
|
|||||||
void change_gpusettings(int gpu);
|
void change_gpusettings(int gpu);
|
||||||
void gpu_autotune(int gpu, enum dev_enable *denable);
|
void gpu_autotune(int gpu, enum dev_enable *denable);
|
||||||
void clear_adl(int nDevs);
|
void clear_adl(int nDevs);
|
||||||
|
void reinit_adl(void);
|
||||||
#else /* HAVE_ADL */
|
#else /* HAVE_ADL */
|
||||||
#define adl_active (0)
|
#define adl_active (0)
|
||||||
static inline void init_adl(int nDevs) {}
|
static inline void init_adl(int nDevs) {}
|
||||||
static inline void change_gpusettings(int gpu) { }
|
static inline void change_gpusettings(int gpu) { }
|
||||||
static inline void clear_adl(int nDevs) {}
|
static inline void clear_adl(int nDevs) {}
|
||||||
|
static inline void reinit_adl(void) {}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user