ADL (AMD Display Library) Public APIs  Version 17.1
Functions
I2C, DDC and EDID APIs

This group outlines I2C, DDC and EDID related APIs. More...

Functions

int ADL2_Display_DDCBlockAccess_Get (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int iDisplayIndex, int iOption, int iCommandIndex, int iSendMsgLen, char *lpucSendMsgBuf, int *lpulRecvMsgLen, char *lpucRecvMsgBuf)
 Function to get Display DDC block access. More...
 
int ADL2_Display_DDCInfo2_Get (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int iDisplayIndex, ADLDDCInfo2 *lpInfo)
 Function to get the DDC info. More...
 
int ADL2_Display_DDCInfo_Get (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int iDisplayIndex, ADLDDCInfo *lpInfo)
 Function to get the DDC info. More...
 
int ADL2_Display_EdidData_Get (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int iDisplayIndex, ADLDisplayEDIDData *lpEDIDData)
 Function to get the EDID data. More...
 
int ADL2_Display_WriteAndReadI2C (ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLI2C *plI2C)
 Function to write and read I2C. More...
 
int ADL2_Display_WriteAndReadI2CRev_Get (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int *lpMajor, int *lpMinor)
 Function to retrieve the I2C API revision. More...
 
int ADL2_Display_WriteAndReadSMUI2C (ADL_CONTEXT_HANDLE context, int iAdapterIndex, ADLI2C *plI2C)
 
int ADL_Display_DDCBlockAccess_Get (int iAdapterIndex, int iDisplayIndex, int iOption, int iCommandIndex, int iSendMsgLen, char *lpucSendMsgBuf, int *lpulRecvMsgLen, char *lpucRecvMsgBuf)
 Function to get Display DDC block access. More...
 
int ADL_Display_DDCInfo2_Get (int iAdapterIndex, int iDisplayIndex, ADLDDCInfo2 *lpInfo)
 Function to get the DDC info. More...
 
int ADL_Display_DDCInfo_Get (int iAdapterIndex, int iDisplayIndex, ADLDDCInfo *lpInfo)
 Function to get the DDC info. More...
 
int ADL_Display_EdidData_Get (int iAdapterIndex, int iDisplayIndex, ADLDisplayEDIDData *lpEDIDData)
 Function to get the EDID data. More...
 
int ADL_Display_WriteAndReadI2C (int iAdapterIndex, ADLI2C *plI2C)
 Function to write and read I2C. More...
 
int ADL_Display_WriteAndReadI2CRev_Get (int iAdapterIndex, int *lpMajor, int *lpMinor)
 Function to retrieve the I2C API revision. More...
 
int ADL_Display_WriteAndReadSMUI2C (int iAdapterIndex, ADLI2C *plI2C)
 Function to write and read I2C via SMU. More...
 

Detailed Description

This group outlines I2C, DDC and EDID related APIs.

Function Documentation

◆ ADL2_Display_DDCBlockAccess_Get()

int ADL2_Display_DDCBlockAccess_Get ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
int  iDisplayIndex,
int  iOption,
int  iCommandIndex,
int  iSendMsgLen,
char *  lpucSendMsgBuf,
int *  lpulRecvMsgLen,
char *  lpucRecvMsgBuf 
)

Function to get Display DDC block access.

This function provides means for applications to send/receive data in the DDC information block via the 12C bus.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[in]iOptionCombination of ADL_DDC_OPTION_SWITCHDDC2 and ADL_DDC_OPTION_RESTORECOMMAND
[in]iCommandIndexThe index of the command to be saved in the registry. This parameter is used only when ADL_DDC_OPTION_RESTORECOMMAND of iOption is specified. Otherwize set this parameter to 0.
[in]iSendMsgLenThe size of the send message buffer.
[in]lpucSendMsgBufThe pointer to the send message buffer.
[out]lpulRecvMsgLenThe pointer to the size of the receive message buffer.
[out]lpucRecvMsgBufThe pointer to the retrieved receive message buffer.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
To send data without receiving anything back, specify non-zero send message size and non-NULL buffer, then set the receive message size to 0 and buffer to NULL.
To receive data, you have to send a command defined by the I2C protocol to the display, so you will always have to send some sequence of bytes to the display, even if you only want to read from the display.
To send and receive data at the same time, specify non-zero send and receive message size and non-NULL send and receive message buffers. You will have to worry about sending proper commands to the display, as defined by the I2C protocol.
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL2_Display_DDCInfo2_Get()

