![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.12.0 Release |
The NvMedia LDC NvSciSync API encompasses all NvMediaLDC NvSciSync handling functions.
Macros | |
#define | NVMEDIA_LDC_NVSCISYNC_VERSION_MAJOR 1 |
Major version number. More... | |
#define | NVMEDIA_LDC_NVSCISYNC_VERSION_MINOR 0 |
Minor version number. More... | |
#define | NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES (3) |
Maximum number of times NvMediaLDCInsertPreNvSciSyncFence() can be called before each NvMediaLDCProcess() call. More... | |
#define NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES (3) |
Maximum number of times NvMediaLDCInsertPreNvSciSyncFence() can be called before each NvMediaLDCProcess() call.
Definition at line 46 of file nvmedia_ldc_nvscisync.h.
#define NVMEDIA_LDC_NVSCISYNC_VERSION_MAJOR 1 |
Major version number.
Definition at line 38 of file nvmedia_ldc_nvscisync.h.
#define NVMEDIA_LDC_NVSCISYNC_VERSION_MINOR 0 |
Minor version number.
Definition at line 40 of file nvmedia_ldc_nvscisync.h.
NvMediaStatus NvMediaLDCFillNvSciSyncAttrList | ( | NvMediaLDC * | ldc, |
NvSciSyncAttrList | attrlist, | ||
NvMediaNvSciSyncClientType | clienttype | ||
) |
Gets NvMediaLDC specific NvSciSync attributes.
This function sets the following public attributes:
The application must not set this attribute.
[in] | ldc | An NvMedia LDC device handle. |
[out] | attrlist | A pointer to a structure where NvSciSync attributes are to be placed. |
[in] | clienttype | Indicates whether the attributes in attrlist are requested for an NvMediaLDC signaler or a waiter. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that attrlist was NULL, or any of the public attributes listed above were already set. |
NVMEDIA_STATUS_OUT_OF_MEMORY | indicates that there is not enough memory to perform the requested operation. |
NvMediaStatus NvMediaLDCGetEOFNvSciSyncFence | ( | NvMediaLDC * | ldc, |
NvSciSyncObj | eofnvscisyncobj, | ||
NvSciSyncFence * | eofnvscisyncfence | ||
) |
Get EOF NvSciSyncFence for an NvMediaLDCProcess() operation.
The EOF NvSciSyncFence associated with an NvMediaLDCBlit() operation is an NvSciSyncFence, and its expiry indicates that the corresponding NvMediaLDCBlit() operation has finished. NvMediaLDCGetEOFNvSciSyncFence() returns the EOF NvSciSyncFence associated with the last NvMediaLDCProcess() call.
If you use NvMediaLDCGetEOFNvSciSyncFence(), you must be call it after calling NvMediaLDCProcess().
For example, in this sequence of code:
expiry of eofnvscisyncfence indicates that the preceding NvMediaLDCBlit() operation has finished.
[in] | ldc | An NvMedia LDC device handle. |
[in] | eofnvscisyncobj | An EOF NvSciSyncObj associated with the NvSciSyncFence being requested. |
[out] | eofnvscisyncfence | A pointer to an EOF NvSciSyncFence. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that ldc was not a valid LDC handle, eofnvscisyncfence was NULL, or eofnvscisyncobj was not registered with LDC as type NVMEDIA_EOFSYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ type. |
NVMEDIA_STATUS_ERROR | indicates that this function was called before NvMediaLDCProcess() was called. |
NvMediaStatus NvMediaLDCInsertPreNvSciSyncFence | ( | NvMediaLDC * | ldc, |
const NvSciSyncFence * | prenvscisyncfence | ||
) |
Sets an NvSciSyncFence as a prefence for an NvMediaLDCProcess() operation.
If you use NvMediaLDCInsertPreNvSciSyncFence(), you must call it before calling NvMediaLDCProcess(). The following NvMediaLDCProcess() operation is assured to be started only after the expiry of the prenvscisyncfence.
For example, in this sequence of code:
The NvMediaLDCProcess() operation is assured to start only after the expiry of prenvscisyncfence.
You can set a maximum of NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES prefences by calling NvMediaLDCInsertPreNvSciSyncFence() before calling NvMediaLDCProcess(). After the NvMediaLDCProcess() call, all NvSciSyncFence objects previously inserted by NvMediaLDCInsertPreNvSciSyncFence() are removed, and are not reused for subsequent NvMediaLDCProcess() calls.
[in] | ldc | And NvMedia LDC device handle. |
[in] | prenvscisyncfence | A pointer to an NvSciSyncFence. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that ldc was not a valid LDC handle, prenvscisyncfence was NULL, or prenvscisyncfence was not generated with an NvSciSyncObj which was registered with LDC as either type NVMEDIA_PRESYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that this function was already called NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES or more times with the same LDC handle before an NvMediaLDCProcess() call. |
NvMediaStatus NvMediaLDCNvSciSyncGetVersion | ( | NvMediaVersion * | version | ) |
Gets version information for the NvMedia LDC NvSciSync library.
[out] | version | A pointer to a structure where version information is to be put. |
NvMediaStatus NvMediaLDCRegisterNvSciSyncObj | ( | NvMediaLDC * | ldc, |
NvMediaNvSciSyncObjType | syncobjtype, | ||
NvSciSyncObj | nvscisync | ||
) |
Registers an NvSciSyncObj with NvMediaLDC.
Every NvSciSyncObj (even duplicate objects) used by NvMediaLDC must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj may be passed in NvMediaLDCSetNvSciSyncObjforEOF(), NvMediaLDCGetEOFNvSciSyncFence(), and NvMediaLDCUnregisterNvSciSyncObj().
For a given NvMediaLDC handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only. For each NvMediaNvSciSyncObjType a maximum of 16 NvSciSyncObjs can be registered.
[in] | ldc | An NvMedia LDC device handle. |
[in] | syncobjtype | Determines how nvscisync is to be used by LDC. |
[in] | nvscisync | An NvSciSyncObj to be registered with LDC. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that ldc was NULL or syncobjtype was not a valid NvMediaNvSciSyncObjType. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that nvscisync is not a compatible NvSciSyncObj which NvMediaLDC can support. |
NVMEDIA_STATUS_ERROR | indicates that the maximum number of NvSciSyncObj objects are already registered for the given syncobjtype, or nvscisync is already registered for a different syncobjtype with the same LDC handle. |
NvMediaStatus NvMediaLDCSetNvSciSyncObjforEOF | ( | NvMediaLDC * | ldc, |
NvSciSyncObj | nvscisyncEOF | ||
) |
Sets an NvSciSyncObj to be used for a EOF NvSciSyncFence.
To use NvMediaLDCGetEOFNvSciSyncFence(), the application must call this function before it calls NvMediaLDCProcess().
This function currently may be called only once before each call to NvMediaLDCProcess(). The application may choose to call this function only once before the first NvMediaLDCProcess().
[in] | ldc | An NvMedia LDC device handle. |
[in] | nvscisyncEOF | A registered NvSciSyncObj which is to be associated with EOF NvSciSyncFence. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that ldc was NULL or that nvscisyncEOF was not registered with LDC as either type NVMEDIA_EOFSYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ. |
NvMediaStatus NvMediaLDCUnregisterNvSciSyncObj | ( | NvMediaLDC * | ldc, |
NvSciSyncObj | nvscisync | ||
) |
Unregisters an NvSciSyncObj with NvMediaLDC.
Every NvSciSyncObj registered with NvMediaLDC through NvMediaLDCRegisterNvSciSyncObj() must be unregistered before it may be destroyed by a call to NvMediaLDCDestroy(). Before the application calls this function it must ensure that any NvMediaLDCProcess() operation which uses this NvSciSyncObj has completed. The function's behavior is undefined if it is called while the NvSciSyncObj is in use by an NvMediaLDCProcess() operation.
[in] | ldc | An NvMedia LDC device handle. |
[in] | nvscisync | An NvSciSyncObj to be unregistered with LDC. |
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that ldc was NULL or nvscisync was not registered with LDC. |
NVMEDIA_STATUS_ERROR | indicates that ldc has been destroyed. |