NVAPI Reference Documentation
NVIDIA
Release 435: August 22
2019

Quadro G-Sync APIs

Data Structures

struct  _NV_GSYNC_STATUS_PARAMS_V1
 

Macros

#define NV_GSYNC_CAPABILITIES_VER1   MAKE_NVAPI_VERSION(NV_GSYNC_CAPABILITIES_V1,1)
 
#define NVAPI_MAX_RJ45_PER_GSYNC   2
 
#define NV_GSYNC_STATUS_PARAMS_VER1   MAKE_NVAPI_VERSION(NV_GSYNC_STATUS_PARAMS_V1,1)
 

Typedefs

typedef enum _NVAPI_GSYNC_POLARITY NVAPI_GSYNC_POLARITY
 
typedef enum _NVAPI_GSYNC_DELAY_TYPE NVAPI_GSYNC_DELAY_TYPE
 
typedef struct _NV_GSYNC_STATUS_PARAMS_V1 NV_GSYNC_STATUS_PARAMS_V1
 

Enumerations

enum  _NVAPI_GSYNC_POLARITY { NVAPI_GSYNC_POLARITY_RISING_EDGE = 0, NVAPI_GSYNC_POLARITY_FALLING_EDGE = 1, NVAPI_GSYNC_POLARITY_BOTH_EDGES = 2 }
 
enum  _NVAPI_GSYNC_DELAY_TYPE { NVAPI_GSYNC_DELAY_TYPE_UNKNOWN = 0, NVAPI_GSYNC_DELAY_TYPE_SYNC_SKEW = 1, NVAPI_GSYNC_DELAY_TYPE_STARTUP = 2 }
 

Functions

NVAPI_INTERFACE NvAPI_GSync_EnumSyncDevices (__out NvGSyncDeviceHandle nvGSyncHandles[NVAPI_MAX_GSYNC_DEVICES], __out NvU32 *gsyncCount)
 
NVAPI_INTERFACE NvAPI_GSync_QueryCapabilities (__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CAPABILITIES *pNvGSyncCapabilities)
 
NVAPI_INTERFACE NvAPI_GSync_GetTopology (__in NvGSyncDeviceHandle hNvGSyncDevice, __inout_opt NvU32 *gsyncGpuCount, __inout_ecount_part_opt(*gsyncGpuCount,*gsyncGpuCount) NV_GSYNC_GPU *gsyncGPUs, __inout_opt NvU32 *gsyncDisplayCount, __inout_ecount_part_opt(*gsyncDisplayCount,*gsyncDisplayCount) NV_GSYNC_DISPLAY *gsyncDisplays)
 
NVAPI_INTERFACE NvAPI_GSync_SetSyncStateSettings (__in NvU32 gsyncDisplayCount, __in_ecount(gsyncDisplayCount) NV_GSYNC_DISPLAY *pGsyncDisplays, __in NvU32 flags)
 
NVAPI_INTERFACE NvAPI_GSync_GetControlParameters (__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CONTROL_PARAMS *pGsyncControls)
 
NVAPI_INTERFACE NvAPI_GSync_SetControlParameters (__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CONTROL_PARAMS *pGsyncControls)
 
NVAPI_INTERFACE NvAPI_GSync_AdjustSyncDelay (__in NvGSyncDeviceHandle hNvGSyncDevice, __in NVAPI_GSYNC_DELAY_TYPE delayType, __inout NV_GSYNC_DELAY *pGsyncDelay, __out_opt NvU32 *syncSteps)
 
NVAPI_INTERFACE NvAPI_GSync_GetSyncStatus (__in NvGSyncDeviceHandle hNvGSyncDevice, __in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GSYNC_STATUS *status)
 
NVAPI_INTERFACE NvAPI_GSync_GetStatusParameters (NvGSyncDeviceHandle hNvGSyncDevice, NV_GSYNC_STATUS_PARAMS *pStatusParams)
 

Detailed Description

These APIs control NVIDIA Quadro G-Sync.

Macro Definition Documentation

#define NV_GSYNC_CAPABILITIES_VER1   MAKE_NVAPI_VERSION(NV_GSYNC_CAPABILITIES_V1,1)

Macro for constructing the version field of NV_GSYNC_CAPABILITIES.

#define NV_GSYNC_STATUS_PARAMS_VER1   MAKE_NVAPI_VERSION(NV_GSYNC_STATUS_PARAMS_V1,1)

Macro for constructing the version field of NV_GSYNC_STATUS_PARAMS

#define NVAPI_MAX_RJ45_PER_GSYNC   2

Typedef Documentation

Source signal edge to be used for output pulse. See NV_GSYNC_CONTROL_PARAMS.