int ADL2_Display_DDCInfo2_Get ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
int  iDisplayIndex,
ADLDDCInfo2 lpInfo 
)

Function to get the DDC info.

This function retrieves the display device config (DDC) information only if the device has the information. No assumption should be made that this call will cause the driver will do real time detection. The driver determines when DDC detection should take place. If a display is attached and it supports DDC, all available information should be returned and ADLDDCInfo.ulSupportsDDC should be set to 1. Any fields that are not supported by an attached DDC display should be zeroed on return.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[out]lpInfoThe pointer to the ADLDDCInfo structure storing all DDC retrieved from the driver.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL2_Display_DDCInfo_Get()

int ADL2_Display_DDCInfo_Get ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
int  iDisplayIndex,
ADLDDCInfo lpInfo 
)

Function to get the DDC info.

This function retrieves the display device config (DDC) information only if the device has the information. No assumption should be made that this call will cause the driver will do real time detection. The driver determines when DDC detection should take place. If a display is attached and it supports DDC, all available information should be returned and ADLDDCInfo.ulSupportsDDC should be set to 1. Any fields that are not supported by an attached DDC display should be zeroed on return.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[out]lpInfoThe pointer to the ADLDDCInfo structure storing all DDC retrieved from the driver.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL2_Display_EdidData_Get()

int ADL2_Display_EdidData_Get ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
int  iDisplayIndex,
ADLDisplayEDIDData lpEDIDData 
)

Function to get the EDID data.

This function retrieves the EDID data for a specififed display.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[in,out]lpEDIDDataThe pointer to the ADLDisplayEDIDData structure storing the retrieved EDID data.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL2_Display_WriteAndReadI2C()

int ADL2_Display_WriteAndReadI2C ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
ADLI2C plI2C 
)

Function to write and read I2C.

This function writes and reads I2C.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in,out]plI2CA pointer to the ADLI2C structure.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL2_Display_WriteAndReadI2CRev_Get()

int ADL2_Display_WriteAndReadI2CRev_Get ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
int *  lpMajor,
int *  lpMinor 
)

Function to retrieve the I2C API revision.

This function retrieves the I2C API revision.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[out]lpMajorThe pointer to the major version.
[out]lpMinorThe pointer to the minor version.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL2_Display_WriteAndReadSMUI2C()

int ADL2_Display_WriteAndReadSMUI2C ( ADL_CONTEXT_HANDLE  context,
int  iAdapterIndex,
ADLI2C plI2C 
)
Function to write and read I2C via SMU.

This function writes and reads I2C via SMU.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]contextClient's ADL context handle ADL_CONTEXT_HANDLE obtained from ADL2_Main_Control_Create.
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in,out]plI2CA pointer to the ADLI2C structure.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
Clients can use ADL2 version of the API to assure that there is no interference with other ADL clients that are running in the same process . Such clients have to call ADL2_Main_Control_Create first to obtain ADL_CONTEXT_HANDLE instance that has to be passed to each subsequent ADL2 call and finally destroyed using ADL2_Main_Control_Destroy.

◆ ADL_Display_DDCBlockAccess_Get()

int ADL_Display_DDCBlockAccess_Get ( int  iAdapterIndex,
int  iDisplayIndex,
int  iOption,
int  iCommandIndex,
int  iSendMsgLen,
char *  lpucSendMsgBuf,
int *  lpulRecvMsgLen,
char *  lpucRecvMsgBuf 
)

Function to get Display DDC block access.

