|
|
@ -82,6 +82,10 @@ static ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy; |
|
|
|
static ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get; |
|
|
|
static ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get; |
|
|
|
static ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get; |
|
|
|
static ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get; |
|
|
|
static ADL_ADAPTER_ID_GET ADL_Adapter_ID_Get; |
|
|
|
static ADL_ADAPTER_ID_GET ADL_Adapter_ID_Get; |
|
|
|
|
|
|
|
static ADL_MAIN_CONTROL_REFRESH ADL_Main_Control_Refresh; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static ADL_OVERDRIVE_CAPS ADL_Overdrive_Caps; |
|
|
|
|
|
|
|
|
|
|
|
static ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get; |
|
|
|
static ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get; |
|
|
|
static ADL_OVERDRIVE5_CURRENTACTIVITY_GET ADL_Overdrive5_CurrentActivity_Get; |
|
|
|
static ADL_OVERDRIVE5_CURRENTACTIVITY_GET ADL_Overdrive5_CurrentActivity_Get; |
|
|
|
static ADL_OVERDRIVE5_ODPARAMETERS_GET ADL_Overdrive5_ODParameters_Get; |
|
|
|
static ADL_OVERDRIVE5_ODPARAMETERS_GET ADL_Overdrive5_ODParameters_Get; |
|
|
@ -90,11 +94,23 @@ static ADL_OVERDRIVE5_FANSPEED_GET ADL_Overdrive5_FanSpeed_Get; |
|
|
|
static ADL_OVERDRIVE5_FANSPEED_SET ADL_Overdrive5_FanSpeed_Set; |
|
|
|
static ADL_OVERDRIVE5_FANSPEED_SET ADL_Overdrive5_FanSpeed_Set; |
|
|
|
static ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET ADL_Overdrive5_ODPerformanceLevels_Get; |
|
|
|
static ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET ADL_Overdrive5_ODPerformanceLevels_Get; |
|
|
|
static ADL_OVERDRIVE5_ODPERFORMANCELEVELS_SET ADL_Overdrive5_ODPerformanceLevels_Set; |
|
|
|
static ADL_OVERDRIVE5_ODPERFORMANCELEVELS_SET ADL_Overdrive5_ODPerformanceLevels_Set; |
|
|
|
static ADL_MAIN_CONTROL_REFRESH ADL_Main_Control_Refresh; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE5_POWERCONTROL_GET ADL_Overdrive5_PowerControl_Get; |
|
|
|
static ADL_OVERDRIVE5_POWERCONTROL_GET ADL_Overdrive5_PowerControl_Get; |
|
|
|
static ADL_OVERDRIVE5_POWERCONTROL_SET ADL_Overdrive5_PowerControl_Set; |
|
|
|
static ADL_OVERDRIVE5_POWERCONTROL_SET ADL_Overdrive5_PowerControl_Set; |
|
|
|
static ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET ADL_Overdrive5_FanSpeedToDefault_Set; |
|
|
|
static ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET ADL_Overdrive5_FanSpeedToDefault_Set; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_CAPABILITIES_GET ADL_Overdrive6_Capabilities_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_FANSPEED_GET ADL_Overdrive6_FanSpeed_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_THERMALCONTROLLER_CAPS ADL_Overdrive6_ThermalController_Caps; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_TEMPERATURE_GET ADL_Overdrive6_Temperature_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_STATEINFO_GET ADL_Overdrive6_StateInfo_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_CURRENTSTATUS_GET ADL_Overdrive6_CurrentStatus_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_POWERCONTROL_CAPS ADL_Overdrive6_PowerControl_Caps; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_POWERCONTROLINFO_GET ADL_Overdrive6_PowerControlInfo_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_POWERCONTROL_GET ADL_Overdrive6_PowerControl_Get; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_FANSPEED_SET ADL_Overdrive6_FanSpeed_Set; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_STATE_SET ADL_Overdrive6_State_Set; |
|
|
|
|
|
|
|
static ADL_OVERDRIVE6_POWERCONTROL_SET ADL_Overdrive6_PowerControl_Set; |
|
|
|
|
|
|
|
|
|
|
|
#if defined (LINUX) |
|
|
|
#if defined (LINUX) |
|
|
|
static void *hDLL; // Handle to .so library
|
|
|
|
static void *hDLL; // Handle to .so library
|
|
|
|
#else |
|
|
|
#else |
|
|
@ -129,6 +145,61 @@ static bool fanspeed_twin(struct gpu_adl *ga, struct gpu_adl *other_ga) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool init_overdrive5() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ADL_Overdrive5_Temperature_Get = (ADL_OVERDRIVE5_TEMPERATURE_GET) GetProcAddress(hDLL,"ADL_Overdrive5_Temperature_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_CurrentActivity_Get = (ADL_OVERDRIVE5_CURRENTACTIVITY_GET) GetProcAddress(hDLL, "ADL_Overdrive5_CurrentActivity_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_ODParameters_Get = (ADL_OVERDRIVE5_ODPARAMETERS_GET) GetProcAddress(hDLL, "ADL_Overdrive5_ODParameters_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeedInfo_Get = (ADL_OVERDRIVE5_FANSPEEDINFO_GET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeedInfo_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeed_Get = (ADL_OVERDRIVE5_FANSPEED_GET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeed_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeed_Set = (ADL_OVERDRIVE5_FANSPEED_SET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeed_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive5_ODPerformanceLevels_Get = (ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET) GetProcAddress(hDLL, "ADL_Overdrive5_ODPerformanceLevels_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_ODPerformanceLevels_Set = (ADL_OVERDRIVE5_ODPERFORMANCELEVELS_SET) GetProcAddress(hDLL, "ADL_Overdrive5_ODPerformanceLevels_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive5_PowerControl_Get = (ADL_OVERDRIVE5_POWERCONTROL_GET) GetProcAddress(hDLL, "ADL_Overdrive5_PowerControl_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_PowerControl_Set = (ADL_OVERDRIVE5_POWERCONTROL_SET) GetProcAddress(hDLL, "ADL_Overdrive5_PowerControl_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeedToDefault_Set = (ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeedToDefault_Set"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ADL_Overdrive5_Temperature_Get || !ADL_Overdrive5_CurrentActivity_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive5_ODParameters_Get || !ADL_Overdrive5_FanSpeedInfo_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive5_FanSpeed_Get || !ADL_Overdrive5_FanSpeed_Set || |
|
|
|
|
|
|
|
!ADL_Overdrive5_ODPerformanceLevels_Get || !ADL_Overdrive5_ODPerformanceLevels_Set || |
|
|
|
|
|
|
|
!ADL_Overdrive5_PowerControl_Get || !ADL_Overdrive5_PowerControl_Set || |
|
|
|
|
|
|
|
!ADL_Overdrive5_FanSpeedToDefault_Set) { |
|
|
|
|
|
|
|
applog(LOG_WARNING, "ATI ADL Overdrive5's API is missing"); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool init_overdrive6() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ADL_Overdrive6_FanSpeed_Get = (ADL_OVERDRIVE6_FANSPEED_GET) GetProcAddress(hDLL,"ADL_Overdrive6_FanSpeed_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_ThermalController_Caps = (ADL_OVERDRIVE6_THERMALCONTROLLER_CAPS)GetProcAddress (hDLL, "ADL_Overdrive6_ThermalController_Caps"); |
|
|
|
|
|
|
|
ADL_Overdrive6_Temperature_Get = (ADL_OVERDRIVE6_TEMPERATURE_GET)GetProcAddress (hDLL, "ADL_Overdrive6_Temperature_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_Capabilities_Get = (ADL_OVERDRIVE6_CAPABILITIES_GET)GetProcAddress(hDLL, "ADL_Overdrive6_Capabilities_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_StateInfo_Get = (ADL_OVERDRIVE6_STATEINFO_GET)GetProcAddress(hDLL, "ADL_Overdrive6_StateInfo_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_CurrentStatus_Get = (ADL_OVERDRIVE6_CURRENTSTATUS_GET)GetProcAddress(hDLL, "ADL_Overdrive6_CurrentStatus_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_PowerControl_Caps = (ADL_OVERDRIVE6_POWERCONTROL_CAPS)GetProcAddress(hDLL, "ADL_Overdrive6_PowerControl_Caps"); |
|
|
|
|
|
|
|
ADL_Overdrive6_PowerControlInfo_Get = (ADL_OVERDRIVE6_POWERCONTROLINFO_GET)GetProcAddress(hDLL, "ADL_Overdrive6_PowerControlInfo_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_PowerControl_Get = (ADL_OVERDRIVE6_POWERCONTROL_GET)GetProcAddress(hDLL, "ADL_Overdrive6_PowerControl_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive6_FanSpeed_Set = (ADL_OVERDRIVE6_FANSPEED_SET)GetProcAddress(hDLL, "ADL_Overdrive6_FanSpeed_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive6_State_Set = (ADL_OVERDRIVE6_STATE_SET)GetProcAddress(hDLL, "ADL_Overdrive6_State_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive6_PowerControl_Set = (ADL_OVERDRIVE6_POWERCONTROL_SET) GetProcAddress(hDLL, "ADL_Overdrive6_PowerControl_Set"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ADL_Overdrive6_FanSpeed_Get || !ADL_Overdrive6_ThermalController_Caps || |
|
|
|
|
|
|
|
!ADL_Overdrive6_Temperature_Get || !ADL_Overdrive6_Capabilities_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive6_StateInfo_Get || !ADL_Overdrive6_CurrentStatus_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive6_PowerControl_Caps || !ADL_Overdrive6_PowerControlInfo_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive6_PowerControl_Get || !ADL_Overdrive6_FanSpeed_Set || |
|
|
|
|
|
|
|
!ADL_Overdrive6_State_Set || !ADL_Overdrive6_PowerControl_Set) { |
|
|
|
|
|
|
|
applog(LOG_WARNING, "ATI ADL Overdrive6's API is missing"); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static bool prepare_adl(void) |
|
|
|
static bool prepare_adl(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int result; |
|
|
|
int result; |
|
|
@ -151,28 +222,12 @@ static bool prepare_adl(void) |
|
|
|
ADL_Adapter_NumberOfAdapters_Get = (ADL_ADAPTER_NUMBEROFADAPTERS_GET) GetProcAddress(hDLL,"ADL_Adapter_NumberOfAdapters_Get"); |
|
|
|
ADL_Adapter_NumberOfAdapters_Get = (ADL_ADAPTER_NUMBEROFADAPTERS_GET) GetProcAddress(hDLL,"ADL_Adapter_NumberOfAdapters_Get"); |
|
|
|
ADL_Adapter_AdapterInfo_Get = (ADL_ADAPTER_ADAPTERINFO_GET) GetProcAddress(hDLL,"ADL_Adapter_AdapterInfo_Get"); |
|
|
|
ADL_Adapter_AdapterInfo_Get = (ADL_ADAPTER_ADAPTERINFO_GET) GetProcAddress(hDLL,"ADL_Adapter_AdapterInfo_Get"); |
|
|
|
ADL_Adapter_ID_Get = (ADL_ADAPTER_ID_GET) GetProcAddress(hDLL,"ADL_Adapter_ID_Get"); |
|
|
|
ADL_Adapter_ID_Get = (ADL_ADAPTER_ID_GET) GetProcAddress(hDLL,"ADL_Adapter_ID_Get"); |
|
|
|
ADL_Overdrive5_Temperature_Get = (ADL_OVERDRIVE5_TEMPERATURE_GET) GetProcAddress(hDLL,"ADL_Overdrive5_Temperature_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_CurrentActivity_Get = (ADL_OVERDRIVE5_CURRENTACTIVITY_GET) GetProcAddress(hDLL, "ADL_Overdrive5_CurrentActivity_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_ODParameters_Get = (ADL_OVERDRIVE5_ODPARAMETERS_GET) GetProcAddress(hDLL, "ADL_Overdrive5_ODParameters_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeedInfo_Get = (ADL_OVERDRIVE5_FANSPEEDINFO_GET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeedInfo_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeed_Get = (ADL_OVERDRIVE5_FANSPEED_GET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeed_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeed_Set = (ADL_OVERDRIVE5_FANSPEED_SET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeed_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive5_ODPerformanceLevels_Get = (ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET) GetProcAddress(hDLL, "ADL_Overdrive5_ODPerformanceLevels_Get"); |
|
|
|
|
|
|
|
ADL_Overdrive5_ODPerformanceLevels_Set = (ADL_OVERDRIVE5_ODPERFORMANCELEVELS_SET) GetProcAddress(hDLL, "ADL_Overdrive5_ODPerformanceLevels_Set"); |
|
|
|
|
|
|
|
ADL_Main_Control_Refresh = (ADL_MAIN_CONTROL_REFRESH) GetProcAddress(hDLL, "ADL_Main_Control_Refresh"); |
|
|
|
ADL_Main_Control_Refresh = (ADL_MAIN_CONTROL_REFRESH) GetProcAddress(hDLL, "ADL_Main_Control_Refresh"); |
|
|
|
ADL_Overdrive5_PowerControl_Get = (ADL_OVERDRIVE5_POWERCONTROL_GET) GetProcAddress(hDLL, "ADL_Overdrive5_PowerControl_Get"); |
|
|
|
ADL_Overdrive_Caps = (ADL_OVERDRIVE_CAPS)GetProcAddress(hDLL, "ADL_Overdrive_Caps"); |
|
|
|
ADL_Overdrive5_PowerControl_Set = (ADL_OVERDRIVE5_POWERCONTROL_SET) GetProcAddress(hDLL, "ADL_Overdrive5_PowerControl_Set"); |
|
|
|
|
|
|
|
ADL_Overdrive5_FanSpeedToDefault_Set = (ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeedToDefault_Set"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ADL_Main_Control_Create || !ADL_Main_Control_Destroy || |
|
|
|
if (!ADL_Main_Control_Create || !ADL_Main_Control_Destroy || |
|
|
|
!ADL_Adapter_NumberOfAdapters_Get || !ADL_Adapter_AdapterInfo_Get || |
|
|
|
!ADL_Adapter_NumberOfAdapters_Get || !ADL_Adapter_AdapterInfo_Get || |
|
|
|
!ADL_Adapter_ID_Get || !ADL_Overdrive5_Temperature_Get || |
|
|
|
!ADL_Adapter_ID_Get || !ADL_Main_Control_Refresh || |
|
|
|
!ADL_Overdrive5_CurrentActivity_Get || |
|
|
|
!ADL_Overdrive_Caps) { |
|
|
|
!ADL_Overdrive5_ODParameters_Get || !ADL_Overdrive5_FanSpeedInfo_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive5_FanSpeed_Get || !ADL_Overdrive5_FanSpeed_Set || |
|
|
|
|
|
|
|
!ADL_Overdrive5_ODPerformanceLevels_Get || !ADL_Overdrive5_ODPerformanceLevels_Set || |
|
|
|
|
|
|
|
!ADL_Main_Control_Refresh || !ADL_Overdrive5_PowerControl_Get || |
|
|
|
|
|
|
|
!ADL_Overdrive5_PowerControl_Set || !ADL_Overdrive5_FanSpeedToDefault_Set) { |
|
|
|
|
|
|
|
applog(LOG_WARNING, "ATI ADL's API is missing"); |
|
|
|
applog(LOG_WARNING, "ATI ADL's API is missing"); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -191,6 +246,8 @@ static bool prepare_adl(void) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
init_overdrive5(); |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|