Enumeration Type Documentation

Used in NvAPI_GSync_AdjustSyncDelay()

Enumerator
NVAPI_GSYNC_DELAY_TYPE_UNKNOWN 
NVAPI_GSYNC_DELAY_TYPE_SYNC_SKEW 
NVAPI_GSYNC_DELAY_TYPE_STARTUP 

Source signal edge to be used for output pulse. See NV_GSYNC_CONTROL_PARAMS.

Enumerator
NVAPI_GSYNC_POLARITY_RISING_EDGE 
NVAPI_GSYNC_POLARITY_FALLING_EDGE 
NVAPI_GSYNC_POLARITY_BOTH_EDGES 

Function Documentation

NVAPI_INTERFACE NvAPI_GSync_AdjustSyncDelay ( __in NvGSyncDeviceHandle  hNvGSyncDevice,
__in NVAPI_GSYNC_DELAY_TYPE  delayType,
__inout NV_GSYNC_DELAY pGsyncDelay,
__out_opt NvU32 syncSteps 
)

DESCRIPTION: This API adjusts the skew and startDelay to the closest possible values. Use this API before calling NvAPI_GSync_SetControlParameters for skew or startDelay.

SUPPORTED OS: Windows 7 and higher

Since
Release: 319
Parameters
[in]hNvGSyncDevice-The caller provides the handle of the Sync device for which to get parameters
[in]delayType-Specifies whether the delay is syncSkew or startupDelay.
[in,out]*pGsyncDelay-The caller provides NV_GSYNC_DELAY. skew and startDelay will be adjusted and updated to the closest values.
[out]*syncSteps-This parameter is optional. It returns the sync delay in unit steps. If 0, it means either the NV_GSYNC_DELAY::numPixels is less than NV_GSYNC_DELAY::minPixels or NV_GSYNC_DELAY::numOfLines exceeds the NV_GSYNC_DELAY::maxLines.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
NVAPI_INTERFACE NvAPI_GSync_EnumSyncDevices ( __out NvGSyncDeviceHandle  nvGSyncHandles[NVAPI_MAX_GSYNC_DEVICES],
__out NvU32 gsyncCount 
)

DESCRIPTION: This API returns an array of Sync device handles. A Sync device handle represents a single Sync device on the system.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[out]nvGSyncHandles-The caller provides an array of handles, which must contain at least NVAPI_MAX_GSYNC_DEVICES elements. The API will zero out the entire array and then fill in one or more handles. If an error occurs, the array is invalid.
[out]*gsyncCount-The caller provides the storage space. NvAPI_GSync_EnumSyncDevices sets *gsyncCount to indicate how many of the elements in the nvGSyncHandles[] array are valid. If an error occurs, *gsyncCount will be set to zero.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENTnvGSyncHandles or gsyncCount is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any Sync Device.
NVAPI_INTERFACE NvAPI_GSync_GetControlParameters ( __in NvGSyncDeviceHandle  hNvGSyncDevice,
__inout NV_GSYNC_CONTROL_PARAMS pGsyncControls 
)

DESCRIPTION: This API queries for sync control parameters as defined in NV_GSYNC_CONTROL_PARAMS.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]hNvGSyncDevice-The caller provides the handle of the Sync device for which to get parameters
[in,out]*pGsyncControls-The caller provides the storage space. NvAPI_GSync_GetControlParameters() populates *pGsyncControls with values.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENThNvGSyncDevice is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any Sync Device.
NVAPI_INTERFACE NvAPI_GSync_GetStatusParameters ( NvGSyncDeviceHandle  hNvGSyncDevice,
NV_GSYNC_STATUS_PARAMS pStatusParams 
)

DESCRIPTION: This API queries for sync status parameters as defined in NV_GSYNC_STATUS_PARAMS.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]hNvGSyncDeviceThe caller provides the handle of the GSync device for which to get parameters
[out]*pStatusParamsThe caller provides the storage space. NvAPI_GSync_GetStatusParameters populates *pStatusParams with values.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENThNvGSyncDevice is NULL / pStatusParams is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any GSync Device.
NVAPI_INTERFACE NvAPI_GSync_GetSyncStatus ( __in NvGSyncDeviceHandle  hNvGSyncDevice,
__in NvPhysicalGpuHandle  hPhysicalGpu,
__inout NV_GSYNC_STATUS status 
)