This function provides means for applications to send/receive data in the DDC information block via the 12C bus.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[in]iOptionCombination of ADL_DDC_OPTION_SWITCHDDC2 and ADL_DDC_OPTION_RESTORECOMMAND
[in]iCommandIndexThe index of the command to be saved in the registry. This parameter is used only when ADL_DDC_OPTION_RESTORECOMMAND of iOption is specified. Otherwize set this parameter to 0.
[in]iSendMsgLenThe size of the send message buffer.
[in]lpucSendMsgBufThe pointer to the send message buffer.
[out]lpulRecvMsgLenThe pointer to the size of the receive message buffer.
[out]lpucRecvMsgBufThe pointer to the retrieved receive message buffer.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes
Remarks
To send data without receiving anything back, specify non-zero send message size and non-NULL buffer, then set the receive message size to 0 and buffer to NULL.
To receive data, you have to send a command defined by the I2C protocol to the display, so you will always have to send some sequence of bytes to the display, even if you only want to read from the display.
To send and receive data at the same time, specify non-zero send and receive message size and non-NULL send and receive message buffers. You will have to worry about sending proper commands to the display, as defined by the I2C protocol.

◆ ADL_Display_DDCInfo2_Get()

int ADL_Display_DDCInfo2_Get ( int  iAdapterIndex,
int  iDisplayIndex,
ADLDDCInfo2 lpInfo 
)

Function to get the DDC info.

This function retrieves the display device config (DDC) information only if the device has the information. No assumption should be made that this call will cause the driver will do real time detection. The driver determines when DDC detection should take place. If a display is attached and it supports DDC, all available information should be returned and ADLDDCInfo.ulSupportsDDC should be set to 1. Any fields that are not supported by an attached DDC display should be zeroed on return.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[out]lpInfoThe pointer to the ADLDDCInfo structure storing all DDC retrieved from the driver.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes

◆ ADL_Display_DDCInfo_Get()

int ADL_Display_DDCInfo_Get ( int  iAdapterIndex,
int  iDisplayIndex,
ADLDDCInfo lpInfo 
)

Function to get the DDC info.

This function retrieves the display device config (DDC) information only if the device has the information. No assumption should be made that this call will cause the driver will do real time detection. The driver determines when DDC detection should take place. If a display is attached and it supports DDC, all available information should be returned and ADLDDCInfo.ulSupportsDDC should be set to 1. Any fields that are not supported by an attached DDC display should be zeroed on return.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[out]lpInfoThe pointer to the ADLDDCInfo structure storing all DDC retrieved from the driver.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes

◆ ADL_Display_EdidData_Get()

int ADL_Display_EdidData_Get ( int  iAdapterIndex,
int  iDisplayIndex,
ADLDisplayEDIDData lpEDIDData 
)

Function to get the EDID data.

This function retrieves the EDID data for a specififed display.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in]iDisplayIndexThe desired display index. It can be retrieved from the ADLDisplayInfo data structure.
[in,out]lpEDIDDataThe pointer to the ADLDisplayEDIDData structure storing the retrieved EDID data.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes

◆ ADL_Display_WriteAndReadI2C()

int ADL_Display_WriteAndReadI2C ( int  iAdapterIndex,
ADLI2C plI2C 
)

Function to write and read I2C.

This function writes and reads I2C.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in,out]plI2CA pointer to the ADLI2C structure.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes

◆ ADL_Display_WriteAndReadI2CRev_Get()

int ADL_Display_WriteAndReadI2CRev_Get ( int  iAdapterIndex,
int *  lpMajor,
int *  lpMinor 
)

Function to retrieve the I2C API revision.

This function retrieves the I2C API revision.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[out]lpMajorThe pointer to the major version.
[out]lpMinorThe pointer to the minor version.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes

◆ ADL_Display_WriteAndReadSMUI2C()

int ADL_Display_WriteAndReadSMUI2C ( int  iAdapterIndex,
ADLI2C plI2C 
)

Function to write and read I2C via SMU.

This function writes and reads I2C via SMU.

Supported Platforms:
Linux and Windows(XP, Vista and above); 32bit and 64bit
Parameters
[in]iAdapterIndexThe ADL index handle of the desired adapter.
[in,out]plI2CA pointer to the ADLI2C structure.
Returns
If the function succeeds, the return value is ADL_OK. Otherwise the return value is an ADL error code. Result Codes

Copyright © 2009-2020 Advanced Micro Devices, Inc. All rights reserved.