cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

felixcantournet
Journeyman III

ADL_Display_set_yyy on a physical monitor

Hi,

Context:

I have an Eyefinity setup as follow : 10 full HD 27" monitors + 1 full HD 55" hooked up to 2 W600 cards.
1 eyefinity display group with 3x2 27" monitors. (Main Desktop)
1 eyefintiy display group with 2x2 27" monitors. (Extended desktop)
1 extended desktop on the remaining 55".

PC runs Windows 7 Pro 64 bits.

For reasons I can't disclose (management thought DDC\CI was "useless") I would like to use the CCC to do color calibration on the 27" monitors since I can't do it any other way.
This doesn't work however : the  GUI seems to let you select a given monitor inside a display group, but the identification mecanism is broken because if I select the first monitor inside the 2x2 group for instance, I actually get a monitor from the 3x2 group..

what I want to do :

So I thought I'd make my own calibration app with a gui representing my setup using the ADL SDK. I've successfully extended the examples to change the Brightness level on all displays connected.

What I can't figure out is how to get a handle to a specific display from ADL.

I need to make a function taking as input either :

     - GPU + the socket on the GPU to which the physical monitor is hooked up

     - OR the coordinates of a point appearing on the physical monitor

     - OR the position in the DisplayGroup Grid (e.g : 1st row, 2nd column)
     - OR anything else I might be able to provide and haven't thought of , suggestions are welcome.

and return iAdapterIndex and iDisplayIndex so that I can call ADL_DISPLAY_COLOR_SET

Does anyone have suggestions as to how I could implement that ? Is is even possible considering that CCC seems to fail?

0 Likes
1 Reply
chm
Staff
Staff

Hi,

I think the only way is to query the eyefinity configuration. This will provide you enough information to determine which display is located and which position of the eyefinity group. You can have a look at the eyefinity sample that comes with ADL. Please take a look at the function atiEyefinityGetConfigInfo. On a high level I would recommend you to enumerate through the Adapters, find the mapped displays. On a mapped display get the SLS configuration. This will give you the total resolution of the group and the X position and the Y position of the display inside the group.You will get the SLS coniguration by calling ADL_Display_SLSMapConfig_Get. This function will return you the ADLSLSTargets. Each display in a group has its own entry in this array and provides you the Adapater index, the display index and the position of the display in teh group.

The code could look like this:

// Determine how many adapters and displays are in the system
ADL_Adapter_NumberOfAdapters_Get(&nNumAdapters);

if (nNumAdapters > 0)
{
   pAdapterInfo = (LPAdapterInfo)malloc ( sizeof (AdapterInfo) * nNumAdapters );
   memset ( pAdapterInfo,'\0', sizeof (AdapterInfo) * nNumAdapters );
}

ADL_Adapter_AdapterInfo_Get (pAdapterInfo, sizeof (AdapterInfo) * nNumAdapters);

// Loop through all adapters and search for genlocked displays.
// Only on those a window will be created.
for (int i = 0; i < nNumAdapters; ++i)
{
   int nAdapterIdx;
   int nAdapterStatus;
   
   nAdapterIdx = pAdapterInfo.iAdapterIndex;

   ADL_Adapter_Active_Get(nAdapterIdx, &nAdapterStatus);

   if (nAdapterStatus)
   {
      LPADLDisplayInfo  pDisplayInfo = NULL;

      ADL_Display_DisplayInfo_Get(nAdapterIdx, &nNumDisplays, &pDisplayInfo, 0);

      for (int j = 0; j < nNumDisplays; ++j)
      {
         // check if display is connected and mapped
         if (pDisplayInfo.iDisplayInfoValue & ADL_DISPLAY_DISPLAYINFO_DISPLAYCONNECTED)
         {
            // check if display is mapped on adapter
            if (pDisplayInfo.iDisplayInfoValue & ADL_DISPLAY_DISPLAYINFO_DISPLAYMAPPED && pDisplayInfo.displayID.iDisplayLogicalAdapterIndex == nAdapterIdx)
            {
               // check for eyefinity configurations
               int                   nNumDisplayMap      = 0;
               int                   nNumDisplayTarget   = 0;
               ADLDisplayMap*        lpDisplayMap        = NULL;
               ADLDisplayTarget*     lpDisplayTarget     = NULL;

               ADL_Display_DisplayMapConfig_Get(nAdapterIdx, &nNumDisplayMap, &lpDisplayMap, &nNumDisplayTarget, &lpDisplayTarget, ADL_DISPLAY_DISPLAYMAP_OPTION_GPUINFO);

               if (nNumDisplayTarget > 1)
               {
                  int                         nSLSMapIdx = 0;
                  int                         nNumSLSTarget = 0;
                  int                         nNumNativeMode = 0;
                  int                         nNumBezelMode = 0;
                  int                         nNumTransientMode = 0;
                  int                         nNumSLSOffset = 0;
                  ADLSLSMap                   SLSMap;
                  ADLSLSMode*                 lpNativeMode = NULL;
                  ADLSLSTarget*               lpSLSTarget = NULL;
                  ADLBezelTransientMode*      lpBezelMode = NULL; 
                  ADLBezelTransientMode*      lpTransientMode = NULL;
                  ADLSLSOffset*               lpSLSOffset = NULL;

                  // Display Group
                  ADL_Display_SLSMapIndex_Get(nAdapterIdx, nNumDisplayTarget, lpDisplayTarget, &nSLSMapIdx);

                  ADL_Display_SLSMapConfig_Get( nAdapterIdx,          nSLSMapIdx, &SLSMap,
                                                                            &nNumSLSTarget,       &lpSLSTarget,
                                                                            &nNumNativeMode,      &lpNativeMode,
                                                                            &nNumBezelMode,       &lpBezelMode,
                                                                             &nNumTransientMode,   &lpTransientMode,
                                                                             &nNumSLSOffset,       &lpSLSOffset,
                                                                             ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_CURRENTANGLE );

                

                  for (unsigned int i = 0; i < nNumDisplayTarget; ++i)
                  {
                     fprintf(stdout," AdpIdx %d DspIdx %d  SLS X: %d  SLS Y: %d\n",lpSLSTarget.iAdapterIndex, lpSLSTarget.displayTarget.displayID.iDisplayLogicalIndex, lpSLSTarget.iSLSGridPositionX, lpSLSTarget.iSLSGridPositionY);
                  }
               }
           }

Chris

0 Likes