3 Replies Latest reply on Apr 8, 2015 3:01 PM by chm

    Getting GPU port index of attached display on windows

    jossgray

      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.

        • Re: Getting GPU port index of attached display on windows
          chm

          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

           


            • Re: Getting GPU port index of attached display on windows
              jossgray

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

                • Re: Getting GPU port index of attached display on windows
                  chm

                  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