DESCRIPTION: This API queries the sync status of a GPU - timing, stereosync and sync signal availability.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]hNvGSyncDevice-Handle of the Sync device
[in]hPhysicalGpu-GPU to be queried for sync status.
[out]*status-The caller provides the storage space. NvAPI_GSync_GetSyncStatus() populates *status with values - timing, stereosync and signal availability. On error, *status is set to NULL.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENThNvGSyncDevice is NULL / SyncTarget is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any G-Sync Device.
NVAPI_INTERFACE NvAPI_GSync_GetTopology ( __in NvGSyncDeviceHandle  hNvGSyncDevice,
__inout_opt NvU32 gsyncGpuCount,
__inout_ecount_part_opt *,*gsyncGpuCount NV_GSYNC_GPU gsyncGPUs,
__inout_opt NvU32 gsyncDisplayCount,
__inout_ecount_part_opt *,*gsyncDisplayCount NV_GSYNC_DISPLAY gsyncDisplays 
)

DESCRIPTION: This API returns the topology for the specified Sync device.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]hNvGSyncDevice-The caller provides the handle for a Sync device for which the topology will be queried.
[in,out]gsyncGpuCount-It returns number of GPUs connected to Sync device
[in,out]gsyncGPUs-It returns info about GPUs connected to Sync device
[in,out]gsyncDisplayCount-It returns number of active displays that belongs to Sync device
[in,out]gsyncDisplays-It returns info about all active displays that belongs to Sync device

HOW TO USE: 1) make a call to get the number of GPUs connected OR displays synced through Sync device by passing the gsyncGPUs OR gsyncDisplays as NULL respectively. Both gsyncGpuCount and gsyncDisplayCount can be retrieved in same call by passing both gsyncGPUs and gsyncDisplays as NULL On call success: 2) Allocate memory based on gsyncGpuCount(for gsyncGPUs) and/or gsyncDisplayCount(for gsyncDisplays) then make a call to populate gsyncGPUs and/or gsyncDisplays respectively.

Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENThNvGSyncDevice is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any Sync Device.
NVAPI_INSUFFICIENT_BUFFERWhen the actual number of GPUs/displays in the topology exceed the number of elements allocated for SyncGPUs/SyncDisplays respectively.
NVAPI_INTERFACE NvAPI_GSync_QueryCapabilities ( __in NvGSyncDeviceHandle  hNvGSyncDevice,
__inout NV_GSYNC_CAPABILITIES pNvGSyncCapabilities 
)

DESCRIPTION: This API returns the capabilities of the Sync device.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]hNvGSyncDevice-The handle for a Sync device for which the capabilities will be queried.
[in,out]*pNvGSyncCapabilities-The caller provides the storage space. NvAPI_GSync_QueryCapabilities() sets *pNvGSyncCapabilities to the version and capabilities details of the Sync device If an error occurs, *pNvGSyncCapabilities will be set to NULL.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENThNvGSyncDevice is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any Sync Device.
NVAPI_INTERFACE NvAPI_GSync_SetControlParameters ( __in NvGSyncDeviceHandle  hNvGSyncDevice,
__inout NV_GSYNC_CONTROL_PARAMS pGsyncControls 
)

DESCRIPTION: This API sets control parameters as defined in NV_SYNC_CONTROL_PARAMS.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]hNvGSyncDevice-The caller provides the handle of the Sync device for which to get parameters
[in,out]*pGsyncControls-The caller provides NV_GSYNC_CONTROL_PARAMS. skew and startDelay will be updated to the applied values.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENThNvGSyncDevice is NULL.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any Sync Device.
NVAPI_SYNC_MASTER_NOT_FOUNDControl Parameters can only be set if there is a Sync Master enabled on the Gsync card.
NVAPI_INTERFACE NvAPI_GSync_SetSyncStateSettings ( __in NvU32  gsyncDisplayCount,
__in_ecount(gsyncDisplayCount) NV_GSYNC_DISPLAY pGsyncDisplays,
__in NvU32  flags 
)

DESCRIPTION: Sets a new sync state for the displays in system.

SUPPORTED OS: Windows 7 and higher

Since
Release: 313
Parameters
[in]gsyncDisplayCount-The number of displays in gsyncDisplays.
[in]pGsyncDisplays-The caller provides the structure containing all displays that need to be synchronized in the system. The displays that are not part of pGsyncDisplays, will be un-synchronized.
[in]flags-Reserved for future use.
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_INVALID_ARGUMENTIf the display topology or count not valid.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDThe queried Graphics system does not have any Sync Device.
NVAPI_INVALID_SYNC_TOPOLOGY1.If any mosaic grid is partial. 2.If timing(HVisible/VVisible/refreshRate) applied of any display is different. 3.If There is a across GPU mosaic grid in system and that is not a part of pGsyncDisplays.


Copyright (c) 2007-2019 NVIDIA Corporation. All rights reserved.

NVIDIA