cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jossgray
Adept II

Getting GPU port index of attached display on windows

Is there any way to retrieve the port index of an attached display in Windows (7+)?

For example, I have a 4 DisplayPort graphics card, with 2 monitors attached. They are connected to ports 1 and 4. I would like to know which monitor is connected to which port.

I have a feeling that it might be possible using the OpenGL ICD functions but haven't found anything yet.

Would be interested to know how it can be done using the ADL, however I would prefer to use the windows api for compatibility.

0 Likes
1 Solution

The iDesiplayIndex you get when calling ADL2_Adapter_ConnectionState_Get corresponds to the ADLDisplayInfo.displayID.iDisplayLogicalIndex. Having this index enables you to find the ADLDisplayInfo and ADLAdapterInfo that corresponds to the display of the connector. You can use ALDL2_Display_DisplayInfo_Get and loop through the displays until you find the one with the iDisplayLogicalIndex that is equal to iDisplayIndex. Then you have all display related information like e.g. the DisplayName (e.g. \\.\Display1) to identify the display and to make the mapping to DirectX.

Chris

View solution in original post

0 Likes
3 Replies
chm
Staff
Staff

You can check the connector status of the GPU using ADL. This will give you information if a display is connected and how it is connected, e.g.. if DP, DVI, VGA etc.

Please check the function ADL2_Adapter_ConnectionState_Get. The ADL SKD includes a sample called EDIDSampleTool. The code shows how to get the connection state of all connectors. Please check EDID.c function getEmulationStatus.

Chris


0 Likes

Will iDisplayIndex refer to the same output as DirectX. I'm trying to create a mapping between DirectX output and GPU port.

0 Likes

The iDesiplayIndex you get when calling ADL2_Adapter_ConnectionState_Get corresponds to the ADLDisplayInfo.displayID.iDisplayLogicalIndex. Having this index enables you to find the ADLDisplayInfo and ADLAdapterInfo that corresponds to the display of the connector. You can use ALDL2_Display_DisplayInfo_Get and loop through the displays until you find the one with the iDisplayLogicalIndex that is equal to iDisplayIndex. Then you have all display related information like e.g. the DisplayName (e.g. \\.\Display1) to identify the display and to make the mapping to DirectX.

Chris

0 Likes