Applications have two options to specify their intended permissions on the NvSciBufObj:
Option 1: Set the intended permissions to NvSciBufGeneralAttrKey_RequiredPerm attribute in the unreconciled attribute-list. If no permissions are specified by the application, NvSciBufAccessPerm_Readonly becomes default value.
Option 2: Set the intended permissions in the object export/import APIs.
The final permissions of the NvSciBufObj for an application is computed by NvSciBuf based on multiple factors explained below:
Applications that allocates the NvSciBufObj using NvSciBufObjAlloc or NvSciBufAttrListReconcileAndObjAlloc APIs will always get Read/Write permissions.
For applications importing the NvSciBufObj, the permissions are computed based the following: