Skip to content

Commit 5c9f184

Browse files
committed
GPU (Windows): use ODN as OD7; fix ADL2_Overdrive8_Current_Setting_Get call and some other bugs
1 parent 49725c2 commit 5c9f184

File tree

2 files changed

+157
-123
lines changed

2 files changed

+157
-123
lines changed

src/detection/gpu/adl.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ extern int ADL2_Adapter_ASICFamilyType_Get(ADL_CONTEXT_HANDLE context, int iAdap
3333
// Function to retrieve current power management capabilities.
3434
extern int ADL2_Overdrive_Caps(ADL_CONTEXT_HANDLE context, int iAdapterIndex, int* iSupported, int* iEnabled, int* iVersion);
3535

36+
3637
/////////// Overdrive 6 functions
3738

3839
// Function to retrieve current Overdrive and performance-related activity.
@@ -44,18 +45,14 @@ extern int ADL2_Overdrive6_Temperature_Get(ADL_CONTEXT_HANDLE context, int iAdap
4445
// Function to retrieve the current or default Overdrive clock ranges.
4546
extern int ADL2_Overdrive6_StateInfo_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, int iStateType, ADLOD6StateInfo* lpStateInfo);
4647

47-
/// Overdrive 8 functions
48-
49-
// Function to retrieve the Overdrive8 current settings.
50-
extern int ADL2_Overdrive8_Current_Setting_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLOD8CurrentSetting *lpCurrentSetting);
51-
52-
// Function to retrieve the Overdrive8 current settings.
53-
extern int ADL2_New_QueryPMLogData_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLPMLogDataOutput *lpDataOutput);
5448

5549
/// Overdrive N functions
5650

51+
// Despite the name (N means Next), this is actually Overdrive7 API
52+
// https://github.com/GPUOpen-LibrariesAndSDKs/display-library/blob/master/Sample/OverdriveN/OverdriveN.cpp#L209
53+
5754
// Function to retrieve the OverdriveN capabilities.
58-
extern int ADL2_OverdriveN_Capabilities_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLODNCapabilities* lpODCapabilities);
55+
extern int ADL2_OverdriveN_CapabilitiesX2_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLODNCapabilitiesX2* lpODCapabilities);
5956

6057
// Function to retrieve the current OD performance status.
6158
extern int ADL2_OverdriveN_PerformanceStatus_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLODNPerformanceStatus *lpODPerformanceStatus);
@@ -64,4 +61,13 @@ extern int ADL2_OverdriveN_PerformanceStatus_Get(ADL_CONTEXT_HANDLE context, int
6461
extern int ADL2_OverdriveN_Temperature_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, int iTemperatureType, int *iTemperature);
6562

6663
// Function to retrieve the current GPU clocks settings.
67-
extern int ADL2_OverdriveN_SystemClocks_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLODNPerformanceLevels *lpODPerformanceLevels);
64+
extern int ADL2_OverdriveN_SystemClocksX2_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLODNPerformanceLevelsX2 *lpODPerformanceLevels);
65+
66+
67+
/// Overdrive 8 functions
68+
69+
// Function to retrieve the Overdrive8 current settings.
70+
extern int ADL2_Overdrive8_Current_Setting_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLOD8CurrentSetting *lpCurrentSetting);
71+
72+
// Function to retrieve the Overdrive8 current settings.
73+
extern int ADL2_New_QueryPMLogData_Get(ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLPMLogDataOutput *lpDataOutput);

0 commit comments

Comments
 (0)