NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
nvrm_gpusched.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 NVIDIA Corporation. All Rights Reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property and
5  * proprietary rights in and to this software and related documentation. Any
6  * use, reproduction, disclosure or distribution of this software and related
7  * documentation without an express license agreement from NVIDIA Corporation
8  * is strictly prohibited.
9  */
10 
11 #ifndef NVRM_GPUSCHED_H
12 #define NVRM_GPUSCHED_H
13 
14 #include <sys/types.h>
15 #include <stdbool.h>
16 #include <stdint.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21 
22 typedef uint32_t NvRmGpuSchedTsgId;
23 typedef struct NvRmGpuSchedSessionRec NvRmGpuSchedSession;
24 typedef struct NvRmGpuSchedTsgRec NvRmGpuSchedTsg;
25 typedef struct NvRmGpuSchedTsgSetRec NvRmGpuSchedTsgSet;
26 
30 typedef enum {
56 
60 typedef enum
61 {
65 
66 typedef enum {
71 
72 typedef struct NvRmGpuSchedTsgParamsRec {
75  uint32_t timesliceUs;
76  pid_t pid;
78 
80 {
81  uint32_t reserved;
83 
84 #define NVRM_GPUSCHED_DEFINE_SESSION_ATTR(x) \
85  NvRmGpuSchedSessionAttr x = { 0 }
86 
87 #define NVRM_GPUSCHED_WAIT_INFINITE ((uint32_t)-1)
88 
98  const NvRmGpuSchedSessionAttr *attr,
99  NvRmGpuSchedSession **phSession);
100 
107 
121  NvRmGpuSchedSession *hSession,
122  NvRmGpuSchedTsgEvents *events,
123  uint32_t timeout);
124 
133  NvRmGpuSchedTsgSet *hTsgSet);
134 
149  NvRmGpuSchedTsgSet *hTsgSet);
150 
161  NvRmGpuSchedTsgSet *hTsgSet,
162  pid_t pid);
163 
177  NvRmGpuSchedTsgSet *hTsgSet,
178  NvRmGpuSchedTsgId *tsgid);
179 
194  NvRmGpuSchedSession *hSession,
195  NvRmGpuSchedTsgId tsgid,
196  NvRmGpuSchedTsg **phTsg);
197 
207  NvRmGpuSchedTsg *hTsg,
209 
219  NvRmGpuSchedTsg *hTsg,
220  NvRmGpuSchedRunlistInterleave interleave);
221 
231  NvRmGpuSchedTsg *hTsg,
232  uint32_t timeslice);
233 
242  NvRmGpuSchedTsg *hTsg);
243 
255  NvRmGpuSchedSession *hSession);
256 
266  NvRmGpuSchedSession *hSession);
267 
282  NvRmGpuSchedSession *hSession,
283  NvRmGpuSchedTsgSet **phSet);
284 
291  NvRmGpuSchedTsgSet *hSet);
292 
293 
294 #ifdef __cplusplus
295 }; /* end of extern "C" */
296 #endif /* __cplusplus */
297 
298 #endif /* NVRM_GPUSCHED_H */
NvRmGpuSchedSession
struct NvRmGpuSchedSessionRec NvRmGpuSchedSession
Definition: nvrm_gpusched.h:23
NvRmGpuSchedRunlistInterleave
NvRmGpuSchedRunlistInterleave
Definition: nvrm_gpusched.h:66
NvRmGpuSchedSessionAttrRec::reserved
uint32_t reserved
Definition: nvrm_gpusched.h:81
NVRM_GPUSCHED_STATUS_TIMED_OUT
@ NVRM_GPUSCHED_STATUS_TIMED_OUT
Operation timed out.
Definition: nvrm_gpusched.h:38
NvRmGpuSchedGetNextTsgId
NvRmGpuSchedStatus NvRmGpuSchedGetNextTsgId(NvRmGpuSchedTsgSet *hTsgSet, NvRmGpuSchedTsgId *tsgid)
Get next TSG identifier from a TSG set.
NvRmGpuSchedGetAllActiveTsgs
NvRmGpuSchedStatus NvRmGpuSchedGetAllActiveTsgs(NvRmGpuSchedTsgSet *hTsgSet)
Get list of all TSGs.
NVRM_GPUSCHED_RUNLIST_INTERLEAVE_MEDIUM
@ NVRM_GPUSCHED_RUNLIST_INTERLEAVE_MEDIUM
Definition: nvrm_gpusched.h:68
NvRmGpuSchedSetTsgInterleave
NvRmGpuSchedStatus NvRmGpuSchedSetTsgInterleave(NvRmGpuSchedTsg *hTsg, NvRmGpuSchedRunlistInterleave interleave)
Set runlist interleave for a TSG.
NVRM_GPUSCHED_STATUS_OUT_OF_MEMORY
@ NVRM_GPUSCHED_STATUS_OUT_OF_MEMORY
Out of memory.
Definition: nvrm_gpusched.h:40
NvRmGpuSchedTsg
struct NvRmGpuSchedTsgRec NvRmGpuSchedTsg
Definition: nvrm_gpusched.h:24
NVRM_GPUSCHED_STATUS_INVALID_SIZE
@ NVRM_GPUSCHED_STATUS_INVALID_SIZE
Invalid size.
Definition: nvrm_gpusched.h:52
NVRM_GPUSCHED_STATUS_INSUFFICIENT_BUFFERING
@ NVRM_GPUSCHED_STATUS_INSUFFICIENT_BUFFERING
Insufficient buffering.
Definition: nvrm_gpusched.h:50
NvRmGpuSchedTsgId
uint32_t NvRmGpuSchedTsgId
Definition: nvrm_gpusched.h:22
NvRmGpuSchedAllocateTsgSet
NvRmGpuSchedStatus NvRmGpuSchedAllocateTsgSet(NvRmGpuSchedSession *hSession, NvRmGpuSchedTsgSet **phSet)
Allocate a TSG set.
NVRM_GPUSCHED_RUNLIST_INTERLEAVE_HIGH
@ NVRM_GPUSCHED_RUNLIST_INTERLEAVE_HIGH
Definition: nvrm_gpusched.h:69
NVRM_GPUSCHED_STATUS_INCOMPATIBLE_VERSION
@ NVRM_GPUSCHED_STATUS_INCOMPATIBLE_VERSION
Incompatible version.
Definition: nvrm_gpusched.h:54
NvRmGpuSchedStatus
NvRmGpuSchedStatus
The set of all possible error codes.
Definition: nvrm_gpusched.h:30
NVRM_GPUSCHED_RUNLIST_INTERLEAVE_LOW
@ NVRM_GPUSCHED_RUNLIST_INTERLEAVE_LOW
Definition: nvrm_gpusched.h:67
NvRmGpuSchedUnlockControl
NvRmGpuSchedStatus NvRmGpuSchedUnlockControl(NvRmGpuSchedSession *hSession)
Unlock GPU scheduling control, to allow other application to change their own scheduling parameters u...
NvRmGpuSchedTsgParamsRec::timesliceUs
uint32_t timesliceUs
Definition: nvrm_gpusched.h:75
NVRM_GPUSCHED_STATUS_BAD_PARAMETER
@ NVRM_GPUSCHED_STATUS_BAD_PARAMETER
Bad parameter was passed.
Definition: nvrm_gpusched.h:34
NVRM_GPUSCHED_STATUS_NONE_PENDING
@ NVRM_GPUSCHED_STATUS_NONE_PENDING
No operation is pending.
Definition: nvrm_gpusched.h:48
NVRM_GPUSCHED_STATUS_NOT_SUPPORTED
@ NVRM_GPUSCHED_STATUS_NOT_SUPPORTED
Not supported.
Definition: nvrm_gpusched.h:44
NvRmGpuSchedGetDeltaTsgs
NvRmGpuSchedStatus NvRmGpuSchedGetDeltaTsgs(NvRmGpuSchedTsgSet *hTsgSet)
Get list of recent TSGs.
NvRmGpuSchedWaitTsgEvents
NvRmGpuSchedStatus NvRmGpuSchedWaitTsgEvents(NvRmGpuSchedSession *hSession, NvRmGpuSchedTsgEvents *events, uint32_t timeout)
Blocking wait on any TSG event.
NvRmGpuSchedReleaseTsgHandle
NvRmGpuSchedStatus NvRmGpuSchedReleaseTsgHandle(NvRmGpuSchedTsg *hTsg)
Release TSG handle.
NvRmGpuSchedTsgParams
struct NvRmGpuSchedTsgParamsRec NvRmGpuSchedTsgParams
NvRmGpuSchedTsgParamsRec::pid
pid_t pid
Definition: nvrm_gpusched.h:76
NVRM_GPUSCHED_TSG_EVENT_OPEN
@ NVRM_GPUSCHED_TSG_EVENT_OPEN
At least one TSG has been opened.
Definition: nvrm_gpusched.h:63
NvRmGpuSchedTsgParamsRec::interleave
NvRmGpuSchedRunlistInterleave interleave
Definition: nvrm_gpusched.h:74
NvRmGpuSchedTsgParamsRec::tsgid
NvRmGpuSchedTsgId tsgid
Definition: nvrm_gpusched.h:73
NvRmGpuSchedSessionAttrRec
Definition: nvrm_gpusched.h:79
NvRmGpuSchedTsgEvents
NvRmGpuSchedTsgEvents
Bitfield of TSG events.
Definition: nvrm_gpusched.h:60
NvRmGpuSchedSessionClose
void NvRmGpuSchedSessionClose(NvRmGpuSchedSession *hSession)
Close GPU scheduling control session.
NvRmGpuSchedLockControl
NvRmGpuSchedStatus NvRmGpuSchedLockControl(NvRmGpuSchedSession *hSession)
Lock GPU scheduling control, to prevent other application to change their own scheduling parameters u...
NvRmGpuSchedFreeTsgSet
void NvRmGpuSchedFreeTsgSet(NvRmGpuSchedTsgSet *hSet)
Free TSG set.
NVRM_GPUSCHED_STATUS_ERROR
@ NVRM_GPUSCHED_STATUS_ERROR
A catch-all error, used when no other error code applies.
Definition: nvrm_gpusched.h:46
params
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const params
Definition: PointCloudRangeImageCreator.h:292
NVRM_GPUSCHED_STATUS_OK
@ NVRM_GPUSCHED_STATUS_OK
The operation completed successfully; no error.
Definition: nvrm_gpusched.h:32
NvRmGpuSchedSessionOpen
NvRmGpuSchedStatus NvRmGpuSchedSessionOpen(const NvRmGpuSchedSessionAttr *attr, NvRmGpuSchedSession **phSession)
Open GPU scheduling control session.
NvRmGpuSchedGetTsgsByPid
NvRmGpuSchedStatus NvRmGpuSchedGetTsgsByPid(NvRmGpuSchedTsgSet *hTsgSet, pid_t pid)
Get list of TSGs for a given pid.
NvRmGpuSchedSetTsgTimeslice
NvRmGpuSchedStatus NvRmGpuSchedSetTsgTimeslice(NvRmGpuSchedTsg *hTsg, uint32_t timeslice)
Set timeslice for a TSG.
NVRM_GPUSCHED_STATUS_PENDING
@ NVRM_GPUSCHED_STATUS_PENDING
Operation has not finished yet.
Definition: nvrm_gpusched.h:36
NvRmGpuSchedGetTsgHandle
NvRmGpuSchedStatus NvRmGpuSchedGetTsgHandle(NvRmGpuSchedSession *hSession, NvRmGpuSchedTsgId tsgid, NvRmGpuSchedTsg **phTsg)
Get a handle to a TSG.
NvRmGpuSchedTsgParamsRec
Definition: nvrm_gpusched.h:72
NvRmGpuSchedTsgSet
struct NvRmGpuSchedTsgSetRec NvRmGpuSchedTsgSet
Definition: nvrm_gpusched.h:25
NvRmGpuSchedSessionAttr
struct NvRmGpuSchedSessionAttrRec NvRmGpuSchedSessionAttr
NVRM_GPUSCHED_STATUS_NOT_INITIALIZED
@ NVRM_GPUSCHED_STATUS_NOT_INITIALIZED
Not initialized.
Definition: nvrm_gpusched.h:42
NvRmGpuSchedGetTsgParams
NvRmGpuSchedStatus NvRmGpuSchedGetTsgParams(NvRmGpuSchedTsg *hTsg, NvRmGpuSchedTsgParams *params)
Get current GPU scheduling parameters for a TSG.