Loading [MathJax]/extensions/MathMenu.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.10.0 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

    Detailed Description

    List of APIs to initialize/de-initialize NvSciBuf module.

    Functions

    NvSciError NvSciBufModuleOpen (NvSciBufModule *newModule)
     Initializes and returns a new NvSciBufModule with no NvSciBufAttrLists, buffers, or NvSciBufObjs bound to it. More...
     
    void NvSciBufModuleClose (NvSciBufModule module)
     Releases the NvSciBufModule obtained through an earlier call to NvSciBufModuleOpen(). More...
     
    NvSciError NvSciBufCheckVersionCompatibility (uint32_t majorVer, uint32_t minorVer, bool *isCompatible)
     Checks if loaded NvSciBuf library version is compatible with NvSciBuf library version with which elements dependent on NvSciBuf were built. More...
     
    NvSciError NvSciBufObjValidate (NvSciBufObj bufObj)
     Validates the NvSciBufObj satisfies the constraints of the NvSciBufAttrList that it is associated with. More...
     
    NvSciError NvSciBufAttrListValidateReconciledAgainstAttrs (const NvSciBufAttrList reconciledAttrList, const NvSciBufAttrKeyValuePair *pairArray, const size_t pairCount)
     Validate the reconciled NvSciBufAttrList against the set of all attributes that the user has set in the unreconciled NvSciBufAttrList(s). More...
     
    NvSciError NvSciBufObjGetMaxPerm (const NvSciBufObj bufObj, const NvSciIpcEndpoint ipcEndpoint, NvSciBufAttrValAccessPerm *accPerm)
     Retrieve the NvSciBufAttrValAccessPerm of an NvSciBufObj for given NvSciIpcEndpoint. More...
     

    Function Documentation

    ◆ NvSciBufAttrListValidateReconciledAgainstAttrs()

    NvSciError NvSciBufAttrListValidateReconciledAgainstAttrs ( const NvSciBufAttrList  reconciledAttrList,
    const NvSciBufAttrKeyValuePair pairArray,
    const size_t  pairCount 
    )

    Validate the reconciled NvSciBufAttrList against the set of all attributes that the user has set in the unreconciled NvSciBufAttrList(s).

    This API provides the safety mechanism to detect and report any reconciliation errors.

    Parameters
    [in]reconciledAttrListreconciled NvSciBufAttrList that need to be validated
    [in]pairArrayArray of NvSciBufAttrKeyValuePair structures that the user has used to set in the unreconciled NvSciBufAttrList. Valid value: pairArray is valid input if it is not NULL and key member of every NvSciBufAttrKeyValuePair in the array is a valid enumeration value defined by the NvSciBufAttrKey enum and value member of every NvSciBufAttrKeyValuePair in the array is not NULL.
    [in]pairCountNumber of elements/entries in pairArray. Valid value: pairCount is valid input if it is non-zero.
    Returns
    NvSciError, the completion code of the operation:
    • NvSciError_Success if successful.
    • NvSciError_InvalidState If the Init Mode API is called in Runtime Mode.
    • NvSciError_InsufficientMemory If any allocation of memory fails for validation.
    • NvSciError_BadParameter if any of the following occurs:
      • reconciledAttrList is NULL
      • pairArray is NULL
      • NvSciBufAttrKey specified in pairArray is invalid.
      • pairCount is 0.
    • NvSciError_AttrListValidationFailed indicates that reconciled NvSciBufAttrList is not valid against the user provided key value pair(s).

    panics if reconciledAttrList is invalid.

    Precondition
    @id{NvSciBufAttrListValidateReconciledAgainstAttrs_PreCond_001} @asil{B} Valid reconciled NvSciBufAttrList is obtained.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciBufCheckVersionCompatibility()

    NvSciError NvSciBufCheckVersionCompatibility ( uint32_t  majorVer,
    uint32_t  minorVer,
    bool *  isCompatible 
    )

    Checks if loaded NvSciBuf library version is compatible with NvSciBuf library version with which elements dependent on NvSciBuf were built.

    This function checks loaded NvSciBuf library version with input NvSciBuf library version and sets output variable true provided major version of the loaded library is same as majorVer and minor version of the loaded library is not less than minorVer. Additionally, this function also checks the versions of libraries that NvSciBuf depends on and sets the output variable to true if all libraries are compatible, else sets output to false.

    Parameters
    [in]majorVerbuild major version.
    [in]minorVerbuild minor version.
    [out]isCompatibleboolean value stating if loaded NvSciBuf library is compatible or not.
    Returns
    NvSciError, the completion code of the operation:
    • NvSciError_Success if successful.
    • NvSciError_InvalidState If the Init Mode API is called in Runtime Mode.
    • NvSciError_BadParameter if any of the following occurs:
      • isCompatible is NULL
    • failed to check dependent library versions.
    Precondition
    None


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciBufModuleClose()

    void NvSciBufModuleClose ( NvSciBufModule  module)

    Releases the NvSciBufModule obtained through an earlier call to NvSciBufModuleOpen().

    Once the NvSciBufModule is closed and all NvSciBufAttrLists and NvSciBufObjs bound to it are freed, the NvSciBufModule will be de-initialized in the calling process.

    Note
    Every owner of the NvSciBufModule shall call NvSciBufModuleClose() only after all the functions invoked by the owner with NvSciBufModule as an input are completed.
    Parameters
    [in]moduleThe NvSciBufModule to close.
    Returns
    void
    • Panic if:
      • if Init Mode API is called in Runtime Mode.
      • module is invalid
    Precondition
    @id{NvSciBufModuleClose_PreCond_001} @asil{QM} Valid NvSciBufModule is obtained.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Provided there is no active operation involving the input NvSciBufModule module
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciBufModuleOpen()

    NvSciError NvSciBufModuleOpen ( NvSciBufModule newModule)

    Initializes and returns a new NvSciBufModule with no NvSciBufAttrLists, buffers, or NvSciBufObjs bound to it.

    Note
    A process may call this function multiple times. Each successful invocation will yield a new NvSciBufModule.
    Parameters
    [out]newModuleThe new NvSciBufModule.
    Returns
    NvSciError, the completion code of this operation:
    • NvSciError_Success if successful.
    • NvSciError_InvalidState if the Init Mode API is called in Runtime Mode.
    • NvSciError_BadParameter if newModule is NULL.
    • NvSciError_InsufficientMemory if memory is not available.
    • NvSciError_ResourceError if any of the following occurs:
      • NVIDIA driver stack failed
      • system lacks resource other than memory
    Precondition
    None


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciBufObjGetMaxPerm()

    NvSciError NvSciBufObjGetMaxPerm ( const NvSciBufObj  bufObj,
    const NvSciIpcEndpoint  ipcEndpoint,
    NvSciBufAttrValAccessPerm accPerm 
    )

    Retrieve the NvSciBufAttrValAccessPerm of an NvSciBufObj for given NvSciIpcEndpoint.

    Application can use this API to ensure that when an NvSciBufObj is exported with NvSciBufAccessPerm_Auto, the NvSciBufObj will be exported with appropriate NvSciBufAttrValAccessPerm expected by the application.

    Parameters
    [in]bufObjUnused
    [in]ipcEndpointUnused
    [out]accPermUnused
    Returns
    NvSciError, the completion code of this operation:
    • NvSciError_Success
    Note
    This is a no-op.
    Usage considerations
    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciBufObjValidate()

    NvSciError NvSciBufObjValidate ( NvSciBufObj  bufObj)

    Validates the NvSciBufObj satisfies the constraints of the NvSciBufAttrList that it is associated with.

    Parameters
    [in]bufObjUnused
    Returns
    NvSciError, the completion code of this operation:
    • NvSciError_Success
    Note
    This is a no-op.
    Usage considerations
    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    人人超碰97caoporen国产