mirror of
git://nv-tegra.nvidia.com/tegra/nv-sci-src/nvsci_headers.git
synced 2025-12-22 09:23:12 +03:00
Updating prebuilts and/or headers
d9d6080242372fb0c778e6899a7375a31b3e81ec - nvscievent.h 90b2d50de948c0f2486fcfae0833370ea8a2d03f - nvscierror.h b1fdaed87816217d5fd18c1bfa0fef2b22071544 - nvsciipc.h e91fc7a9c1daab4c34970804792b70df556ee9f8 - nvsciipc.cfg 6b8809ed1b39dcb64c4da2f34ffee2aec10bb0b1 - nvscistream.h 60df71827224ad5951cf42d18b8005ad6f9a0399 - nvscistream_types.h cf44b50644b81af0652ac1b10205022f5ec8f77d - nvscisync.h c2219e53c743c6453b1a54ffec54bfce9907b571 - nvscistream_api.h 90ef3ca77c503806f61d0a2bfb283ad099cf5806 - nvscibuf.h Change-Id: I1743fc8850e3f90e9d1fc5c8c18e72e8a943fe97
This commit is contained in:
11
commitFile.txt
Normal file
11
commitFile.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Updating prebuilts and/or headers
|
||||
|
||||
d9d6080242372fb0c778e6899a7375a31b3e81ec - nvscievent.h
|
||||
90b2d50de948c0f2486fcfae0833370ea8a2d03f - nvscierror.h
|
||||
b1fdaed87816217d5fd18c1bfa0fef2b22071544 - nvsciipc.h
|
||||
e91fc7a9c1daab4c34970804792b70df556ee9f8 - nvsciipc.cfg
|
||||
6b8809ed1b39dcb64c4da2f34ffee2aec10bb0b1 - nvscistream.h
|
||||
60df71827224ad5951cf42d18b8005ad6f9a0399 - nvscistream_types.h
|
||||
cf44b50644b81af0652ac1b10205022f5ec8f77d - nvscisync.h
|
||||
c2219e53c743c6453b1a54ffec54bfce9907b571 - nvscistream_api.h
|
||||
90ef3ca77c503806f61d0a2bfb283ad099cf5806 - nvscibuf.h
|
||||
13
nvsci_headers_README.txt
Normal file
13
nvsci_headers_README.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# NVIDIA CORPORATION and its licensors retain all intellectual property
|
||||
# and proprietary rights in and to this software, related documentation
|
||||
# and any modifications thereto. Any use, reproduction, disclosure or
|
||||
# distribution of this software and related documentation without an express
|
||||
# license agreement from NVIDIA CORPORATION is strictly prohibited.
|
||||
|
||||
* nvsci_headers.tbz2 contains NvSci headers and a sample nvsciipc.cfg.
|
||||
* nvsciipc.cfg has to be put in /etc/.
|
||||
Use the below command to copy the file to /etc directory:
|
||||
$sudo cp ./nvsciipc.cfg /etc/nvsciipc.cfg
|
||||
4747
nvscibuf.h
Normal file
4747
nvscibuf.h
Normal file
File diff suppressed because it is too large
Load Diff
280
nvscierror.h
Normal file
280
nvscierror.h
Normal file
@@ -0,0 +1,280 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* NVIDIA Corporation and its licensors retain all intellectual property
|
||||
* and proprietary rights in and to this software, related documentation
|
||||
* and any modifications thereto. Any use, reproduction, disclosure or
|
||||
* distribution of this software and related documentation without an express
|
||||
* license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* <b> NVIDIA Software Communications Interface (SCI): Error Handling </b>
|
||||
*
|
||||
* @b Description: This file declares error codes for NvSci APIs.
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_NVSCI_ERROR_H
|
||||
#define INCLUDED_NVSCI_ERROR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup NvSciError SCI Error Handling
|
||||
*
|
||||
* Contains error code enumeration and helper macros.
|
||||
*
|
||||
* @ingroup nvsci_top
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Return/error codes for all NvSci functions.
|
||||
*
|
||||
* This enumeration contains unique return/error codes to identify the
|
||||
* source of a failure. Some errors have direct correspondence to standard
|
||||
* errno.h codes, indicated [IN BRACKETS], and may result from failures in
|
||||
* lower level system calls. Others indicate failures specific to misuse
|
||||
* of NvSci library function.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
/* Range 0x00000000 - 0x00FFFFFF : Common errors
|
||||
* This range is used for errors common to all NvSci libraries. */
|
||||
|
||||
/** [EOK] No error */
|
||||
NvSciError_Success = 0x00000000,
|
||||
|
||||
/** Unidentified error with no additional info */
|
||||
NvSciError_Unknown = 0x00000001,
|
||||
|
||||
/* Generic errors */
|
||||
/** [ENOSYS] Feature is not implemented */
|
||||
NvSciError_NotImplemented = 0x00000010,
|
||||
/** [ENOTSUP] Feature is not supported */
|
||||
NvSciError_NotSupported = 0x00000011,
|
||||
/** [EACCES] Access to resource denied */
|
||||
NvSciError_AccessDenied = 0x00000020,
|
||||
/** [EPERM] No permission to perform operation */
|
||||
NvSciError_NotPermitted = 0x00000021,
|
||||
/** Resource is in wrong state to perform operation */
|
||||
NvSciError_InvalidState = 0x00000022,
|
||||
/** Requested operation is not legal */
|
||||
NvSciError_InvalidOperation = 0x00000023,
|
||||
/** Required resource is not initialized */
|
||||
NvSciError_NotInitialized = 0x00000024,
|
||||
/** Requested resource is already in use */
|
||||
NvSciError_AlreadyInUse = 0x00000025,
|
||||
/** Operation has already been performed */
|
||||
NvSciError_AlreadyDone = 0x00000026,
|
||||
/** Resource/information not yet available */
|
||||
NvSciError_NotYetAvailable = 0x00000027,
|
||||
/** Resource/information no longer available */
|
||||
NvSciError_NoLongerAvailable = 0x00000028,
|
||||
/** [ENOMEM] Not enough memory */
|
||||
NvSciError_InsufficientMemory = 0x00000030,
|
||||
/** Not enough (non-memory) resources */
|
||||
NvSciError_InsufficientResource = 0x00000031,
|
||||
/** Resource failed */
|
||||
NvSciError_ResourceError = 0x00000032,
|
||||
|
||||
/* Function parameter errors */
|
||||
/** [EINVAL] Invalid parameter value */
|
||||
NvSciError_BadParameter = 0x00000100,
|
||||
/** [EFAULT] Invalid address */
|
||||
NvSciError_BadAddress = 0x00000101,
|
||||
/** [E2BIG] Parameter list too long */
|
||||
NvSciError_TooBig = 0x00000102,
|
||||
/** [EOVERFLOW] Value too large for data type */
|
||||
NvSciError_Overflow = 0x00000103,
|
||||
/** Parameters are inconsistent with each other or prior settings */
|
||||
NvSciError_InconsistentData = 0x00000104,
|
||||
/** Parameters or prior settings are insufficient */
|
||||
NvSciError_InsufficientData = 0x00000105,
|
||||
/** An index is not in the allowed range */
|
||||
NvSciError_IndexOutOfRange = 0x00000106,
|
||||
/** A value is not in the allowed range */
|
||||
NvSciError_ValueOutOfRange = 0x00000107,
|
||||
|
||||
/* Timing/temporary errors */
|
||||
/** [ETIMEDOUT] Operation timed out*/
|
||||
NvSciError_Timeout = 0x00000200,
|
||||
/** [EAGAIN] Resource unavailable. Try again. */
|
||||
NvSciError_TryItAgain = 0x00000201,
|
||||
/** [EBUSY] Resource is busy */
|
||||
NvSciError_Busy = 0x00000202,
|
||||
/** [EINTR] An interrupt ocurred */
|
||||
NvSciError_InterruptedCall = 0x00000203,
|
||||
|
||||
/* Device errors */
|
||||
/** [ENODEV] No such device */
|
||||
NvSciError_NoSuchDevice = 0x00001000,
|
||||
/** [ENOSPC] No space left on device */
|
||||
NvSciError_NoSpace = 0x00001001,
|
||||
/** [ENXIO] No such device or address */
|
||||
NvSciError_NoSuchDevAddr = 0x00001002,
|
||||
/** [EIO] Input/output error */
|
||||
NvSciError_IO = 0x00001003,
|
||||
/** [ENOTTY] Inappropriate I/O control operation */
|
||||
NvSciError_InvalidIoctlNum = 0x00001004,
|
||||
|
||||
/* File system errors */
|
||||
/** [ENOENT] No such file or directory*/
|
||||
NvSciError_NoSuchEntry = 0x00001100,
|
||||
/** [EBADF] Bad file descriptor */
|
||||
NvSciError_BadFileDesc = 0x00001101,
|
||||
/** [EBADFSYS] Corrupted file system detected */
|
||||
NvSciError_CorruptedFileSys = 0x00001102,
|
||||
/** [EEXIST] File already exists */
|
||||
NvSciError_FileExists = 0x00001103,
|
||||
/** [EISDIR] File is a directory */
|
||||
NvSciError_IsDirectory = 0x00001104,
|
||||
/** [EROFS] Read-only file system */
|
||||
NvSciError_ReadOnlyFileSys = 0x00001105,
|
||||
/** [ETXTBSY] Text file is busy */
|
||||
NvSciError_TextFileBusy = 0x00001106,
|
||||
/** [ENAMETOOLONG] File name is too long */
|
||||
NvSciError_FileNameTooLong = 0x00001107,
|
||||
/** [EFBIG] File is too large */
|
||||
NvSciError_FileTooBig = 0x00001108,
|
||||
/** [ELOOP] Too many levels of symbolic links */
|
||||
NvSciError_TooManySymbolLinks = 0x00001109,
|
||||
/** [EMFILE] Too many open files in process*/
|
||||
NvSciError_TooManyOpenFiles = 0x0000110A,
|
||||
/** [ENFILE] Too many open files in system */
|
||||
NvSciError_FileTableOverflow = 0x0000110B,
|
||||
/** End of file reached */
|
||||
NvSciError_EndOfFile = 0x0000110C,
|
||||
|
||||
|
||||
/* Communication errors */
|
||||
/** [ECONNRESET] Connection was closed or lost */
|
||||
NvSciError_ConnectionReset = 0x00001200,
|
||||
/** [EALREADY] Pending connection is already in progress */
|
||||
NvSciError_AlreadyInProgress = 0x00001201,
|
||||
/** [ENODATA] No message data available */
|
||||
NvSciError_NoData = 0x00001202,
|
||||
/** [ENOMSG] No message of the desired type available*/
|
||||
NvSciError_NoDesiredMessage = 0x00001203,
|
||||
/** [EMSGSIZE] Message is too large */
|
||||
NvSciError_MessageSize = 0x00001204,
|
||||
/** [ENOREMOTE] Remote node doesn't exist */
|
||||
NvSciError_NoRemote = 0x00001205,
|
||||
|
||||
/* Process/thread errors */
|
||||
/** [ESRCH] No such process */
|
||||
NvSciError_NoSuchProcess = 0x00002000,
|
||||
|
||||
/* Mutex errors */
|
||||
/** [ENOTRECOVERABLE] Mutex damaged by previous owner's death */
|
||||
NvSciError_MutexNotRecoverable = 0x00002100,
|
||||
/** [EOWNERDEAD] Previous owner died while holding mutex */
|
||||
NvSciError_LockOwnerDead = 0x00002101,
|
||||
/** [EDEADLK] Taking ownership would cause deadlock */
|
||||
NvSciError_ResourceDeadlock = 0x00002102,
|
||||
|
||||
/* NvSci attribute list errors */
|
||||
/** Could not reconcile attributes */
|
||||
NvSciError_ReconciliationFailed = 0x00010100,
|
||||
/** Could not validate attributes */
|
||||
NvSciError_AttrListValidationFailed = 0x00010101,
|
||||
|
||||
/** End of range for common error codes */
|
||||
NvSciError_CommonEnd = 0x00FFFFFF,
|
||||
|
||||
|
||||
/* Range 0x01000000 - 0x01FFFFFF : NvSciBuf errors */
|
||||
/** Unidentified NvSciBuf error with no additional info */
|
||||
NvSciError_NvSciBufUnknown = 0x01000000,
|
||||
/** End of range for NvSciBuf errors */
|
||||
NvSciError_NvSciBufEnd = 0x01FFFFFF,
|
||||
|
||||
|
||||
/* Range 0x02000000 - 0x02FFFFFF : NvSciSync errors */
|
||||
/** Unidentified NvSciSync error with no additional info */
|
||||
NvSciError_NvSciSyncUnknown = 0x02000000,
|
||||
/** Unsupported configuration */
|
||||
NvSciError_UnsupportedConfig = 0x02000001,
|
||||
/** Provided fence is cleared */
|
||||
NvSciError_ClearedFence = 0x02000002,
|
||||
/* End of range for NvScSync errors */
|
||||
NvSciError_NvSciSyncEnd = 0x02FFFFFF,
|
||||
|
||||
|
||||
/* Range 0x03000000 - 0x03FFFFFF : NvSciStream errors */
|
||||
|
||||
/** Unidentified NvSciStream error with no additional info */
|
||||
NvSciError_NvSciStreamUnknown = 0x03000000,
|
||||
/** Internal stream resource failure occurred */
|
||||
NvSciError_StreamInternalError = 0x03000001,
|
||||
/** Unrecognized block handle */
|
||||
NvSciError_StreamBadBlock = 0x03000100,
|
||||
/** Unrecognized packet handle */
|
||||
NvSciError_StreamBadPacket = 0x03000101,
|
||||
/** Invalid packet cookie value */
|
||||
NvSciError_StreamBadCookie = 0x03000102,
|
||||
/** Operation requires stream be fully connected */
|
||||
NvSciError_StreamNotConnected = 0x03000200,
|
||||
/** Operation can only be performed in setup phase */
|
||||
NvSciError_StreamNotSetupPhase = 0x03000201,
|
||||
/** Operation can only be performed in safety phase */
|
||||
NvSciError_StreamNotSafetyPhase = 0x03000202,
|
||||
/** No stream packet available */
|
||||
NvSciError_NoStreamPacket = 0x03001000,
|
||||
/** Referenced packet's current location does not allow this operation */
|
||||
NvSciError_StreamPacketInaccessible = 0x03001001,
|
||||
/** Internal error due to operation on deleted packet */
|
||||
NvSciError_StreamPacketDeleted = 0x03001002,
|
||||
/** Queried info not exist */
|
||||
NvSciError_StreamInfoNotProvided = 0x03003000,
|
||||
|
||||
/**
|
||||
* These stream errors represent failures detected from lower level
|
||||
* system components. They generally are not due to any user error,
|
||||
* but might be caused by the system running out of resources.
|
||||
*/
|
||||
/** Failed to acquire lock on mutex used to ensure thread safety */
|
||||
NvSciError_StreamLockFailed = 0x03400000,
|
||||
|
||||
/**
|
||||
* These stream errors represent internal failures which should never
|
||||
* be possible in a production system. They exist only for internal
|
||||
* unit testing.
|
||||
*/
|
||||
/** Invalid input index was passed to a block. */
|
||||
NvSciError_StreamBadSrcIndex = 0x03800000,
|
||||
/** Invalid output index was passed to a block. */
|
||||
NvSciError_StreamBadDstIndex = 0x03800001,
|
||||
|
||||
/** End of range for NvSciStream errors */
|
||||
NvSciError_NvSciStreamEnd = 0x03FFFFFF,
|
||||
|
||||
|
||||
/* Range 0x04000000 - 0x04FFFFFF : NvSciIpc errors */
|
||||
/** Unidentified NvSciIpc error with no additional info */
|
||||
NvSciError_NvSciIpcUnknown = 0x04000000,
|
||||
/** End of range for NvSciIpc errors */
|
||||
NvSciError_NvSciIpcEnd = 0x04FFFFFF,
|
||||
|
||||
|
||||
/* Range 0x05000000 - 0x05FFFFFF : NvSciEvent errors */
|
||||
/** Unidentified NvSciEvent error with no additional info */
|
||||
NvSciError_NvSciEventUnknown = 0x05000000,
|
||||
/** End of range for NvSciEvent errors */
|
||||
NvSciError_NvSciEventEnd = 0x05FFFFFF,
|
||||
|
||||
} NvSciError;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* INCLUDED_NVSCI_ERROR_H */
|
||||
599
nvscievent.h
Normal file
599
nvscievent.h
Normal file
@@ -0,0 +1,599 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* NVIDIA CORPORATION and its licensors retain all intellectual property
|
||||
* and proprietary rights in and to this software, related documentation
|
||||
* and any modifications thereto. Any use, reproduction, disclosure or
|
||||
* distribution of this software and related documentation without an express
|
||||
* license agreement from NVIDIA CORPORATION is strictly prohibited.
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_NVSCIEVENT_H
|
||||
#define INCLUDED_NVSCIEVENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <nvscierror.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief <b> NVIDIA Software Communications Interface (SCI) : NvSci Event Service </b>
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @defgroup nvsci_ipc_event Event Service APIs
|
||||
*
|
||||
* @ingroup nvsci_group_ipc
|
||||
* @{
|
||||
*
|
||||
* The NvSciEventService library provides the ability to build portable
|
||||
* event-driven applications.
|
||||
* An event is any significant occurrence or change in the state for system hardware
|
||||
* or software. An event notification is a message or notification sent by one
|
||||
* software part to another to convey that an event has taken place.
|
||||
* An event-driven model consists of an event producer and event consumers.
|
||||
* Once an event producer detects an event, it represents the event as
|
||||
* a message (or notification). An event is transmitted from an event producer to
|
||||
* event consumers through an OS-specific event channel.
|
||||
* Event consumers must be informed when an event has occurred.
|
||||
* NvSciEventService will execute the correct response (or callback)
|
||||
* to an event.
|
||||
*
|
||||
* NvSciEventService provides a mandatory abstract interface between
|
||||
* other SCI technologies (especially NvSciIpc and NvSciStreams) and
|
||||
* the application-provided event loop that services them.
|
||||
*
|
||||
* The following common object type(s) are implemented:
|
||||
*
|
||||
* - User-visible object types (for application use)
|
||||
* - NvSciEventService: An object that subsumes all state that commonly would
|
||||
* have been maintained in global variables.
|
||||
* - NvSciEventNotifier: An object that a library creates using an
|
||||
* NvSciEventService and then provides to the user, and with which the user
|
||||
* registers an event handler that is invoked whenever the library
|
||||
* generates an event.
|
||||
*
|
||||
* @if (SWDOCS_NVSCIIPC_INTERNAL)
|
||||
* - Non-user-visible object types (for integrating libraries with an
|
||||
* NvSciEventService)
|
||||
* - NvSciNativeEvent: An object that a library fills in with
|
||||
* environment-specific information that is necessary for an event service
|
||||
* to wait for environment-specific events (from OS or other event
|
||||
* producers).
|
||||
* - NvSciLocalEvent: An object with which a library can signal events
|
||||
* directly, without going through environment-specific mechanisms. Local
|
||||
* events are limited to cases where the signaler and waiter are in the
|
||||
* same process, but may be more efficient than environment-specific
|
||||
* notifiers (which typically pass through an OS).
|
||||
* @endif
|
||||
*
|
||||
* <b>Typical call flow with NvSciIpc library</b>
|
||||
*
|
||||
* 1) Init mode
|
||||
* - NvSciEventLoopServiceCreate()
|
||||
* - NvSciIpcInit()
|
||||
* - NvSciIpcOpenEndpointWithEventService()
|
||||
* - NvSciIpcGetEventNotifier()
|
||||
* - NvSciIpcGetEndpointInfo()
|
||||
* - NvSciIpcResetEndpoint()
|
||||
* - Ensure a channel is established
|
||||
* ~~~~~~~~~~~~~~~~~~~~~
|
||||
* loop {
|
||||
* NvSciIpcGetEvent()
|
||||
* if (event & NV_SCI_IPC_EVENT_CONN_EST_ALL) break
|
||||
* else {
|
||||
* NvSciEventLoopService::WaitForEvent()
|
||||
* or
|
||||
* NvSciEventLoopService::WaitForMultipleEvents()
|
||||
* }
|
||||
* }
|
||||
* ~~~~~~~~~~~~~~~~~~~~~
|
||||
* 2) Runtime mode (loop)
|
||||
* - NvSciIpcGetEvent()
|
||||
* - If an event is not desired,
|
||||
* NvSciEventLoopService::WaitForEvent()
|
||||
* or
|
||||
* NvSciEventLoopService::WaitForMultipleEvents()
|
||||
* - NvSciIpcRead() or NvSciIpcWrite()
|
||||
*
|
||||
* 3) Deinit mode
|
||||
* - If an eventNotifier is not required any more,
|
||||
* NvSciEventNotifier::Delete()
|
||||
* - NvSciIpcCloseEndpoint()
|
||||
* - NvSciIpcDeinit()
|
||||
* - NvSciEventService::Delete()
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* DATA TYPES */
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* \brief Infinite timeout for NvSciEventLoopService::WaitForEvent() or
|
||||
* NvSciEventLoopService::WaitForMultipleEvents().
|
||||
*/
|
||||
#define NV_SCI_EVENT_INFINITE_WAIT -1
|
||||
#define NV_SCI_EVENT_PRIORITIES 4
|
||||
|
||||
typedef struct NvSciEventService NvSciEventService;
|
||||
typedef struct NvSciEventNotifier NvSciEventNotifier;
|
||||
typedef struct NvSciEventLoopService NvSciEventLoopService;
|
||||
|
||||
/// @cond (SWDOCS_NVSCIIPC_INTERNAL)
|
||||
typedef struct NvSciNativeEvent NvSciNativeEvent;
|
||||
typedef struct NvSciLocalEvent NvSciLocalEvent;
|
||||
typedef struct NvSciTimerEvent NvSciTimerEvent;
|
||||
typedef struct NvSciEventLoop NvSciEventLoop;
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* \struct NvSciEventService
|
||||
* \brief An abstract interface for a program's event handling infrastructure.
|
||||
*
|
||||
* An NvSciEventService is an abstraction that a library can use to interact
|
||||
* with the event handling infrastructure of the containing program.
|
||||
*
|
||||
* If a library needs to handle asynchronous events or report asynchronous
|
||||
* events to its users, but the library does not wish to impose a threading
|
||||
* model on its users, the library can require each user to provide an
|
||||
* NvSciEventService when the user initializes the library (or a portion
|
||||
* thereof).
|
||||
*
|
||||
* An NvSciEventService provides two categories of services related to event
|
||||
* handling:
|
||||
*
|
||||
* (1) The ability to define "event notifiers", which are objects that can
|
||||
* notify event handling infrastructure each time an event has occurred.
|
||||
* Note that event notifications carry no payload; it is expected that any
|
||||
* event payload information is conveyed separately.
|
||||
*
|
||||
* (2) The ability to bind an "event handler" to each event notifier. An event
|
||||
* handler is essentially a callback that is invoked each time the bound
|
||||
* event notifier reports the occurrence of an event.
|
||||
*/
|
||||
struct NvSciEventService {
|
||||
/**
|
||||
* @if (SWDOCS_NVSCIIPC_INTERNAL)
|
||||
* \brief Defines an event notifier for a native notifier.
|
||||
*
|
||||
* @note This API is for internal use only.
|
||||
*
|
||||
* The new NvSciEventNotifier will report the occurrence of an event to
|
||||
* the event service each time the provided native notifier reports an
|
||||
* event from the OS environment.
|
||||
*
|
||||
* This function creates event notifier which reports the occurrence of
|
||||
* an event from the OS environment to the event service.
|
||||
* To configure the event bound to OS environment, it calls the function
|
||||
* in @a nativeEvent with the notifier pointer, which is a supported function
|
||||
* in the NvSciIpc library.
|
||||
*
|
||||
* @param[in] thisEventService NvSciEventService object pointer created by
|
||||
* NvSciEventLoopServiceCreate().
|
||||
* @param[in] nativeEvent NvSciNativeEvent object pointer.
|
||||
* @param[out] newEventNotifier NvSciEventNotifier object pointer on
|
||||
* success.
|
||||
*
|
||||
* @return ::NvSciError, the completion code of operations:
|
||||
* - ::NvSciError_Success Indicates a successful operation.
|
||||
* - ::NvSciError_InsufficientMemory Indicates memory is not sufficient.
|
||||
* - ::NvSciError_BadParameter Indicates an invalid input parameters.
|
||||
* - ::NvSciError_ResourceError Indicates not enough system resources.
|
||||
* - ::NvSciError_InvalidState Indicates an invalid operation state.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: Yes
|
||||
* - Runtime: No
|
||||
* - De-Init: No
|
||||
* @endif
|
||||
*/
|
||||
/// @cond (SWDOCS_NVSCIIPC_INTERNAL)
|
||||
NvSciError (*CreateNativeEventNotifier)(
|
||||
NvSciEventService* thisEventService,
|
||||
NvSciNativeEvent* nativeEvent,
|
||||
NvSciEventNotifier** newEventNotifier);
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* @if (SWDOCS_NVSCIIPC_INTERNAL)
|
||||
* \brief Creates an intra-process local event with an event notifier
|
||||
* that reports each event signaled through it.
|
||||
*
|
||||
* @note This API is for internal use only.
|
||||
*
|
||||
* @param[in] thisEventService NvSciEventService object pointer created by
|
||||
* NvSciEventLoopServiceCreate().
|
||||
* @param[out] newLocalEvent NvSciLocalEvent object pointer on
|
||||
* success.
|
||||
*
|
||||
* @return ::NvSciError, the completion code of operations:
|
||||
* - ::NvSciError_Success Indicates a successful operation.
|
||||
* - ::NvSciError_InsufficientMemory Indicates memory is not sufficient.
|
||||
* - ::NvSciError_BadParameter Indicates an invalid input parameter.
|
||||
* - ::NvSciError_InvalidState Indicates an invalid operation state.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: Yes
|
||||
* - Runtime: No
|
||||
* - De-Init: No
|
||||
* @endif
|
||||
*/
|
||||
/// @cond (SWDOCS_NVSCIIPC_INTERNAL)
|
||||
NvSciError (*CreateLocalEvent)(
|
||||
NvSciEventService* thisEventService,
|
||||
NvSciLocalEvent** newLocalEvent);
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* @if (SWDOCS_NVSCIIPC_NOTSUPPORT)
|
||||
* \brief Creates a timer event with an event notifier that reports each
|
||||
* event signaled through it.
|
||||
*
|
||||
* @note This API is not yet supported.
|
||||
*
|
||||
* @endif
|
||||
*/
|
||||
/// @cond (SWDOCS_NVSCIIPC_NOTSUPPORT)
|
||||
NvSciError (*CreateTimerEvent)(
|
||||
NvSciEventService* thisEventService,
|
||||
NvSciTimerEvent** newTimerEvent);
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* \brief Releases any resources associated with this event service.
|
||||
*
|
||||
* Before this member function is called, the caller must ensure that all
|
||||
* other member function calls on @a thisEventService have completed and the
|
||||
* caller must never again invoke any member functions on
|
||||
* @a thisEventService.
|
||||
*
|
||||
* If there any NvSciEventNotifier objects created from this event service that
|
||||
* have not been deleted yet, the resources allocated for this event
|
||||
* service will not necessarily be released until all those
|
||||
* NvSciEventNotifier objects are first deleted.
|
||||
*
|
||||
* There may also be implementation-specific conditions that result in a
|
||||
* delay in the release of resources.
|
||||
*
|
||||
* Release resources associated with NvSciEventService and NvSciEventService
|
||||
* which is created by NvSciEventLoopServiceCreate().
|
||||
*
|
||||
* @note This API must be called after releasing notifier and NvSciEventService is
|
||||
* no longer required.
|
||||
*
|
||||
* @param[in] thisEventService NvSciEventService object pointer created by
|
||||
* NvSciEventLoopServiceCreate().
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: No
|
||||
* - Runtime: No
|
||||
* - De-Init: Yes
|
||||
*/
|
||||
void (*Delete)(NvSciEventService* thisEventService);
|
||||
};
|
||||
|
||||
/**
|
||||
* \struct NvSciEventNotifier
|
||||
*
|
||||
* \brief An abstract interface to notify event to event consumer and
|
||||
* to register event handler of the event consumer client process.
|
||||
*/
|
||||
struct NvSciEventNotifier {
|
||||
/**
|
||||
* @if (SWDOCS_NVSCIIPC_NOTSUPPORT)
|
||||
* \brief Registers or unregisters a handler for a particular event notifier.
|
||||
*
|
||||
* @note This API is not yet supported.
|
||||
*
|
||||
* In general, handlers for distinct event notifiers may run
|
||||
* concurrently with one another. The NvSciEventService promises however
|
||||
* that no single event notifier will have its handler invoked concurrently.
|
||||
*
|
||||
* \param[in] eventNotifier The event notifier that reports each event. Must
|
||||
* not already be in use by another event loop.
|
||||
*
|
||||
* \param[in] callback The function to call to handle the event. If NULL,
|
||||
* handler will be unregistered.
|
||||
*
|
||||
* \param[in] cookie The parameter to pass to the callback.
|
||||
*
|
||||
* \param[in] priority The priority of the handler relative to other
|
||||
* handlers registered with eventLoop. Must be less
|
||||
* than @ref NV_SCI_EVENT_PRIORITIES.
|
||||
* @endif
|
||||
*/
|
||||
/// @cond (SWDOCS_NVSCIIPC_NOTSUPPORT)
|
||||
NvSciError (*SetHandler)(NvSciEventNotifier* thisEventNotifier,
|
||||
void (*callback)(void* cookie),
|
||||
void* cookie,
|
||||
uint32_t priority);
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* \brief Unregisters any previously-registered event handler and delete
|
||||
* this event notifier.
|
||||
*
|
||||
* If the event handler's callback is concurrently executing in another
|
||||
* thread, then this function will still return immediately, but the event
|
||||
* handler will not be deleted until after the callback returns.
|
||||
*
|
||||
* This function releases the NvSciEventNotifier and unregisters the event handler.
|
||||
* It should be called when the NvSciEventNotifier is no longer required.
|
||||
*
|
||||
* @param[in] thisEventNotifier The event handler to unregister and delete.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: No
|
||||
* - Runtime: No
|
||||
* - De-Init: Yes
|
||||
*/
|
||||
void (*Delete)(NvSciEventNotifier* thisEventNotifier);
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Creates a new event loop service. The number of event loops that can
|
||||
* be created in the new event loop service will be limited to at most
|
||||
* @a maxEventLoops.
|
||||
*
|
||||
* This function creates a new event loop service @a newEventLoopService which is
|
||||
* a primary instance of event service. An application must call event service
|
||||
* functions along with @a newEventLoopService.
|
||||
* The number of event loops that can be created in the new event loop service
|
||||
* will be limited to at most @a maxEventLoops.
|
||||
*
|
||||
* @param[in] maxEventLoops The number of event loops, it must be 1.
|
||||
* @param[out] newEventLoopService NvSciEventNotifier object double pointer.
|
||||
*
|
||||
* @return ::NvSciError, the completion code of operations:
|
||||
* - ::NvSciError_Success Indicates a successful operation.
|
||||
* - ::NvSciError_InsufficientMemory Indicates memory is not sufficient.
|
||||
* - ::NvSciError_NotSupported Indicates a condition is unsupported.
|
||||
* - ::NvSciError_InvalidState Indicates an invalid operation state.
|
||||
* - ::NvSciError_BadParameter Indicates an invalid or NULL argument.
|
||||
* - ::NvSciError_ResourceError Indicates not enough system resources.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: Yes
|
||||
* - Runtime: No
|
||||
* - De-Init: No
|
||||
*/
|
||||
NvSciError NvSciEventLoopServiceCreate(
|
||||
size_t maxEventLoops,
|
||||
NvSciEventLoopService** newEventLoopService);
|
||||
|
||||
/**
|
||||
* \struct NvSciEventLoopService
|
||||
|
||||
* \brief An abstract interface that event consumer can wait for
|
||||
* events using event notifier in event loop.
|
||||
*/
|
||||
struct NvSciEventLoopService {
|
||||
NvSciEventService EventService;
|
||||
|
||||
/**
|
||||
* @if (SWDOCS_NVSCIIPC_NOTSUPPORT)
|
||||
* \brief Creates an event loop that can handle events for NvSciEventLoopService.
|
||||
*
|
||||
* @note This API is not yet supported.
|
||||
*
|
||||
* The user is responsible for running the event loop from a thread by
|
||||
* calling the new event loop's Run() function.
|
||||
* @endif
|
||||
*/
|
||||
/// @cond (SWDOCS_NVSCIIPC_NOTSUPPORT)
|
||||
NvSciError (*CreateEventLoop)(NvSciEventLoopService* eventLoopService,
|
||||
NvSciEventLoop** eventLoop);
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* \brief Waits up to a configurable timeout for a particular event
|
||||
* notification, servicing events with configured callbacks in the interim.
|
||||
*
|
||||
* Any asynchronous event notifiers that are pending before calling
|
||||
* this function will be claimed by some thread for handling before
|
||||
* this function returns.
|
||||
*
|
||||
* @a eventNotifier must have been created through EventService.
|
||||
*
|
||||
* @note This function must not be called from an event notifier
|
||||
* callback.
|
||||
*
|
||||
* This function waits up to a configurable timeout to receive a pulse event
|
||||
* which is configured on NvSciQnxEventService_CreateNativeEventNotifier().
|
||||
* @a eventNotifier must have been created through EventService before calling.
|
||||
*
|
||||
* @param[in] eventNotifier NvSciEventNotifier object pointer.
|
||||
* @param[in] microseconds A 64-bit integer timeout in microsecond.
|
||||
* Set to -1 for an infinite timeout, for example,
|
||||
* the value @ref NV_SCI_EVENT_INFINITE_WAIT.
|
||||
*
|
||||
* @return ::NvSciError, the completion code of operations:
|
||||
* - ::NvSciError_Success Indicates a successful operation.
|
||||
* - ::NvSciError_BadParameter Indicates an invalid input parameter.
|
||||
* - ::NvSciError_InvalidState Indicates an invalid operation state.
|
||||
* - ::NvSciError_NotSupported Indicates a condition is unsupported.
|
||||
* - ::NvSciError_Timeout Indicates a timeout occurrence.
|
||||
* - ::NvSciError_ResourceError Indicates not enough system resources.
|
||||
* - ::NvSciError_InterruptedCall Indicates an interrupt occurred.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: No
|
||||
* - Runtime: Yes
|
||||
* - De-Init: No
|
||||
*/
|
||||
NvSciError (*WaitForEvent)(
|
||||
NvSciEventNotifier* eventNotifier,
|
||||
int64_t microseconds);
|
||||
|
||||
/**
|
||||
* \brief Waits up to a configurable timeout for any of a set of
|
||||
* particular event notifications, servicing events with configured
|
||||
* callbacks in the interim.
|
||||
*
|
||||
* Any asynchronous event notifiers that are pending before calling
|
||||
* this function will be claimed by some thread for handling before
|
||||
* this function returns.
|
||||
*
|
||||
* Each event notifier in @a eventNotifierArray must have been created
|
||||
* through EventService.
|
||||
*
|
||||
* On a successful return, for each integer `i` in the range
|
||||
* `[0, eventNotifierCount-1]`, `newEventArray[i]` will be true only if
|
||||
* `eventNotifierArray[i]` had a new event.
|
||||
*
|
||||
* @note This function must not be called from an event notifier
|
||||
* callback.
|
||||
* @note This function will be deprecated in furture and user must use
|
||||
* the newer version of the API which is
|
||||
* NvSciEventWaitForMultipleEventsExt
|
||||
*
|
||||
* @param[in] eventNotifierArray Array of NvSciEventNotifier object
|
||||
* pointers.
|
||||
* @param[in] eventNotifierCount Event notifier count in eventNotifierArray.
|
||||
* @param[in] microseconds A 64-bit integer timeout in microsecond.
|
||||
* Set to -1 for infinite timeout, for example,
|
||||
* the value @ref NV_SCI_EVENT_INFINITE_WAIT.
|
||||
* @param[out] newEventArray Array of event occurrence.
|
||||
*
|
||||
* @return ::NvSciError, the completion code of operations:
|
||||
* - ::NvSciError_Success Indicates a successful operation.
|
||||
* - ::NvSciError_BadParameter Indicates an invalid input parameter.
|
||||
* - ::NvSciError_InvalidState Indicates an invalid operation state.
|
||||
* - ::NvSciError_NotSupported Indicates a condition is not supported.
|
||||
* - ::NvSciError_Timeout Indicates a timeout occurrence.
|
||||
* - ::NvSciError_ResourceError Indicates not enough system resources.
|
||||
* - ::NvSciError_InterruptedCall Indicates an interrupt occurred.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: No
|
||||
* - Runtime: Yes
|
||||
* - De-Init: No
|
||||
*/
|
||||
NvSciError (*WaitForMultipleEvents)(
|
||||
NvSciEventNotifier* const * eventNotifierArray,
|
||||
size_t eventNotifierCount,
|
||||
int64_t microseconds,
|
||||
bool* newEventArray);
|
||||
|
||||
|
||||
#ifdef LINUX
|
||||
/**
|
||||
* \brief Waits up to a configurable timeout for any of a set of
|
||||
* particular event notifications, servicing events with configured
|
||||
* callbacks in the interim.
|
||||
*
|
||||
* Any asynchronous event notifiers that are pending before calling
|
||||
* this function will be claimed by some thread for handling before
|
||||
* this function returns.
|
||||
*
|
||||
* Each event notifier in @a eventNotifierArray must have been created
|
||||
* through EventService.
|
||||
*
|
||||
* On a successful return, for each integer `i` in the range
|
||||
* `[0, eventNotifierCount-1]`, `newEventArray[i]` will be true only if
|
||||
* `eventNotifierArray[i]` had a new event.
|
||||
*
|
||||
* @note This function must not be called from an event notifier
|
||||
* callback.
|
||||
*
|
||||
* @param[in] eventService Pointer to the event service object
|
||||
* @param[in] eventNotifierArray Array of NvSciEventNotifier object
|
||||
* pointers.
|
||||
* @param[in] eventNotifierCount Event notifier count in eventNotifierArray.
|
||||
* @param[in] microseconds A 64-bit integer timeout in microsecond.
|
||||
* Set to -1 for infinite timeout, for example,
|
||||
* the value @ref NV_SCI_EVENT_INFINITE_WAIT.
|
||||
* @param[out] newEventArray Array of event occurrence.
|
||||
*
|
||||
* @return ::NvSciError, the completion code of operations:
|
||||
* - ::NvSciError_Success Indicates a successful operation.
|
||||
* - ::NvSciError_BadParameter Indicates an invalid input parameter.
|
||||
* - ::NvSciError_InvalidState Indicates an invalid operation state.
|
||||
* - ::NvSciError_NotSupported Indicates a condition is not supported.
|
||||
* - ::NvSciError_Timeout Indicates a timeout occurrence.
|
||||
* - ::NvSciError_ResourceError Indicates not enough system resources.
|
||||
* - ::NvSciError_InterruptedCall Indicates an interrupt occurred.
|
||||
*
|
||||
* @usage
|
||||
* - Allowed context for the API call
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread-safe: Yes
|
||||
* - Async/Sync: Sync
|
||||
* - Required Privileges(QNX): None
|
||||
* - API Group
|
||||
* - Init: No
|
||||
* - Runtime: Yes
|
||||
* - De-Init: No
|
||||
*/
|
||||
NvSciError (*WaitForMultipleEventsExt)(
|
||||
NvSciEventService *eventService,
|
||||
NvSciEventNotifier* const * eventNotifierArray,
|
||||
size_t eventNotifierCount,
|
||||
int64_t microseconds,
|
||||
bool* newEventArray);
|
||||
#endif /* LINUX */
|
||||
};
|
||||
|
||||
/** @} <!-- End nvsci_ipc_event --> */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* INCLUDED_NVSCIEVENT_H */
|
||||
80
nvsciipc.cfg
Normal file
80
nvsciipc.cfg
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Format of NvSciIpc Config file
|
||||
#
|
||||
# First column should specify the backend. All possible backend types
|
||||
# are listed below:
|
||||
# INTER_THREAD, INTER_PROCESS, INTER_VM, INTER_CHIP
|
||||
#
|
||||
# For INTER_THREAD/PROCESS backend type, format will be:
|
||||
# <backend_type> <endpoint1_name> <endpoint2_name> <backend_info1> <backend_info2>
|
||||
#
|
||||
# For INTER_THREAD and INTER_PROCESS, two endpoints name should be different.
|
||||
# You can use different suffix with basename for them. <backend_info1> denotes
|
||||
# "number of frames" and <backend_info2> denotes "frame size"
|
||||
#
|
||||
# For INTER_VM/CHIP backend type, format will be:
|
||||
# <backend_type> <endpoint_name> <backend_info1>
|
||||
#
|
||||
# For INTER_CHIP optional backend info is derive with below rule:
|
||||
# <xfer_role><device_id>
|
||||
# Both should be written as two digit decimal number.
|
||||
# eg: device_id = 5, xfer_role = producer
|
||||
# backend info: 0105
|
||||
#
|
||||
# For INTER_VM backend type, BACKEND_INFO1 denotes ivc queue number
|
||||
#
|
||||
# This is NvSciIpc CFG file for x86 machine, so only 3 backends are supported
|
||||
# as of now : INTER_PROCESS, INTER_THREAD and INTER_CHIP
|
||||
INTER_PROCESS ipc_test_0 ipc_test_1 64 1536
|
||||
INTER_PROCESS ipc_test_a_0 ipc_test_a_1 64 1536
|
||||
INTER_PROCESS ipc_test_b_0 ipc_test_b_1 64 1536
|
||||
INTER_PROCESS ipc_test_c_0 ipc_test_c_1 64 1536
|
||||
INTER_THREAD itc_test_0 itc_test_1 64 1536
|
||||
INTER_PROCESS nvscistream_0 nvscistream_1 16 24576
|
||||
INTER_PROCESS nvscistream_2 nvscistream_3 16 24576
|
||||
INTER_PROCESS nvscistream_4 nvscistream_5 16 24576
|
||||
INTER_PROCESS nvscistream_6 nvscistream_7 16 24576
|
||||
INTER_PROCESS nvscisync_a_0 nvscisync_a_1 16 24576
|
||||
INTER_PROCESS nvscisync_b_0 nvscisync_b_1 16 24576
|
||||
INTER_PROCESS nvscisync_c_0 nvscisync_c_1 16 24576
|
||||
INTER_PROCESS nvscisync_d_0 nvscisync_d_1 16 24576
|
||||
INTER_PROCESS nvscibuf_ipc_A_B nvscibuf_ipc_B_A 16 24576
|
||||
INTER_PROCESS nvscibuf_ipc_B_C nvscibuf_ipc_C_B 16 24576
|
||||
INTER_PROCESS nvscibuf_ipc_A_D nvscibuf_ipc_D_A 16 24576
|
||||
INTER_PROCESS nvscibuf_ipc_B_E nvscibuf_ipc_E_B 16 24576
|
||||
INTER_PROCESS nvmap_sciipc_1 nvmap_sciipc_2 16 24576
|
||||
INTER_PROCESS nvmap_sciipc_3 nvmap_sciipc_4 16 24576
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_1 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_2 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_3 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_4 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_5 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_6 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_7 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_8 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_9 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_10 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c5_11 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_1 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_2 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_3 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_4 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_5 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_6 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_7 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_8 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_9 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_10 0000
|
||||
INTER_CHIP nvscic2c_pcie_s0_c6_11 0000
|
||||
INTER_CHIP egl_nvscic2c_5_prod 0105
|
||||
INTER_CHIP egl_nvscic2c_5_cons 1005
|
||||
INTER_CHIP egl_nvscic2c_6_prod 0106
|
||||
INTER_CHIP egl_nvscic2c_6_cons 1006
|
||||
INTER_CHIP egl_nvscic2c_7_prod 0107
|
||||
INTER_CHIP egl_nvscic2c_7_cons 1007
|
||||
INTER_CHIP egl_nvscic2c_8_prod 0108
|
||||
INTER_CHIP egl_nvscic2c_8_cons 1008
|
||||
INTER_CHIP egl_nvscic2c_9_prod 0109
|
||||
INTER_CHIP egl_nvscic2c_9_cons 1009
|
||||
1246
nvsciipc.h
Normal file
1246
nvsciipc.h
Normal file
File diff suppressed because it is too large
Load Diff
31
nvscistream.h
Normal file
31
nvscistream.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
* proprietary rights in and to this software, related documentation and any
|
||||
* modifications thereto. Any use, reproduction, disclosure or distribution
|
||||
* of this software and related documentation without an express license
|
||||
* agreement from NVIDIA Corporation is strictly prohibited.
|
||||
*/
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief <b> NVIDIA Software Communications Interface (SCI) : NvSciStream </b>
|
||||
*
|
||||
* The NvSciStream library is a layer on top of NvSciBuf and NvSciSync libraries
|
||||
* to provide utilities for streaming sequences of data packets between
|
||||
* multiple application modules to support a wide variety of use cases.
|
||||
*/
|
||||
#ifndef NVSCISTREAM_H
|
||||
#define NVSCISTREAM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nvscistream_api.h"
|
||||
#include "nvscistream_types.h"
|
||||
|
||||
#endif /* NVSCISTREAM_H */
|
||||
2675
nvscistream_api.h
Normal file
2675
nvscistream_api.h
Normal file
File diff suppressed because it is too large
Load Diff
472
nvscistream_types.h
Normal file
472
nvscistream_types.h
Normal file
@@ -0,0 +1,472 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2022 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
* proprietary rights in and to this software, related documentation and any
|
||||
* modifications thereto. Any use, reproduction, disclosure or distribution
|
||||
* of this software and related documentation without an express license
|
||||
* agreement from NVIDIA Corporation is strictly prohibited.
|
||||
*/
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief <b> NVIDIA Software Communications Interface (SCI) : NvSciStream </b>
|
||||
*
|
||||
* The NvSciStream library is a layer on top of NvSciBuf and NvSciSync libraries
|
||||
* to provide utilities for streaming sequences of data packets between
|
||||
* multiple application modules to support a wide variety of use cases.
|
||||
*/
|
||||
#ifndef NVSCISTREAM_TYPES_H
|
||||
#define NVSCISTREAM_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "nvscierror.h"
|
||||
#include "nvscibuf.h"
|
||||
#include "nvscisync.h"
|
||||
#include "nvsciipc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Temporary comment out some c2c code, which can be re-enable after
|
||||
* swtiching the C2C block to use NvSciEvent model
|
||||
*/
|
||||
#define C2C_EVENT_SERVICE 0
|
||||
|
||||
/**
|
||||
* @defgroup nvsci_stream_data_types NvSciStream Data Types
|
||||
*
|
||||
* Contains a list of NvSciStream datatypes.
|
||||
*
|
||||
* @ingroup nvsci_stream
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*! \brief Handle to a block.*/
|
||||
typedef uintptr_t NvSciStreamBlock;
|
||||
|
||||
/*! \brief NvSciStream assigned handle for a packet.*/
|
||||
typedef uintptr_t NvSciStreamPacket;
|
||||
|
||||
/*! \brief Application assigned cookie for a
|
||||
* NvSciStreamPacket.
|
||||
*/
|
||||
typedef uintptr_t NvSciStreamCookie;
|
||||
|
||||
/*! \brief Constant variable denoting an invalid
|
||||
* NvSciStreamPacket.
|
||||
*
|
||||
* \implements{19620996}
|
||||
*/
|
||||
static const NvSciStreamPacket NvSciStreamPacket_Invalid = 0U;
|
||||
|
||||
/*! \brief Constant variable denoting an invalid
|
||||
* NvSciStreamCookie.
|
||||
*
|
||||
* \implements{19620999}
|
||||
*/
|
||||
static const NvSciStreamCookie NvSciStreamCookie_Invalid = 0U;
|
||||
|
||||
/**
|
||||
* \cond Non-doxygen comment
|
||||
* page nvsci_stream_logical_data_types NvSciStream logical data types
|
||||
* section NvSciStream logical data types
|
||||
* Block: A block is a modular portion of a stream which resides
|
||||
* in a single process and manages one aspect of the stream's
|
||||
* behavior. Blocks are connected together in a tree to form
|
||||
* arbitrary streams.
|
||||
*
|
||||
* NvSciStream supports the following types of blocks:
|
||||
* - Producer: Producer is a type of block responsible for
|
||||
* generating stream data. Each stream begins with a producer
|
||||
* block, it is also referred to as the upstream endpoint of the
|
||||
* stream.
|
||||
*
|
||||
* - Consumer: Consumer is a type of block responsible for
|
||||
* processing stream data. Each stream ends with one or
|
||||
* more consumer blocks, it is also referred to as the
|
||||
* downstream endpoint of the stream.
|
||||
*
|
||||
* - Pool: Pool is a type of block containing the set of
|
||||
* packets available for use by @a Producer. NvSciStream
|
||||
* supports only a static pool in which the number of
|
||||
* packets managed by the pool is fixed when the pool
|
||||
* is created.
|
||||
*
|
||||
* - Queue: Queue is a type of block containing set of
|
||||
* packets available for use by @a Consumer.
|
||||
* NvSciStream supports two types of queue blocks:
|
||||
* - Fifo: A Fifo Queue block is used when all
|
||||
* packets must be acquired by the consumer in
|
||||
* the order received. Packets will wait in the FIFO
|
||||
* until the consumer acquires them.
|
||||
* - Mailbox: Mailbox Queue block is used when the consumer
|
||||
* should acquire the most recent data. If a new
|
||||
* packet is inserted in the mailbox when one
|
||||
* is already waiting, the previous one will be skipped
|
||||
* and its buffers will immediately be returned to the
|
||||
* Producer for reuse.
|
||||
*
|
||||
* - Multicast: Multicast is a type of block which is responsible
|
||||
* for connecting separate pipelines when a stream has more than
|
||||
* one Consumer.
|
||||
*
|
||||
* - IpcSrc - IpcSrc is a type of block which is the upstream
|
||||
* half of an IPC block pair which allows NvSciSyncObj waiter
|
||||
* requirements, NvSciSyncObj(s), packet element
|
||||
* information and packets to be transmitted to or received from
|
||||
* the downstream half of the stream which resides in another
|
||||
* process.
|
||||
*
|
||||
* - IpcDst - IpcDst is a type of block which is the downstream
|
||||
* half of an IPC block pair which allows NvSciSyncObj waiter
|
||||
* requirements, NvSciSyncObj(s), packet element
|
||||
* information and packets to be transmitted to or received from
|
||||
* the upstream half of the stream which resides in another process.
|
||||
*
|
||||
* Packet: A packet represents a set of NvSciBufObjs containing stream
|
||||
* data, each NvSciBufObj it contains is also referred to as an element
|
||||
* of the packet.
|
||||
* \endcond
|
||||
*/
|
||||
|
||||
/*! \brief Defines NvSciStream attributes that are queryable.
|
||||
*
|
||||
* \implements{19621074}
|
||||
*/
|
||||
typedef enum {
|
||||
/*! \brief Maximum number of elements allowed per packet. */
|
||||
NvSciStreamQueryableAttrib_MaxElements = 0x000000,
|
||||
/*! \brief Maximum number of NvSciSyncObjs allowed. */
|
||||
NvSciStreamQueryableAttrib_MaxSyncObj = 0x000001,
|
||||
/*! \brief Maximum number of multicast outputs allowed. */
|
||||
NvSciStreamQueryableAttrib_MaxMulticastOutputs = 0x000002
|
||||
} NvSciStreamQueryableAttrib;
|
||||
|
||||
/*! \brief Most queries on one block request information received from
|
||||
*! another block. Where there is ambiguity in the kind of block the
|
||||
*! information originated from, this type is used to specify it.
|
||||
*/
|
||||
typedef enum {
|
||||
/*! \brief Query information received from the producer */
|
||||
NvSciStreamBlockType_Producer,
|
||||
/*! \brief Query information received from a consumer */
|
||||
NvSciStreamBlockType_Consumer,
|
||||
/*! \brief Query information received from the pool */
|
||||
NvSciStreamBlockType_Pool
|
||||
} NvSciStreamBlockType;
|
||||
|
||||
/*! \brief Setup information will be broken into several distinct groups,
|
||||
*! with restrictions on when they can be specified and queried. The
|
||||
*! application will indicate when each group has been fully specified
|
||||
*! and is ready to send (for *Export groups) or when it has finished
|
||||
*! querying the group and the driver can reclaim space and allow dependent
|
||||
*! operations to proceed (for *Import groups).
|
||||
*/
|
||||
typedef enum {
|
||||
/*! \brief Specification of element-related support.
|
||||
*
|
||||
* In the producer and consumer(s), this group contains the list of
|
||||
* elements supported by the endpoint. Marking this complete causes
|
||||
* the list to be sent to the pool.
|
||||
*
|
||||
* In the pool, this group contains the list of elements which will
|
||||
* be used for the final packet layout. Marking this complete causes
|
||||
* the list to be sent to the producer and consumer(s). This group of
|
||||
* operations are not supported on the secondary pool.
|
||||
*
|
||||
* When element export is complete, the following functions are no longer
|
||||
* available on the block:
|
||||
* - NvSciStreamBlockElementAttrSet()
|
||||
*
|
||||
* When element export is complete, the following functions become
|
||||
* available on the pool:
|
||||
* - NvSciStreamPoolPacketCreate()
|
||||
* - NvSciStreamPoolPacketInsertBuffer()
|
||||
* - NvSciStreamPoolPacketComplete()
|
||||
* - NvSciStreamPoolPacketStatusAcceptGet()
|
||||
* - NvSciStreamPoolPacketStatusValueGet()
|
||||
*/
|
||||
NvSciStreamSetup_ElementExport = 0x0001,
|
||||
|
||||
/*! \brief Processing of element-related support
|
||||
*
|
||||
* In the pool, this group contains the lists of supported elements sent by
|
||||
* the producer and consumer(s). Marking this complete releases resources
|
||||
* associated with these lists. This must be completed before element
|
||||
* export can complete.
|
||||
*
|
||||
* In the producer and consumer(s), this group contains the list of
|
||||
* elements sent by the pool for use in the final packet layout, as
|
||||
* well as the flags tracking whether the block uses each element (for
|
||||
* consumers only). Marking this complete releases resources associated
|
||||
* with the element list, sends the usage list through the stream for
|
||||
* use in optimization, and unblocks any pending
|
||||
* NvSciStreamEventType_PacketCreate events waiting at the block.
|
||||
*
|
||||
* When element import is complete, the following functions are no longer
|
||||
* available on the block:
|
||||
* - NvSciStreamBlockElementCountGet()
|
||||
* - NvSciStreamBlockElementAttrGet()
|
||||
* - NvSciStreamBlockElementUsageSet()
|
||||
*/
|
||||
NvSciStreamSetup_ElementImport = 0x0002,
|
||||
|
||||
/*! \brief Specification of all packets
|
||||
*
|
||||
* In the pool, this group contains the lists of all packet definitions.
|
||||
* Marking this complete releases resources associated with the packet
|
||||
* setup, and indicates no more packets will be created. The producer
|
||||
* and consumer will receive an NvSciStreamEventType_PacketsComplete
|
||||
* event after receiving all of the individual packets.
|
||||
*
|
||||
* When packet export is completed, the following functions are no longer
|
||||
* available on the pool:
|
||||
* - NvSciStreamPoolPacketCreate()
|
||||
* - NvSciStreamPoolPacketInsertBuffer()
|
||||
* - NvSciStreamPoolPacketComplete()
|
||||
*/
|
||||
NvSciStreamSetup_PacketExport = 0x0011,
|
||||
|
||||
/*! \brief Mapping of all packets
|
||||
*
|
||||
* In the producer and consumer, this group contains the lists of all
|
||||
* packet definitions and their status. This cannot be completed
|
||||
* until the NvSciStreamEventType_PacketsComplete event arrives from
|
||||
* the pool and status has been returned for all received packets.
|
||||
*
|
||||
* In the pool, this group contains the packet status returned by
|
||||
* the producer and consumers. This cannot be completed until
|
||||
* packet export has finished and NvSciStreamEventType_PacketStatus
|
||||
* events have arrived for all packets.
|
||||
*
|
||||
* Marking this complete releases resources associated with the packet
|
||||
* setup.
|
||||
*
|
||||
* When packet import is completed, the following functions are no longer
|
||||
* available on the relevant blocks:
|
||||
* - NvSciStreamBlockPacketNewHandleGet()
|
||||
* - NvSciStreamBlockPacketBufferGet()
|
||||
* - NvSciStreamBlockPacketStatusSet()
|
||||
* - NvSciStreamPoolPacketStatusAcceptGet()
|
||||
* - NvSciStreamPoolPacketStatusValueGet()
|
||||
*/
|
||||
NvSciStreamSetup_PacketImport = 0x0012,
|
||||
|
||||
/*! \brief Specification of waiter sync attributes
|
||||
*
|
||||
* In the producer and consumer, this group contains the per-element
|
||||
* NvSciSync attribute lists containing the requirements to wait for
|
||||
* sync objects signalled by the opposing endpoints. This cannot be
|
||||
* completed until NvSciStreamSetup_ElementImport is completed, so
|
||||
* the list of used elements is known.
|
||||
*
|
||||
* When waiter information export is completed, the following functions
|
||||
* are no longer available:
|
||||
* - NvSciStreamBlockElementWaiterAttrSet()
|
||||
*/
|
||||
NvSciStreamSetup_WaiterAttrExport = 0x0021,
|
||||
|
||||
/*! \brief Processing of waiter sync attributes
|
||||
*
|
||||
* In the producer and consumer, this group contains the per-element
|
||||
* NvSciSync attribute lists containing the requirements provided
|
||||
* by the opposing endpoints so that they can wait for sync objects
|
||||
* signalled by this endpoint. This cannot be completed until
|
||||
* NvSciStreamSetup_ElementImport is completed and the
|
||||
* NvSciStreamEventType_WaiterAttr event has arrived.
|
||||
*
|
||||
* When waiter information import is completed, the following functions
|
||||
* are no longer available:
|
||||
* - NvSciStreamBlockElementWaiterAttrGet()
|
||||
*/
|
||||
NvSciStreamSetup_WaiterAttrImport = 0x0022,
|
||||
|
||||
/*! \brief Specification of signaling sync objects
|
||||
*
|
||||
* In the producer and consumer, this group contains the per-element
|
||||
* NvSciSync objects used to signal when writing and reading,
|
||||
* respectively, of each element has completed. This cannot be
|
||||
* completed until NvSciStreamSetup_WaiterAttrImport is completed.
|
||||
*
|
||||
* When signal information export is completed, the following functions
|
||||
* are no longer available:
|
||||
* - NvSciStreamBlockElementSignalObjSet()
|
||||
*/
|
||||
NvSciStreamSetup_SignalObjExport = 0x0031,
|
||||
|
||||
/*! \brief Mapping of signaling sync objects
|
||||
*
|
||||
* In the producer and consumer, this group contains the per-element
|
||||
* NvSciSync objects that are signalled when the opposing endpoint(s)
|
||||
* are done reading and writing, respectively, each element. This cannot
|
||||
* be completed until the NvSciStreamEventType_SignalObj event has
|
||||
* arrived.
|
||||
*
|
||||
* When waiter information import is completed, the following functions
|
||||
* are no longer available:
|
||||
* - NvSciStreamBlockElementSignalObjGet()
|
||||
*/
|
||||
NvSciStreamSetup_SignalObjImport = 0x0032
|
||||
|
||||
} NvSciStreamSetup;
|
||||
|
||||
/*! \brief Defines event types for the blocks.
|
||||
*
|
||||
* \implements{19621083}
|
||||
*/
|
||||
typedef enum {
|
||||
|
||||
/*! \brief
|
||||
* Indicates the stream containing the block is fully connected.
|
||||
*
|
||||
* At all blocks, the following functions become available:
|
||||
* - NvSciStreamBlockConsumerCountGet()
|
||||
*
|
||||
* At the producer and consumer blocks, the element export phase may
|
||||
* begin, and the following functions become available:
|
||||
* - NvSciStreamBlockElementAttrSet()
|
||||
*/
|
||||
NvSciStreamEventType_Connected = 0x004004,
|
||||
|
||||
/*! \brief
|
||||
* Indicates portions of the stream have disconnected such that no
|
||||
* more useful work can be done with the block. Note that this
|
||||
* event is not always triggered immediately when any disconnect
|
||||
* occurs. For instance:
|
||||
* - If a consumer still has packets waiting in its queue when
|
||||
* a producer is destroyed, it will not be informed of the
|
||||
* disconnection until all packets are acquired
|
||||
* by calling NvSciStreamConsumerPacketAcquire().
|
||||
*
|
||||
* Received by all blocks.
|
||||
*/
|
||||
NvSciStreamEventType_Disconnected = 0x004005,
|
||||
|
||||
/*! \brief
|
||||
* Signals the arrival of NvSciSync waiter information from the
|
||||
* opposing endpoint(s).
|
||||
*
|
||||
* Received by producer and consumer blocks.
|
||||
*
|
||||
* The following function becomes available:
|
||||
* - NvSciStreamBlockElementWaiterAttrGet()
|
||||
* - NvSciStreamBlockElementSignalObjSet()
|
||||
*/
|
||||
NvSciStreamEventType_WaiterAttr = 0x004013,
|
||||
|
||||
/*! \brief
|
||||
* Signals the arrival of NvSciSync signal information from the
|
||||
* opposing endpoint(s).
|
||||
*
|
||||
* Received by producer and consumer blocks.
|
||||
*
|
||||
* The following function becomes available:
|
||||
* - NvSciStreamBlockElementSignalObjGet()
|
||||
*/
|
||||
NvSciStreamEventType_SignalObj = 0x004014,
|
||||
|
||||
/*! \brief
|
||||
* Signals the arrival of all element-related information.
|
||||
*
|
||||
* At the pool, both the element import and export phases may begin,
|
||||
* and the following functions become available:
|
||||
* - NvSciStreamBlockElementCountGet()
|
||||
* - NvSciStreamBlockElementAttrGet()
|
||||
* - NvSciStreamBlockElementAttrSet()
|
||||
*
|
||||
* At the producer and consumer(s), the element import and waiter
|
||||
* information export phases may begin, and the following functions
|
||||
* become available:
|
||||
* - NvSciStreamBlockElementCountGet()
|
||||
* - NvSciStreamBlockElementAttrGet()
|
||||
* - NvSciStreamBlockElementUsageSet() (consumer only)
|
||||
* - NvSciStreamBlockElementWaiterAttrSet()
|
||||
*
|
||||
* Not received by any other block types.
|
||||
*/
|
||||
NvSciStreamEventType_Elements = 0x004026,
|
||||
|
||||
/*! \brief
|
||||
* Signals the arrival of a new packet definition from the pool.
|
||||
*
|
||||
* Received by producer and consumer blocks.
|
||||
*
|
||||
* These events become available to the producer and consumer after
|
||||
* they have indicated that they are done importing element
|
||||
* information by calling NvSciStreamBlockSetupStatusSet()
|
||||
* with NvSciStreamSetup_ElementImport. The following functions
|
||||
* become available to query and accept or reject packet information:
|
||||
* - NvSciStreamBlockPacketNewHandleGet()
|
||||
* - NvSciStreamBlockPacketBufferGet()
|
||||
* - NvSciStreamBlockPacketStatusSet()
|
||||
*/
|
||||
NvSciStreamEventType_PacketCreate = 0x004030,
|
||||
|
||||
/*! \brief
|
||||
* Signals that the pool has finished defining all of its packets.
|
||||
*
|
||||
* Received by producer and consumer blocks.
|
||||
*
|
||||
* This event becomes available to the producer and consumer after
|
||||
* the pool indicates it has sent all the packets.
|
||||
*/
|
||||
NvSciStreamEventType_PacketsComplete = 0x004038,
|
||||
|
||||
/*! \brief
|
||||
* Signals that the pool has deleted a packet and no further paylaods
|
||||
* using the packet will arrive.
|
||||
*
|
||||
* Received by producer and consumer blocks.
|
||||
*
|
||||
* The following function becomes available to query the deleted packet:
|
||||
* - NvSciStreamBlockPacketOldCookieGet()
|
||||
*/
|
||||
NvSciStreamEventType_PacketDelete = 0x004032,
|
||||
|
||||
/*! \brief
|
||||
* Signals the arrival of status for a packet from producer and all
|
||||
* consumers.
|
||||
*
|
||||
* Received by pool blocks.
|
||||
*
|
||||
* The following functions become available to query the packet status:
|
||||
* - NvSciStreamPoolPacketStatusAcceptGet()
|
||||
* - NvSciStreamPoolPacketStatusValueGet()
|
||||
*/
|
||||
NvSciStreamEventType_PacketStatus = 0x004037,
|
||||
|
||||
/*! \brief
|
||||
* Specifies a packet is available for reuse or acquire.
|
||||
*
|
||||
* Received by producer and consumer blocks.
|
||||
*/
|
||||
NvSciStreamEventType_PacketReady = 0x004040,
|
||||
|
||||
/*! \brief
|
||||
* Specifies all setup operations have completed and streaming may begin.
|
||||
*
|
||||
* Received by all blocks.
|
||||
*/
|
||||
NvSciStreamEventType_SetupComplete = 0x004050,
|
||||
|
||||
/*! \brief
|
||||
* Indicates a failure not directly triggered by user action.
|
||||
*
|
||||
* Received by any block.
|
||||
*/
|
||||
NvSciStreamEventType_Error = 0x0040FF
|
||||
|
||||
} NvSciStreamEventType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/** @} */
|
||||
#endif /* NVSCISTREAM_TYPES_H */
|
||||
2432
nvscisync.h
Normal file
2432
nvscisync.h
Normal file
File diff suppressed because it is too large
Load Diff
1
push_info.txt
Normal file
1
push_info.txt
Normal file
@@ -0,0 +1 @@
|
||||
jetson_35.1
|
||||
Reference in New Issue
Block a user