Data Structures | |
| struct | NvRmGpuDeviceOpenAttrRec |
| Extensible attribute structure for NvRmGpuDeviceOpen() More... | |
Macros | |
| #define | NVRM_GPU_DEVICE_INDEX_DEFAULT (-1) |
| Pseudo-index for the default (primary) device. More... | |
| #define | NVRM_GPU_DEFINE_DEVICE_OPEN_ATTR(x) NvRmGpuDeviceOpenAttr x = { NvRmGpuSyncType_Default, false } |
| Definer macro for NvRmGpuDeviceOpen(). More... | |
Typedefs | |
| typedef struct NvRmGpuDeviceRec | NvRmGpuDevice |
| Device handle. More... | |
| typedef struct NvRmGpuDeviceOpenAttrRec | NvRmGpuDeviceOpenAttr |
| Extensible attribute structure for NvRmGpuDeviceOpen() More... | |
Enumerations | |
| enum | NvRmGpuSyncType { NvRmGpuSyncType_Default, NvRmGpuSyncType_SyncFd, NvRmGpuSyncType_Syncpoint } |
| Inter-engine synchronization type for GPU jobs. More... | |
Functions | |
| NvError | NvRmGpuDeviceOpen (NvRmGpuLib *hLib, int deviceIndex, const NvRmGpuDeviceOpenAttr *attr, NvRmGpuDevice **phDevice) |
| Opens a GPU device. More... | |
| NvError | NvRmGpuDeviceClose (NvRmGpuDevice *hDevice) |
| Closes the GPU device. More... | |
| #define NVRM_GPU_DEFINE_DEVICE_OPEN_ATTR | ( | x | ) | NvRmGpuDeviceOpenAttr x = { NvRmGpuSyncType_Default, false } |
Definer macro for NvRmGpuDeviceOpen().
This macro defines a variable of type NvRmGpuDeviceOpenAttr with the default values.
Definition at line 785 of file nvrm_gpu.h.
| #define NVRM_GPU_DEVICE_INDEX_DEFAULT (-1) |
Pseudo-index for the default (primary) device.
NVRM_GPU_DEFAULT_DEVICE_INDEX.Definition at line 681 of file nvrm_gpu.h.
| typedef struct NvRmGpuDeviceRec NvRmGpuDevice |
Device handle.
Definition at line 351 of file nvrm_gpu.h.
| typedef struct NvRmGpuDeviceOpenAttrRec NvRmGpuDeviceOpenAttr |
Extensible attribute structure for NvRmGpuDeviceOpen()
| enum NvRmGpuSyncType |
Inter-engine synchronization type for GPU jobs.
The usual GPU channels (also known as KMD kickoff channels) support attaching pre-fences and post-fences with job submission. The pre-fence is a synchronization condition that must be met before the job execution can begin. Respectively, the post-fence is a synchronization condition that will be triggered after the job execution has completed. This allows a larger task to be split into parts where GPU and other engines seamlessly process the data in multiple stages. For example:
Depending on the operating system and HW capabilities, different synchronization object types are available:
Definition at line 721 of file nvrm_gpu.h.
| NvError NvRmGpuDeviceClose | ( | NvRmGpuDevice * | hDevice | ) |
Closes the GPU device.
| [in] | hDevice | Device handle to close. May be NULL. |
| NvSuccess | Device closed and all related resources released successfully, or device handle was NULL. |
| NvError_* | Unspecified error. Device handle is closed, but some resources may be left unreleased. Error code is returned only for diagnostic purposes. |
Usage considerations
| NvError NvRmGpuDeviceOpen | ( | NvRmGpuLib * | hLib, |
| int | deviceIndex, | ||
| const NvRmGpuDeviceOpenAttr * | attr, | ||
| NvRmGpuDevice ** | phDevice | ||
| ) |
Opens a GPU device.
| [in] | hLib | Library handle |
| [in] | deviceIndex | Device index (NvRmGpuLibDeviceListEntry::deviceIndex) or NVRM_GPU_DEVICE_INDEX_DEFAULT for the default device. |
| [in] | attr | Pointer to device open attributes or NULL for defaults. |
| [out] | phDevice | Pointer to receive the device handle. |
| NvSuccess | Device opened successfully. |
| NvError_BadValue | Bad device index |
| NvError_DeviceNotFound | Device node not found |
| NvError_AccessDenied | Not enough privileges to access the device |
| NvError_* | Unspecified error. Error code returned for diagnostic purposes. |
Usage considerations