Go to the source code of this file.
Data Structures | |
| struct | NvRmStreamRec |
| An exposed (not opaque) structure for a stream. More... | |
| struct | NvRmStreamInitParamsRec |
| An exposed, non-opaque structure describing parameters that can be overridden when initializing an NvRmStream during a call to NvRmStreamInitParamsEx. More... | |
Macros | |
| #define | NVRM_CMDBUF_GRANULARITY (8*1024) |
| The minimum granularity for cmdBufSize in NvRmStreamInitParams. More... | |
| #define | NVRM_CMDBUF_SIZE_MIN (48*1024) |
| The minimum size for cmdBufSize. More... | |
| #define | NVRM_SUPPORT_CHECKSUM 0 |
| #define | NVRM_CALCULATE_CHECKSUM(FinalChecksum, NewValue) {} |
| #define | NVRM_CH_OPCODE_ACQUIRE_MUTEX(MutexId) |
| The various channel opcodes. More... | |
| #define | NVRM_CH_OPCODE_RELEASE_MUTEX(MutexId) |
| #define | NVRM_CH_OPCODE_SET_CLASS(ClassId, Offset, Mask) |
| #define | NVRM_CH_OPCODE_INCR(Addr, Count) |
| #define | NVRM_CH_OPCODE_NONINCR(Addr, Count) |
| #define | NVRM_CH_OPCODE_IMM(Addr, Value) |
| #define | NVRM_CH_OPCODE_MASK(Addr, Mask) |
| #define | NVRM_STREAM_BEGIN(pStream, pCurrentArg, Words) do { pCurrentArg = NvRmStreamBegin(pStream, Words, 0, 0, 0); } while (0) |
| #define | NVRM_STREAM_BEGIN_WAIT(pStream, pCurrentArg, Words, Waits) do { pCurrentArg = NvRmStreamBegin(pStream, Words, Waits, 0, 0); } while (0) |
| #define | NVRM_STREAM_BEGIN_RELOC_GATHER(pStream, pCurrentArg, Words, Relocs, Gathers) |
| #define | NVRM_STREAM_BEGIN_RELOC_GATHER_WAIT(pStream, pCurrentArg, Words, Relocs, Gathers, Waits) |
| #define | NVRM_STREAM_END(pStream, pCurrentArg) do { NvRmStreamEnd(pStream, pCurrentArg); } while (0) |
| #define | NVRM_STREAM_PUSH_U(pStream, u1) |
| #define | NVRM_STREAM_PUSH_FALCON_METHOD_RELOC_SHIFT_T(pStream, pCurrentArg, Method, hMemArg, OffsetArg, ShiftArg, TypeArg) |
| XXX Does writing 0xDEADBEEF to the skipped location help or hurt performance? (Does the answer to this question vary from platform to platform and from command buffer memory type to memory type?) If it hurts, perhaps we should only write this in debug builds, and just skip the slot in release builds? More... | |
| #define | NVRM_STREAM_PUSH_FALCON_METHOD_RELOC_SHIFT(pStream, pCurrentArg, Method, hMemArg, OffsetArg, ShiftArg) |
| #define | NVRM_STREAM_PUSH_FALCON_METHOD(pStream, pCurrentArg, Method0, Method1) |
| #define | NVRM_STREAM_PUSH_RELOC_SHIFT(pStream, pCurrentArg, hMemArg, OffsetArg, ShiftArg) |
| NVRM_STREAM_PUSH_RELOC_SHIFT NVRM_STREAM_PUSH_RELOC. More... | |
| #define | NVRM_STREAM_PUSH_RELOC(pStream, pCurrentArg, hMemArg, OffsetArg) NVRM_STREAM_PUSH_RELOC_SHIFT(pStream, pCurrentArg, hMemArg, OffsetArg, 0) |
| #define | NVRM_STREAM_PUSH_RELOC_SHIFT_T(pStream, pCurrentArg, hMemArg, OffsetArg, ShiftArg, TypeArg) |
| NVRM_STREAM_PUSH_RELOC_SHIFT_T NVRM_STREAM_PUSH_RELOC_T. More... | |
| #define | NVRM_STREAM_PUSH_RELOC_T(pStream, pCurrentArg, hMemArg, OffsetArg, TypeArg) NVRM_STREAM_PUSH_RELOC_SHIFT_T(pStream, pCurrentArg, hMemArg, OffsetArg, 0, TypeArg) |
| #define | NVRM_STREAM_PUSH_GATHER(pStream, pCurrentArg, hMemArg, OffsetArg, WordsArg) |
| #define | NVRM_STREAM_PUSH_FD_RELOC_SHIFT(pStream, pCurrentArg, fd, OffsetArg, ShiftArg) |
| #define | NVRM_STREAM_PUSH_FD_RELOC(pStream, pCurrentArg, fd, OffsetArg) NVRM_STREAM_PUSH_FD_RELOC_SHIFT(pStream, pCurrentArg, fd, OffsetArg, 0) |
| #define | NVRM_STREAM_PUSH_FD_GATHER(pStream, pCurrentArg, fd, OffsetArg, WordsArg) |
| #define | NVRM_STREAM_PUSH_SETCLASS(pStream, pCurrentArg, ModuleArg, ClassArg) |
| #define | NVRM_STREAM_PUSH_INCR(pStream, pCurrentArg, SyncPointArg, RegArg, CondArg, StreamArg) |
| #define | NVRM_STREAM_PUSH_WAIT(pStream, pCurrentArg, FenceArg) |
| #define | NVRM_MUTEX_INVALID ((NvU32)-1) |
| Invalid Module Mutex ID. More... | |
| #define | NVCONFIG_NVRMSTREAMINITEX_SUPPORTED |
Typedefs | |
| typedef struct NvRmStreamRec | NvRmStream |
| An exposed (not opaque) structure for a stream. More... | |
| typedef struct NvRmStreamInitParamsRec | NvRmStreamInitParams |
| An exposed, non-opaque structure describing parameters that can be overridden when initializing an NvRmStream during a call to NvRmStreamInitParamsEx. More... | |
Enumerations | |
| enum | { NVRM_STREAM_RELOCATION_TABLE_SIZE = 256 } |
| Maximum number of relocations per command buffer. More... | |
| enum | { NVRM_STREAM_GATHER_TABLE_SIZE = 16 } |
| Maximum number of gathers per command buffer. More... | |
| enum | NvRmStreamFlag { NvRmStreamFlag_Invalid = (1 << 0) } |
| Valid flags for NvRmStream structure. More... | |
| enum | { NVRM_STREAM_BEGIN_MAX_WORDS = 4096 } |
| The maximum number of words you can ask a stream for in one shot. More... | |
| enum | NvRmStreamRelocTypeRec { NvRmStreamRelocType_Default, NvRmStreamRelocType_Pitch, NvRmStreamRelocType_Blocklinear } |
| Supported Reloc types. More... | |
Functions | |
| void | NvRmStreamInitParamsSetDefaults (NvRmStreamInitParams *pInitParams) |
| Sets the specified initialization parameters to default values. More... | |
| NvError | NvRmStreamInitEx (NvRmDeviceHandle hDevice, NvRmChannelHandle hChannel, const NvRmStreamInitParams *pInitParams, NvRmStream *pStream) |
| This api is to initialize a stream struct. More... | |
| NvError | NvRmStreamInit (NvRmDeviceHandle hDevice, NvRmChannelHandle hChannel, NvRmStream *pStream) |
| Initializes a stream struct. More... | |
| NvData32 * | NvRmStreamBegin (NvRmStream *pStream, NvU32 words, NvU32 waits, NvU32 relocs, NvU32 gathers) |
| Begin a new stream. More... | |
| void | NvRmStreamEnd (NvRmStream *pStream, NvData32 *pCurrent) |
| End a stream. More... | |
| NvError | NvRmStreamPush (NvRmStream *pStream, NvU32 word) |
| NvData32 * | NvRmStreamPushReloc (NvRmStream *pStream, NvData32 *pCurrent, NvRmMemHandle hMem, NvU32 Offset, NvU32 RelocShift) |
| Push a relocation to stream. More... | |
| NvData32 * | NvRmStreamPushRelocType (NvRmStream *pStream, NvData32 *pCurrent, NvRmMemHandle hMem, NvU32 Offset, NvU32 RelocShift, NvU32 RelocType) |
| Push a relocation to stream. More... | |
| NvData32 * | NvRmStreamPushFdReloc (NvRmStream *pStream, NvData32 *pCurrent, int fd, NvU32 Offset, NvU32 RelocShift) |
| Push a relocation to stream. More... | |
| NvData32 * | NvRmStreamPushGather (NvRmStream *pStream, NvData32 *pCurrent, NvRmMemHandle hMem, NvU32 Offset, NvU32 Words) |
| Push a gather to stream. More... | |
| NvData32 * | NvRmStreamPushFdGather (NvRmStream *pStream, NvData32 *pCurrent, int fd, NvU32 Offset, NvU32 Words) |
| Push a gather to stream. More... | |
| NvData32 * | NvRmStreamPushSetClass (NvRmStream *pStream, NvData32 *pCurrent, NvRmModuleID moduleId, NvU32 classId) |
| Push a setclass. More... | |
| NvData32 * | NvRmStreamPushFalconMethodRelocType (NvRmStream *pStream, NvData32 *pCurrent, NvU32 Method, NvRmMemHandle hMem, NvU32 Offset, NvU32 RelocShift, NvU32 RelocType) |
| Push operations to write into Falcon METHOD0 and METHOD1 registers. More... | |
| NvData32 * | NvRmStreamPushFalconMethodReloc (NvRmStream *pStream, NvData32 *pCurrent, NvU32 Method, NvRmMemHandle hMem, NvU32 Offset, NvU32 RelocShift) |
| Push operations to write into Falcon METHOD0 and METHOD1 registers. More... | |
| NvData32 * | NvRmStreamPushFalconMethod (NvRmStream *pStream, NvData32 *pCurrent, NvU32 Method0, NvU32 Method1) |
| Push operations to write into Falcon METHOD0 and METHOD1 registers. More... | |
| NvData32 * | NvRmStreamPushIncr (NvRmStream *pStream, NvData32 *pCurrent, NvU32 syncPointId, NvU32 reg, NvU32 cond, NvBool streamSyncPoint) |
| Push a sync point increment to stream. More... | |
| void | NvRmStreamPushCpuIncr (NvRmStream *pStream, NvU32 SyncPointID) |
| Mark a kernel managed syncpoint as used. More... | |
| NvData32 * | NvRmStreamPushWait (NvRmStream *pStream, NvData32 *pCurrent, NvRmFence fence) |
| Push a host wait to stream. More... | |
| NvData32 * | NvRmStreamPushWaits (NvRmStream *pStream, NvData32 *pCurrent, NvU32 numFences, NvRmFence *fences) |
| Push a host wait to stream. More... | |
| void | NvRmStreamSetFenceFd (NvRmStream *pStream, int fence_fd) |
| Add a host wait for the fence fd at the current point in the stream. More... | |
| NvError | NvRmStreamSetWaitSync (NvRmStream *pStream, const struct NvRmSyncRec *pSync) |
| Add a host wait for the given NvRmSync at the current point in the stream. More... | |
| void | NvRmStreamFree (NvRmStream *pStream) |
| Frees the resources associated with a stream struct. More... | |
| NvError | NvRmStreamGetError (NvRmStream *pStream) |
| NvRmStreamGetError returns the value of the stream ErrorFlag. More... | |
| void | NvRmStreamSetError (NvRmStream *pStream, NvError err) |
| NvRmStreamSetError updates ErrorFlag if ErrorFlag is NvSuccess. More... | |
| void | NvRmStreamFlush (NvRmStream *pStream, NvRmFence *pFence) |
| Flushes a stream so that all commands previously inserted are guaranteed to reach the hardware in finite time. More... | |
| int | NvRmStreamFlushFenceFd (NvRmStream *pStream, const char *name) |
| Same as NvRmStreamFlush, but returns a sync fd. More... | |
| NvError | NvRmStreamFlushSync (NvRmStream *pStream, struct NvRmSyncRec **pSync) |
| Same as NvRmStreamFlush, but returns a NvRmSync. More... | |
| #define NVCONFIG_NVRMSTREAMINITEX_SUPPORTED |
Definition at line 384 of file nvrm_stream.h.
| #define NVRM_CALCULATE_CHECKSUM | ( | FinalChecksum, | |
| NewValue | |||
| ) | {} |
Definition at line 202 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_ACQUIRE_MUTEX | ( | MutexId | ) |
The various channel opcodes.
Note that we do not provide the Gather or Restart opcodes – drivers are not allowed to use these opcodes.
Definition at line 209 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_IMM | ( | Addr, | |
| Value | |||
| ) |
Definition at line 224 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_INCR | ( | Addr, | |
| Count | |||
| ) |
Definition at line 218 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_MASK | ( | Addr, | |
| Mask | |||
| ) |
Definition at line 227 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_NONINCR | ( | Addr, | |
| Count | |||
| ) |
Definition at line 221 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_RELEASE_MUTEX | ( | MutexId | ) |
Definition at line 212 of file nvrm_stream.h.
| #define NVRM_CH_OPCODE_SET_CLASS | ( | ClassId, | |
| Offset, | |||
| Mask | |||
| ) |
Definition at line 215 of file nvrm_stream.h.
| #define NVRM_CMDBUF_GRANULARITY (8*1024) |
The minimum granularity for cmdBufSize in NvRmStreamInitParams.
Definition at line 189 of file nvrm_stream.h.
| #define NVRM_CMDBUF_SIZE_MIN (48*1024) |
The minimum size for cmdBufSize.
Definition at line 194 of file nvrm_stream.h.
| #define NVRM_MUTEX_INVALID ((NvU32)-1) |
Invalid Module Mutex ID.
Definition at line 361 of file nvrm_stream.h.
| #define NVRM_STREAM_BEGIN | ( | pStream, | |
| pCurrentArg, | |||
| Words | |||
| ) | do { pCurrentArg = NvRmStreamBegin(pStream, Words, 0, 0, 0); } while (0) |
Definition at line 236 of file nvrm_stream.h.
| #define NVRM_STREAM_BEGIN_RELOC_GATHER | ( | pStream, | |
| pCurrentArg, | |||
| Words, | |||
| Relocs, | |||
| Gathers | |||
| ) |
Definition at line 242 of file nvrm_stream.h.
| #define NVRM_STREAM_BEGIN_RELOC_GATHER_WAIT | ( | pStream, | |
| pCurrentArg, | |||
| Words, | |||
| Relocs, | |||
| Gathers, | |||
| Waits | |||
| ) |
Definition at line 247 of file nvrm_stream.h.
| #define NVRM_STREAM_BEGIN_WAIT | ( | pStream, | |
| pCurrentArg, | |||
| Words, | |||
| Waits | |||
| ) | do { pCurrentArg = NvRmStreamBegin(pStream, Words, Waits, 0, 0); } while (0) |
Definition at line 239 of file nvrm_stream.h.
| #define NVRM_STREAM_END | ( | pStream, | |
| pCurrentArg | |||
| ) | do { NvRmStreamEnd(pStream, pCurrentArg); } while (0) |
Definition at line 252 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_FALCON_METHOD | ( | pStream, | |
| pCurrentArg, | |||
| Method0, | |||
| Method1 | |||
| ) |
Definition at line 280 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_FALCON_METHOD_RELOC_SHIFT | ( | pStream, | |
| pCurrentArg, | |||
| Method, | |||
| hMemArg, | |||
| OffsetArg, | |||
| ShiftArg | |||
| ) |
Definition at line 274 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_FALCON_METHOD_RELOC_SHIFT_T | ( | pStream, | |
| pCurrentArg, | |||
| Method, | |||
| hMemArg, | |||
| OffsetArg, | |||
| ShiftArg, | |||
| TypeArg | |||
| ) |
XXX Does writing 0xDEADBEEF to the skipped location help or hurt performance? (Does the answer to this question vary from platform to platform and from command buffer memory type to memory type?) If it hurts, perhaps we should only write this in debug builds, and just skip the slot in release builds?
Definition at line 268 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_FD_GATHER | ( | pStream, | |
| pCurrentArg, | |||
| fd, | |||
| OffsetArg, | |||
| WordsArg | |||
| ) |
Definition at line 333 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_FD_RELOC | ( | pStream, | |
| pCurrentArg, | |||
| fd, | |||
| OffsetArg | |||
| ) | NVRM_STREAM_PUSH_FD_RELOC_SHIFT(pStream, pCurrentArg, fd, OffsetArg, 0) |
Definition at line 330 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_FD_RELOC_SHIFT | ( | pStream, | |
| pCurrentArg, | |||
| fd, | |||
| OffsetArg, | |||
| ShiftArg | |||
| ) |
Definition at line 324 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_GATHER | ( | pStream, | |
| pCurrentArg, | |||
| hMemArg, | |||
| OffsetArg, | |||
| WordsArg | |||
| ) |
Definition at line 318 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_INCR | ( | pStream, | |
| pCurrentArg, | |||
| SyncPointArg, | |||
| RegArg, | |||
| CondArg, | |||
| StreamArg | |||
| ) |
Definition at line 345 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_RELOC | ( | pStream, | |
| pCurrentArg, | |||
| hMemArg, | |||
| OffsetArg | |||
| ) | NVRM_STREAM_PUSH_RELOC_SHIFT(pStream, pCurrentArg, hMemArg, OffsetArg, 0) |
Definition at line 299 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_RELOC_SHIFT | ( | pStream, | |
| pCurrentArg, | |||
| hMemArg, | |||
| OffsetArg, | |||
| ShiftArg | |||
| ) |
NVRM_STREAM_PUSH_RELOC_SHIFT NVRM_STREAM_PUSH_RELOC.
APIs to push a relocation to the stream By default, reloc type is added as NvRmStreamRelocType_Default
Definition at line 293 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_RELOC_SHIFT_T | ( | pStream, | |
| pCurrentArg, | |||
| hMemArg, | |||
| OffsetArg, | |||
| ShiftArg, | |||
| TypeArg | |||
| ) |
NVRM_STREAM_PUSH_RELOC_SHIFT_T NVRM_STREAM_PUSH_RELOC_T.
Use these APIs when type of reloc (of type NvRmStreamRelocTypeRec) is known explicitly
Definition at line 309 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_RELOC_T | ( | pStream, | |
| pCurrentArg, | |||
| hMemArg, | |||
| OffsetArg, | |||
| TypeArg | |||
| ) | NVRM_STREAM_PUSH_RELOC_SHIFT_T(pStream, pCurrentArg, hMemArg, OffsetArg, 0, TypeArg) |
Definition at line 315 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_SETCLASS | ( | pStream, | |
| pCurrentArg, | |||
| ModuleArg, | |||
| ClassArg | |||
| ) |
Definition at line 339 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_U | ( | pStream, | |
| u1 | |||
| ) |
Definition at line 255 of file nvrm_stream.h.
| #define NVRM_STREAM_PUSH_WAIT | ( | pStream, | |
| pCurrentArg, | |||
| FenceArg | |||
| ) |
Definition at line 351 of file nvrm_stream.h.
| #define NVRM_SUPPORT_CHECKSUM 0 |
Definition at line 196 of file nvrm_stream.h.
| typedef struct NvRmStreamRec NvRmStream |
An exposed (not opaque) structure for a stream.
| typedef struct NvRmStreamInitParamsRec NvRmStreamInitParams |
An exposed, non-opaque structure describing parameters that can be overridden when initializing an NvRmStream during a call to NvRmStreamInitParamsEx.
| anonymous enum |
Maximum number of relocations per command buffer.
| Enumerator | |
|---|---|
| NVRM_STREAM_RELOCATION_TABLE_SIZE | |
Definition at line 29 of file nvrm_stream.h.
| anonymous enum |
Maximum number of gathers per command buffer.
| Enumerator | |
|---|---|
| NVRM_STREAM_GATHER_TABLE_SIZE | |
Definition at line 34 of file nvrm_stream.h.
| anonymous enum |
The maximum number of words you can ask a stream for in one shot.
| Enumerator | |
|---|---|
| NVRM_STREAM_BEGIN_MAX_WORDS | |
Definition at line 234 of file nvrm_stream.h.
| enum NvRmStreamFlag |
Valid flags for NvRmStream structure.
(None)
| Enumerator | |
|---|---|
| NvRmStreamFlag_Invalid | |
Definition at line 39 of file nvrm_stream.h.
Supported Reloc types.
Pitch linear and Block linear refer to the layout of surfaces behind the relocs.
Default is used for relocs that do not refer to graphics surfaces
| Enumerator | |
|---|---|
| NvRmStreamRelocType_Default | |
| NvRmStreamRelocType_Pitch | |
| NvRmStreamRelocType_Blocklinear | |
Definition at line 370 of file nvrm_stream.h.
| NvData32* NvRmStreamBegin | ( | NvRmStream * | pStream, |
| NvU32 | words, | ||
| NvU32 | waits, | ||
| NvU32 | relocs, | ||
| NvU32 | gathers | ||
| ) |
Begin a new stream.
Caveat: If pStream already contains a stream, it is copied to command buffer.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | Pointer to stream. Range: Needs to be a valid pointer |
| [in] | words | Number of words to push Range: Any valid 32bit number |
| [in] | waits | Number of wait checks to push Range: Any valid 32bit number |
| [in] | relocs | Number of relocations to push Range: Any valid 32bit number |
| [in] | gathers | Number of gathers Range: Any valid 32bit number |
| void NvRmStreamEnd | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent | ||
| ) |
End a stream.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | Pointer to stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Must be a valid pointer |
| void NvRmStreamFlush | ( | NvRmStream * | pStream, |
| NvRmFence * | pFence | ||
| ) |
Flushes a stream so that all commands previously inserted are guaranteed to reach the hardware in finite time.
This function sets pStream->SyncPointsUsed to 0 A fence may be given to allow callers to block until the flushed commands have finished via NvRmChannelSyncPointWait(). A null fence parameter is permitted, if you're not interested in knowing when the commands have completed.
Caveat: This must not be called between a NVRM_STREAM_BEGIN/NVRM_STREAM_END pair(debug builds will assert if this happens). The NVRM_STREAM_BEGIN() macros may indirectly call this function (through NvRmStreamGetSpace).
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream to flush Range: Needs to be a valid pointer |
| [out] | pFence | Fence for synchronization Range: Needs to be a valid pointer |
| int NvRmStreamFlushFenceFd | ( | NvRmStream * | pStream, |
| const char * | name | ||
| ) |
Same as NvRmStreamFlush, but returns a sync fd.
Caveat: This is deprecated, use NvRmStreamFlushSync() instead.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream to flush Range: Needs to be a valid pointer |
| [in] | name | The name to be given to fence Range: Not NULL. |
| NvError NvRmStreamFlushSync | ( | NvRmStream * | pStream, |
| struct NvRmSyncRec ** | pSync | ||
| ) |
Same as NvRmStreamFlush, but returns a NvRmSync.
The NvRmSync objects are sync fd based on OS that support it, syncpoint-based otherwise.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream to flush Range: Needs to be a valid pointer |
| [out] | pSync | Sync object for synchronization Range: Needs to be a valid pointer |
| void NvRmStreamFree | ( | NvRmStream * | pStream | ) |
Frees the resources associated with a stream struct.
Must be called once for each successful NvRmStreamInit(). This API will never fail.
Caveat: Must be called once for each successful NvRmStreamInit(). This API will never fail.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream to free the resources for Range: Needs to be a valid pointer |
| NvError NvRmStreamGetError | ( | NvRmStream * | pStream | ) |
NvRmStreamGetError returns the value of the stream ErrorFlag.
When an error occurs, the ErrorFlag is set to the appropriate NvError code value. No other errors are recorded until NvRmStreamGetError is called, ErrorFlag is returned, and ErrorFlag is reset to NvSuccess.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream to get the ErrorFlag from Range: Needs to be a valid pointer |
| NvError NvRmStreamInit | ( | NvRmDeviceHandle | hDevice, |
| NvRmChannelHandle | hChannel, | ||
| NvRmStream * | pStream | ||
| ) |
Initializes a stream struct.
This is identical to a call to NvRmStreamInitEx, except that the function will use default NvRmStreamInitParams instead of being specified by the client/caller.
Caveat: It must be called before attempting to use the stream with any other API.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | hDevice | Handle to the resource manager. Range: Needs to be a valid pointer |
| [in] | hChannel | Handle to the channel the stream will be used with. Range: Needs to be a valid pointer |
| pStream | The stream to initialize. Range: Needs to be a valid pointer |
| NvError NvRmStreamInitEx | ( | NvRmDeviceHandle | hDevice, |
| NvRmChannelHandle | hChannel, | ||
| const NvRmStreamInitParams * | pInitParams, | ||
| NvRmStream * | pStream | ||
| ) |
This api is to initialize a stream struct.
Caveat: It must be called before attempting to use the stream with any other API.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | hDevice | Handle to the resource manager. Range: Needs to be a valid pointer |
| [in] | hChannel | Handle to the channel the stream will be used with. Range: Needs to be a valid pointer |
| [in] | pInitParams | Parameters to pass for stream initialization. Range: Needs to be a valid pointer |
| [in] | pStream | The stream to initialize. Range: Needs to be a valid pointer |
| void NvRmStreamInitParamsSetDefaults | ( | NvRmStreamInitParams * | pInitParams | ) |
Sets the specified initialization parameters to default values.
| pInitParams | The parameters that will be set to default values. |
| NvError NvRmStreamPush | ( | NvRmStream * | pStream, |
| NvU32 | word | ||
| ) |
| void NvRmStreamPushCpuIncr | ( | NvRmStream * | pStream, |
| NvU32 | SyncPointID | ||
| ) |
Mark a kernel managed syncpoint as used.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | SyncPointID | The id of sync point Range: Any valid syncpoint ID. |
| NvData32* NvRmStreamPushFalconMethod | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvU32 | Method0, | ||
| NvU32 | Method1 | ||
| ) |
Push operations to write into Falcon METHOD0 and METHOD1 registers.
Caveat: Uses 3 words of space in stream.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | Method0 | The Falcon method Range: |
| [in] | Method1 | The parameter for the method Range: |
| NvData32* NvRmStreamPushFalconMethodReloc | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvU32 | Method, | ||
| NvRmMemHandle | hMem, | ||
| NvU32 | Offset, | ||
| NvU32 | RelocShift | ||
| ) |
Push operations to write into Falcon METHOD0 and METHOD1 registers.
Method 1 content will be the relocation.
Caveat: Uses 3 words of space in stream.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | Method | The Falcon method Range: |
| [in] | hMem | The target memory handle Range: Needs to be a valid pointer |
| [in] | Offset | The target memory offset Range: [0, 4095] |
| [in] | RelocShift | How much to shift the address Range: [0, 31] |
| NvData32* NvRmStreamPushFalconMethodRelocType | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvU32 | Method, | ||
| NvRmMemHandle | hMem, | ||
| NvU32 | Offset, | ||
| NvU32 | RelocShift, | ||
| NvU32 | RelocType | ||
| ) |
Push operations to write into Falcon METHOD0 and METHOD1 registers.
Method 1 content will be the relocation of given type
Caveat: Uses 3 words of space in stream.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | Method | The Falcon method Range: |
| [in] | hMem | The target memory handle Range: Needs to be a valid pointer |
| [in] | Offset | The target memory offset Range: [0 - 4095] |
| [in] | RelocShift | How much to shift the address Range: [0, 31] |
| [in] | RelocType | Type of relocation Range: Any value of the NvRmStreamRelocTypeRec enum |
| NvData32* NvRmStreamPushFdGather | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| int | fd, | ||
| NvU32 | Offset, | ||
| NvU32 | Words | ||
| ) |
Push a gather to stream.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | fd | The dmabuf fd for gather Range: Positive value |
| [in] | Offset | The target memory offset Range: [0 - 4095] |
| [in] | Words | Number of words in gather. Range: Any valid 32 bit number |
| NvData32* NvRmStreamPushFdReloc | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| int | fd, | ||
| NvU32 | Offset, | ||
| NvU32 | RelocShift | ||
| ) |
Push a relocation to stream.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | fd | The target dmabuf fd Range: Positive value. |
| [in] | Offset | The target memory offset Range: [0, 4095] |
| [in] | RelocShift | How much to shift the address Range: [0, 31] |
| NvData32* NvRmStreamPushGather | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvRmMemHandle | hMem, | ||
| NvU32 | Offset, | ||
| NvU32 | Words | ||
| ) |
Push a gather to stream.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | hMem | The memory handle for gather Range: Needs to be a valid pointer |
| [in] | Offset | The target memory offset[ Range: [0, 4095] |
| [in] | Words | Number of words in gather Range: Any valid 32 bit number |
| NvData32* NvRmStreamPushIncr | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvU32 | syncPointId, | ||
| NvU32 | reg, | ||
| NvU32 | cond, | ||
| NvBool | streamSyncPoint | ||
| ) |
Push a sync point increment to stream.
Caveat: Uses 2 words of space in stream.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | syncPointId | The id of sync point Range: Any valid syncpoint ID |
| [in] | reg | The register number to use. If unsure, use 0x000 Range: |
| [in] | cond | The condition Range: |
| [in] | streamSyncPoint | True if this is a stream sync point Range: NV_TRUE if this is a stream sync point |
| NvData32* NvRmStreamPushReloc | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvRmMemHandle | hMem, | ||
| NvU32 | Offset, | ||
| NvU32 | RelocShift | ||
| ) |
Push a relocation to stream.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | hMem | The target memory handle Range: Needs to be a valid pointer |
| [in] | Offset | The target memory offset Range: [0, 4095] |
| [in] | RelocShift | How much to shift the address Range: [0, 31] |
| NvData32* NvRmStreamPushRelocType | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvRmMemHandle | hMem, | ||
| NvU32 | Offset, | ||
| NvU32 | RelocShift, | ||
| NvU32 | RelocType | ||
| ) |
Push a relocation to stream.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | hMem | The target memory handle Range: Needs to be a valid pointer |
| [in] | Offset | The target memory offset Range: [0, 4095] |
| [in] | RelocShift | How much to shift the address Range: [0, 31] |
| [in] | RelocType | Type of the relocation Range: Any value of the NvRmStreamRelocTypeRec enum |
| NvData32* NvRmStreamPushSetClass | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvRmModuleID | moduleId, | ||
| NvU32 | classId | ||
| ) |
Push a setclass.
Will also update LastEngineUsed and LastClassUsed.
Caveat: Uses 1 word of space in stream.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | moduleId | The id of the module Range: Any valid module ID of the NvRmModuleID enum |
| [in] | classId | The id of the class Range: Any valid Host1x class ID as documented in the various Host1x IAS's |
| NvData32* NvRmStreamPushWait | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvRmFence | fence | ||
| ) |
Push a host wait to stream.
If current class is not HOST1X, will send a SETCLASS for HOST1X, invoke wait, and SETCLASS back to the LastClassUsed.
Caveat: Uses 5 words of space in stream.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | fence | The fence to wait for Range: Must be a valid pointer |
| NvData32* NvRmStreamPushWaits | ( | NvRmStream * | pStream, |
| NvData32 * | pCurrent, | ||
| NvU32 | numFences, | ||
| NvRmFence * | fences | ||
| ) |
Push a host wait to stream.
If current class is not HOST1X, will send a SETCLASS for HOST1X, invoke wait, and SETCLASS back to the LastClassUsed.
Caveat: Uses 2 words of space in stream, plus 3 words for each fence
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pCurrent | The cursor Range: Needs to be a valid pointer |
| [in] | NumFences | Number of fences to wait for Range: Any valid 32bit number |
| [in] | Fences | The fence to wait for Range: Must be a valid pointer |
| void NvRmStreamSetError | ( | NvRmStream * | pStream, |
| NvError | err | ||
| ) |
NvRmStreamSetError updates ErrorFlag if ErrorFlag is NvSuccess.
Caveat: None
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream to set the ErrorFlag Range: Needs to be a valid pointer |
| [in] | err | Error flag to be updated Range: Any valid error flag |
| void NvRmStreamSetFenceFd | ( | NvRmStream * | pStream, |
| int | fence_fd | ||
| ) |
Add a host wait for the fence fd at the current point in the stream.
The caller retains ownership of the fence fd. Calling this multiple times will add a wait for each fence.
Caveat: It is illegal to call this within a NVRM_STREAM_BEGIN/NVRM_STREAM_END pair.
This is deprecated, use NvRmStreamSetWaitSync() instead.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | fence_fd | The fence to wait for Range: Must be -1. |
| NvError NvRmStreamSetWaitSync | ( | NvRmStream * | pStream, |
| const struct NvRmSyncRec * | pSync | ||
| ) |
Add a host wait for the given NvRmSync at the current point in the stream.
The caller retains ownership of the sync object.
Caveat: It is illegal to call this within a NVRM_STREAM_BEGIN/NVRM_STREAM_END pair.
Requirement Id:
Sync/Async: Sync
Reentrancy: Reentrant
| [in] | pStream | The stream Range: Needs to be a valid pointer |
| [in] | pSync | The sync object to wait for Range: Needs to be a valid pointer |