The Vic Diagnostics NvSci API encompasses all Vic Diagnostics handling for NvSciSync related functions.
6
NvMediaStatus VicDiagnosticsFillNvSciSyncAttrList | ( | VicDiagnostics const *const | handle, |
NvSciSyncAttrList const | attrList, | ||
NvMediaNvSciSyncClientType const | clientType | ||
) |
Fills the Vic Diagnostics specific NvSciSync attributes.
This function updates the input NvSciSyncAttrList with values equivalent to the following public attribute key-values:
NvSciSyncAttrKey_RequiredPerm set to
NvSciSyncAttrKey_PrimitiveInfo set to
The application must not set these attributes for the same NvSciSyncAttrList that is passed to this function.
When clientType is NVMEDIA_SIGNALER or NVMEDIA_SIGNALER_WAITER, some of the attribute values returned in attrList are tied to the specific VicDiagnostics context instance passed in handle. NvSciSyncObjs created using such attribute values must not be used after the VicDiagnostics context instance has been destroyed.
[in] | handle | Pointer to the VicDiagnostics context. |
[out] | attrList | Pointer to an NvSciSyncAttrList struct that will be populated with the NvSciSync attributes. |
[in] | clientType | An NvMediaNvSciSyncClientType, to indicate whether the attributes filled should be for a waiter or a signaler. The value should be either:
|
NVMEDIA_STATUS_OK | Attributes filled successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The attributes have already been filled, or one of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_INVALID_STATE | The function was called in incorrect system state. |
NVMEDIA_STATUS_ERROR | An internal failure occurred when trying to populate the attribute list. |
Usage considerations
NvMediaStatus VicDiagnosticsGetEOFNvSciSyncFence | ( | VicDiagnostics const *const | handle, |
VicDiagnosticsResult const *const | result, | ||
NvSciSyncFence *const | syncFence | ||
) |
Gets an EOF NvSciSyncFence for an VicDiagnosticsExecute() operation.
The expiry of an EOF NvSciSyncFence associated with an VicDiagnosticsExecute() operation indicates that the corresponding VicDiagnosticsExecute() operation has finished.
To be able to get the EOF fence using this function, the NvSciSyncObj to be used for EOF event needs to have been set for the VicDiagnosticsParameters handle used with the VicDiagnosticsExecute() operation with VicDiagnosticsSetNvSciSyncObjforEOF().
For example, in this sequence of code:
expiry of syncFence indicates that the preceding VicDiagnosticsExecute() operation has finished.
For a given NvSciSyncObj used for the EOF event, the EOF fence for a VicDiagnosticsExecute() operation can be queried using this function only until the next operation using the same NvSciSyncObj for the EOF event is submitted. When more operations are submitted, the VicDiagnosticsResult structs for the previous operations are no longer considered valid by this function.
The fence returned in syncFence is tied to the specific VicDiagnostics context instance passed in handle and must not be used after the VicDiagnostics context instance has been destroyed.
This function will clear syncFence before updating and returning it's new value.
[in] | handle | Pointer to the VicDiagnostics context. |
[in] | result | Pointer to the VicDiagnosticsResult struct. |
[out] | syncFence | Pointer to an NvSciSyncFence that will be populated with the EOF fence. |
NVMEDIA_STATUS_OK | EOF fence returned successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | No NvSciSyncObj was set for the operation EOF event, or one of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_ERROR | An internal failure occurred when trying to get the fence object. |
Usage considerations
NvMediaStatus VicDiagnosticsInsertPreNvSciSyncFence | ( | VicDiagnostics const *const | handle, |
VicDiagnosticsParameters const | params, | ||
NvSciSyncFence const *const | syncFence | ||
) |
Insert an NvSciSyncFence as a pre-fence.
This function inserts the specified NvSciSyncFence as a pre-fence to the diagnostic operation. The VicDiagnosticsExecute() operation is started only after the expiry of the syncFence.
For example, in this sequence of code:
the VicDiagnosticsExecute () operation is assured to start only after the expiry of syncFence.
You can set a maximum of 16 prefences by calling VicDiagnosticsInsertPreNvSciSyncFence().
[in] | handle | Pointer to the VicDiagnostics context. |
[in] | params | An VicDiagnosticsParameters handle. |
[in] | syncFence | Pointer to an NvSciSyncFence. |
NVMEDIA_STATUS_OK | Pre-fence inserted successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The sync object or its duplicate is not registered as an PRESYNC type with Vic Diagnostics, or one of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_INSUFFICIENT_BUFFERING | Maximum number of registered pre-fences has been reached. |
NVMEDIA_STATUS_ERROR | An internal failure occurred when trying to insert the pre-fence. |
Usage considerations
NvMediaStatus VicDiagnosticsRegisterNvSciSyncObj | ( | VicDiagnostics const *const | handle, |
NvMediaNvSciSyncObjType const | syncObjType, | ||
NvSciSyncObj const | syncObj | ||
) |
Register an NvSciSyncObj with Vic Diagnostics.
Every NvSciSyncObj used by Vic Diagnostics must be registered by a call to this function before it is used. Also the NvSciSyncObjs associated with any NvSciSyncFences passed to VicDiagnosticsInsertPreNvSciSyncFence() must be registered.
[in] | handle | Pointer to the VicDiagnostics context. |
[in] | syncObjType | An NvMediaNvSciSyncClientType, to indicate what event the sync object will represent. Must be one of
|
[in] | syncObj | The NvSciSyncObj to be registered. |
NVMEDIA_STATUS_OK | Sync object registered successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | One of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_INSUFFICIENT_BUFFERING | Maximum number of registered sync objects has been reached. |
NVMEDIA_STATUS_INVALID_STATE | The function was called in incorrect system state. |
NVMEDIA_STATUS_ERROR | An internal failure occurred when trying to register the sync object. |
Usage considerations
NvMediaStatus VicDiagnosticsSetNvSciSyncObjforEOF | ( | VicDiagnostics const *const | handle, |
VicDiagnosticsParameters const | params, | ||
NvSciSyncObj const | syncObj | ||
) |
Specifies the NvSciSyncObj to be used for EOF event.
[in] | handle | Pointer to the VicDiagnostics context. |
[in] | params | An VicDiagnosticsParameters handle. |
[in] | syncObj | The NvSciSyncObj to be used for the EOF fence. |
NVMEDIA_STATUS_OK | EOF fence set successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The sync object or its duplicate is not registered as an EOF event type with Vic Diagnostics, or one of the parameters has an invalid value. This could be:
|
Usage considerations
NvMediaStatus VicDiagnosticsUnregisterNvSciSyncObj | ( | VicDiagnostics const *const | handle, |
NvSciSyncObj const | syncObj | ||
) |
Unregisters an NvSciSyncObj with VicDiagnostics.
Every NvSciSyncObj registered with VicDiagnostics by VicDiagnosticsRegisterNvSciSyncObj() must be unregistered before you call VicDiagnosticsDestroy().
Before the application calls this function, it must ensure that any VicDiagnosticsExecute() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any VicDiagnosticsExecute() operation, an error will be returned.
[in] | handle | Pointer to the VicDiagnostics context. |
[in] | syncObj | The NvSciSyncObj to be unregistered. |
NVMEDIA_STATUS_OK | Sync object unregistered successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | One of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_INVALID_STATE | The function was called in incorrect system state. |
NVMEDIA_STATUS_PENDING | The sync object is still being used by a pending operation. |
NVMEDIA_STATUS_ERROR | An internal failure occurred when trying to unregister the sync object. |
Usage considerations