NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NvSciBuf Object APIs

Detailed Description

List of APIs to create/operate on NvSciBufObj.

Functions

NvSciError NvSciBufObjDup (NvSciBufObj bufObj, NvSciBufObj *dupObj)
 Clones a NvSciBuf object. More...
 
NvSciError NvSciBufAttrListReconcileAndObjAlloc (NvSciBufAttrList attrListArray[], size_t attrListCount, NvSciBufObj *bufObj, NvSciBufAttrList *newConflictList)
 Reconcile the input unreconciled attribute list(s) into a new reconciled attribute list and allocate NvSciBuf object that meets all the constraints in the new reconciled attribute list. More...
 
void NvSciBufObjFree (NvSciBufObj bufObj)
 Destroys the NvSciBuf object, which frees any memory allocated for it. More...
 
NvSciError NvSciBufObjGetAttrList (NvSciBufObj bufObj, NvSciBufAttrList *bufAttrList)
 Retrieves the attribute list from an NvSciBuf object. More...
 
NvSciError NvSciBufObjGetCpuPtr (NvSciBufObj bufObj, void **ptr)
 Gets the CPU virtual address (VA) of the NvSciBufObj. More...
 
NvSciError NvSciBufObjGetConstCpuPtr (NvSciBufObj bufObj, const void **ptr)
 Gets the CPU virtual address (VA) of the NvSciBufObj. More...
 
NvSciError NvSciBufObjFlushCpuCacheRange (NvSciBufObj bufObj, uint64_t offset, uint64_t len)
 Flushes the given len bytes at starting offset offset in NvSciBufObj from all CPU-managed caches. More...
 
NvSciError NvSciBufObjAlloc (NvSciBufAttrList reconciledAttrList, NvSciBufObj *bufObj)
 Allocates an NvSciBuf object that meets all the constraints in the specified reconciled attribute list. More...
 

Function Documentation

NvSciError NvSciBufAttrListReconcileAndObjAlloc ( NvSciBufAttrList  attrListArray[],
size_t  attrListCount,
NvSciBufObj bufObj,
NvSciBufAttrList newConflictList 
)

Reconcile the input unreconciled attribute list(s) into a new reconciled attribute list and allocate NvSciBuf object that meets all the constraints in the new reconciled attribute list.

Parameters
[in]attrListArrayArray containing unreconciled attribute list(s) to reconcile.
[in]attrListCountThe number of unreconciled attribute list(s) in inputArray.
[out]bufObjNewly created NvSciBufObj.
[out]newConflictListUnreconciled attribute list consisting of the key/value pairs which caused the reconciliation failure. This field is populated only if the reconciliation failed.
Returns
NvSciError, the completion code of this operation:
NvSciError NvSciBufObjAlloc ( NvSciBufAttrList  reconciledAttrList,
NvSciBufObj bufObj 
)

Allocates an NvSciBuf object that meets all the constraints in the specified reconciled attribute list.

Parameters
[in]reconciledAttrListThe reconciled attribute list generated through NvSciBufAttrListReconcile().
[out]bufObjIdentifier representing NvSciBuf object.
Returns
NvSciError, the completion code of this operation:
NvSciError NvSciBufObjDup ( NvSciBufObj  bufObj,
NvSciBufObj dupObj 
)

Clones a NvSciBuf object.

Parameters
[in]bufObjThe NvSciBuf object to clone.
[out]dupObjA clone of the NvSciBuf object passed into the function.
Returns
NvSciError, the completion code of the operation:
NvSciError NvSciBufObjFlushCpuCacheRange ( NvSciBufObj  bufObj,
uint64_t  offset,
uint64_t  len 
)

Flushes the given len bytes at starting offset offset in NvSciBufObj from all CPU-managed caches.

Parameters
[in]bufObjNvSciBuf object to flush the memory of.
[in]offsetThe starting offset in memory of the NvSciBuf object.
[in]lenThe length (in bytes) to flush.
Returns
NvSciError, the completion code of this operation:
void NvSciBufObjFree ( NvSciBufObj  bufObj)

Destroys the NvSciBuf object, which frees any memory allocated for it.

Parameters
[in]bufObjThe NvSciBuf object to deallocate.
Returns
void
NvSciError NvSciBufObjGetAttrList ( NvSciBufObj  bufObj,
NvSciBufAttrList bufAttrList 
)

Retrieves the attribute list from an NvSciBuf object.

This validated attribute list was used to allocate the object.

Note: The retrieved attribute list from an NvSciBuf object is read-only, and the attribute values in the list cannot be modified using set attribute APIs. In addition, the retrieved attribute list must not be freed with NvSciBufAttrListFree.

Parameters
[in]bufObjThe NvSciBuf object to retrieve the attribute list from.
[out]bufAttrListA pointer to the retrieved attribute list.
Returns
NvSciError, the completion code of this operation:
NvSciError NvSciBufObjGetConstCpuPtr ( NvSciBufObj  bufObj,
const void **  ptr 
)

Gets the CPU virtual address (VA) of the NvSciBufObj.

The returned value cannot be modified.

Parameters
[in]bufObjThe buffer object to get the address of.
[out]ptrA const pointer to the CPU mapping of the NvSciBufObj.
Returns
NvSciError, the completion code of this operation:
NvSciError NvSciBufObjGetCpuPtr ( NvSciBufObj  bufObj,
void **  ptr 
)

Gets the CPU virtual address (VA) of the NvSciBufObj.

Parameters
[in]bufObjThe buffer object to get the address of.
[out]ptrA pointer to the CPU mapping of the NvSciBufObj.
Returns
NvSciError, the completion code of this operation: