[][src]Function nvapi_sys::gpu::display::NvAPI_GPU_GetConnectedDisplayIds

pub unsafe fn NvAPI_GPU_GetConnectedDisplayIds(
    hPhysicalGPU: NvPhysicalGpuHandle,
    pDisplayIds: *mut NV_GPU_DISPLAYIDS,
    pDisplayIdCount: *mut u32,
    flags: NV_GPU_CONNECTED_IDS_FLAG
) -> NvAPI_Status

Due to space limitation NvAPI_GPU_GetConnectedOutputs can return maximum 32 devices, but this is no longer true for DPMST. NvAPI_GPU_GetConnectedDisplayIds will return all the connected display devices in the form of displayIds for the associated hPhysicalGpu. This function can accept set of flags to request cached, uncached, sli and lid to get the connected devices. Default value for flags will be cached.

HOW TO USE

  1. for each PhysicalGpu, make a call to get the number of connected displayId's using NvAPI_GPU_GetConnectedDisplayIds by passing the pDisplayIds as NULL
  2. On call success: Allocate memory based on pDisplayIdCount then make a call NvAPI_GPU_GetConnectedDisplayIds to populate DisplayIds

RETURN STATUS

  • NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pDisplayIds or pDisplayIdCount is NULL
  • NVAPI_OK: *pDisplayIds contains a set of GPU-output identifiers
  • NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
  • NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle