Go to the source code of this file.
Data Structures | |
| struct | NvRmGpuSchedTsgParamsRec |
| struct | NvRmGpuSchedSessionAttrRec |
Macros | |
| #define | NVRM_GPUSCHED_DEFINE_SESSION_ATTR(x) NvRmGpuSchedSessionAttr x = { 0 } |
| #define | NVRM_GPUSCHED_WAIT_INFINITE ((uint32_t)-1) |
Typedefs | |
| typedef uint32_t | NvRmGpuSchedTsgId |
| typedef struct NvRmGpuSchedSessionRec | NvRmGpuSchedSession |
| typedef struct NvRmGpuSchedTsgRec | NvRmGpuSchedTsg |
| typedef struct NvRmGpuSchedTsgSetRec | NvRmGpuSchedTsgSet |
| typedef struct NvRmGpuSchedTsgParamsRec | NvRmGpuSchedTsgParams |
| typedef struct NvRmGpuSchedSessionAttrRec | NvRmGpuSchedSessionAttr |
Enumerations | |
| enum | NvRmGpuSchedStatus { NVRM_GPUSCHED_STATUS_OK = 0, NVRM_GPUSCHED_STATUS_BAD_PARAMETER, NVRM_GPUSCHED_STATUS_PENDING, NVRM_GPUSCHED_STATUS_TIMED_OUT, NVRM_GPUSCHED_STATUS_OUT_OF_MEMORY, NVRM_GPUSCHED_STATUS_NOT_INITIALIZED, NVRM_GPUSCHED_STATUS_NOT_SUPPORTED, NVRM_GPUSCHED_STATUS_ERROR, NVRM_GPUSCHED_STATUS_NONE_PENDING, NVRM_GPUSCHED_STATUS_INSUFFICIENT_BUFFERING, NVRM_GPUSCHED_STATUS_INVALID_SIZE, NVRM_GPUSCHED_STATUS_INCOMPATIBLE_VERSION } |
| The set of all possible error codes. More... | |
| enum | NvRmGpuSchedTsgEvents { NVRM_GPUSCHED_TSG_EVENT_OPEN = (1ULL << 0) } |
| Bitfield of TSG events. More... | |
| enum | NvRmGpuSchedRunlistInterleave { NVRM_GPUSCHED_RUNLIST_INTERLEAVE_LOW = 1, NVRM_GPUSCHED_RUNLIST_INTERLEAVE_MEDIUM = 2, NVRM_GPUSCHED_RUNLIST_INTERLEAVE_HIGH = 3 } |
| #define NVRM_GPUSCHED_DEFINE_SESSION_ATTR | ( | x | ) | NvRmGpuSchedSessionAttr x = { 0 } |
Definition at line 84 of file nvrm_gpusched.h.
| #define NVRM_GPUSCHED_WAIT_INFINITE ((uint32_t)-1) |
Definition at line 87 of file nvrm_gpusched.h.
| typedef struct NvRmGpuSchedSessionRec NvRmGpuSchedSession |
Definition at line 23 of file nvrm_gpusched.h.
| typedef struct NvRmGpuSchedSessionAttrRec NvRmGpuSchedSessionAttr |
| typedef struct NvRmGpuSchedTsgRec NvRmGpuSchedTsg |
Definition at line 24 of file nvrm_gpusched.h.
| typedef uint32_t NvRmGpuSchedTsgId |
Definition at line 22 of file nvrm_gpusched.h.
| typedef struct NvRmGpuSchedTsgParamsRec NvRmGpuSchedTsgParams |
| typedef struct NvRmGpuSchedTsgSetRec NvRmGpuSchedTsgSet |
Definition at line 25 of file nvrm_gpusched.h.
| Enumerator | |
|---|---|
| NVRM_GPUSCHED_RUNLIST_INTERLEAVE_LOW | |
| NVRM_GPUSCHED_RUNLIST_INTERLEAVE_MEDIUM | |
| NVRM_GPUSCHED_RUNLIST_INTERLEAVE_HIGH | |
Definition at line 66 of file nvrm_gpusched.h.
| enum NvRmGpuSchedStatus |
The set of all possible error codes.
Definition at line 30 of file nvrm_gpusched.h.
Bitfield of TSG events.
| Enumerator | |
|---|---|
| NVRM_GPUSCHED_TSG_EVENT_OPEN | At least one TSG has been opened. |
Definition at line 60 of file nvrm_gpusched.h.
| NvRmGpuSchedStatus NvRmGpuSchedAllocateTsgSet | ( | NvRmGpuSchedSession * | hSession, |
| NvRmGpuSchedTsgSet ** | phSet | ||
| ) |
Allocate a TSG set.
TSG set contains an internal iterator which is reset every time the set is used with a query functions like NvRmGpuSchedGetAllActiveTsgs, NvRmGpuSchedGetDeltaTsgs or NvRmGpuSchedGetTsgByPids. TSG set is recyclable, i.e. it can be used several times with query functions.
| session | - pointer to session |
| phSet | - address of TSG set handle to be allocated |
| void NvRmGpuSchedFreeTsgSet | ( | NvRmGpuSchedTsgSet * | hSet | ) |
Free TSG set.
| hSet | - TSG set handle |
| NvRmGpuSchedStatus NvRmGpuSchedGetAllActiveTsgs | ( | NvRmGpuSchedTsgSet * | hTsgSet | ) |
Get list of all TSGs.
| hTsgSet | - handle to TSG set. will contain active TSGs on success. |
| NvRmGpuSchedStatus NvRmGpuSchedGetDeltaTsgs | ( | NvRmGpuSchedTsgSet * | hTsgSet | ) |
Get list of recent TSGs.
The first time this function is invoked, it returns the complete list of TSGs. Afterwards, it returns the list of TSGs that were opened since last invocation of this function.
| hTsgSet | - handle to TSG set. will contain delta TSGs on success. |
| NvRmGpuSchedStatus NvRmGpuSchedGetNextTsgId | ( | NvRmGpuSchedTsgSet * | hTsgSet, |
| NvRmGpuSchedTsgId * | tsgid | ||
| ) |
Get next TSG identifier from a TSG set.
TSG set has an internal iterator which is incremented until all TSGs in the set are iterated.
| hTsgSet | - handle to TSG set |
| tsgid | - a TSG identifier |
| NvRmGpuSchedStatus NvRmGpuSchedGetTsgHandle | ( | NvRmGpuSchedSession * | hSession, |
| NvRmGpuSchedTsgId | tsgid, | ||
| NvRmGpuSchedTsg ** | phTsg | ||
| ) |
Get a handle to a TSG.
Acquiring the TSG ensures it is not re-allocated while setting scheduling parameters. After setting scheduling parameters, this handle must be released using NvRmGpuSchedReleaseTsgHandle.
| hSession | - session handle |
| tsgid | - a TSG identifier |
| phTsg | - address of TSG handle to be allocated |
| NvRmGpuSchedStatus NvRmGpuSchedGetTsgParams | ( | NvRmGpuSchedTsg * | hTsg, |
| NvRmGpuSchedTsgParams * | params | ||
| ) |
Get current GPU scheduling parameters for a TSG.
| hTsg | - handle to TSG |
| params | - GPU scheduling parameters |
| NvRmGpuSchedStatus NvRmGpuSchedGetTsgsByPid | ( | NvRmGpuSchedTsgSet * | hTsgSet, |
| pid_t | pid | ||
| ) |
Get list of TSGs for a given pid.
| hTsgSet | - handle to TSG set. will contain process's TSGs on success. |
| pid | - process identifier |
| NvRmGpuSchedStatus NvRmGpuSchedLockControl | ( | NvRmGpuSchedSession * | hSession | ) |
Lock GPU scheduling control, to prevent other application to change their own scheduling parameters using the per-TSG API.
Locking is non sticky: it ends when the session is closed, or when the app manager exits.
| hSession | - session handle |
| NvRmGpuSchedStatus NvRmGpuSchedReleaseTsgHandle | ( | NvRmGpuSchedTsg * | hTsg | ) |
Release TSG handle.
| hTsg | - handle to TSG |
| void NvRmGpuSchedSessionClose | ( | NvRmGpuSchedSession * | hSession | ) |
Close GPU scheduling control session.
| hSession | - session handle |
| NvRmGpuSchedStatus NvRmGpuSchedSessionOpen | ( | const NvRmGpuSchedSessionAttr * | attr, |
| NvRmGpuSchedSession ** | phSession | ||
| ) |
Open GPU scheduling control session.
| attr | - session attributes |
| phSession | - address of GPU sched session handle to be allocated |
| NvRmGpuSchedStatus NvRmGpuSchedSetTsgInterleave | ( | NvRmGpuSchedTsg * | hTsg, |
| NvRmGpuSchedRunlistInterleave | interleave | ||
| ) |
Set runlist interleave for a TSG.
| hTsg | - handle to TSG |
| interleave | - interleave level |
| NvRmGpuSchedStatus NvRmGpuSchedSetTsgTimeslice | ( | NvRmGpuSchedTsg * | hTsg, |
| uint32_t | timeslice | ||
| ) |
Set timeslice for a TSG.
| hTsg | - handle to TSG |
| timeslice | - timeslice in usecs. |
| NvRmGpuSchedStatus NvRmGpuSchedUnlockControl | ( | NvRmGpuSchedSession * | hSession | ) |
Unlock GPU scheduling control, to allow other application to change their own scheduling parameters using the per-TSG API.
| hSession | - pointer to session |
| NvRmGpuSchedStatus NvRmGpuSchedWaitTsgEvents | ( | NvRmGpuSchedSession * | hSession, |
| NvRmGpuSchedTsgEvents * | events, | ||
| uint32_t | timeout | ||
| ) |
Blocking wait on any TSG event.
| session | - session handle |
| events | - output bitfield of TSG event that occurred. can be NULL, if caller does not need this information. |
| timeout | - timeout value in milliseconds. NVRM_GPUSCHED_WAIT_INFINITE to wait infinitely. |