NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
nvrm_gpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2019 NVIDIA Corporation. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 
11 #ifndef INCLUDED_nvrm_gpu_H
12 #define INCLUDED_nvrm_gpu_H
13 
14 #include <stdbool.h>
15 #include <stdint.h>
16 #include <stddef.h>
17 
18 #include "nvcommon.h"
19 #include "nverror.h"
20 
21 #if defined(__cplusplus)
22 extern "C"
23 {
24 #endif
25 
26 #if defined(NVRM_GPU_BUILD_VARIANT)
27 namespace nvrm_gpu
28 {
29 #endif
30 
37 #if defined(NVRM_GPU_UNIT_TEST_BUILD) && (NVRM_GPU_UNIT_TEST_BUILD)
38 #define NVRM_GPU_ATTR_NAMESPACE(x) ::nvrm_gpu::x
39 #else
40 #define NVRM_GPU_ATTR_NAMESPACE(x) x
41 #endif
42 
92 
93 // -------------------------------------------------
94 // --------------- API Groups ----------------------
95 // -------------------------------------------------
96 
98 
101 
105 
108 
112 
113 // -------------------------------------------------
114 // --------------- Handles -------------------------
115 // -------------------------------------------------
116 
124 typedef struct NvRmGpuLibRec NvRmGpuLib;
125 
133 typedef struct NvRmGpuDeviceRec NvRmGpuDevice;
134 
140 typedef struct NvRmGpuDeviceEventSessionRec NvRmGpuDeviceEventSession;
141 
142 
143 // -------------------------------------------------
144 // --------------- Library functions ---------------
145 // -------------------------------------------------
146 
164 typedef struct NvRmGpuLibOpenAttrRec
165 {
167  uint32_t reserved;
168 
170 
177 #define NVRM_GPU_DEFINE_LIB_OPEN_ATTR(x) \
178  NVRM_GPU_ATTR_NAMESPACE(NvRmGpuLibOpenAttr) x = { 0U }
179 
236 
259 
267 typedef enum
268 {
271 
275 
278 
282 
284 
285 
292 {
295 
300 
306 
316  const char *name;
318 
341 const NvRmGpuLibDeviceListEntry *NvRmGpuLibListDevices(NvRmGpuLib *hLib, size_t *pNumDevices);
342 
365 NvError NvRmGpuLibAttachDevice(NvRmGpuLib *hLib, int deviceIndex);
366 
389 NvError NvRmGpuLibDetachDevice(NvRmGpuLib *hLib, int deviceIndex);
390 
391 
401 #define NVRM_GPU_DEVICE_INDEX_DEFAULT (-1)
402 
441 typedef enum
442 {
451 
454 
458 
459 
469 {
483 
496 
505 #define NVRM_GPU_DEFINE_DEVICE_OPEN_ATTR(x) \
506  NVRM_GPU_ATTR_NAMESPACE(NvRmGpuDeviceOpenAttr) x = { NVRM_GPU_ATTR_NAMESPACE(NvRmGpuSyncType_Default), false }
507 
508 
533 NvError NvRmGpuDeviceOpen(NvRmGpuLib *hLib, int deviceIndex, const NvRmGpuDeviceOpenAttr *attr,
534  NvRmGpuDevice **phDevice);
535 
559 
560 
561 #if NVOS_IS_LINUX || NVOS_IS_QNX
562 
567 #define NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "d"
568 
578 typedef int NvRmGpuClockAsyncReqHandle;
579 #else
580 
585 #define NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "p"
586 
606 #endif
607 
615 typedef enum
616 {
619 
622 
626 
631 typedef enum NvRmGpuClockType
632 {
638 
644 
648 
649 
655 {
661 
667 
672  uint64_t freqHz;
673 
675 
681 {
684 
686  uint64_t freqHz;
688 
693 typedef struct NvRmGpuClockRangeRec
694 {
695  uint64_t minHz;
696  uint64_t maxHz;
698 
703 typedef struct NvRmGpuClockPointRec
704 {
705  uint64_t freqHz;
707 
713 {
716 
719 
722  size_t maxVfPoints;
723 
725 
754  const NvRmGpuClockDomainInfo **infos,
755  size_t *pNumDomains);
756 
785  NvRmGpuClockDomain domain,
786  NvRmGpuClockPoint *pClkPoints,
787  size_t *pNumPoints);
788 
888  const NvRmGpuClockSetEntry *pClkSetEntries,
889  size_t numEntries,
891 
916  const NvRmGpuClockAsyncReqHandle *phReqs,
917  size_t numEntries,
918  uint32_t timeoutMs);
919 
920 
942 
943 
947  uint32_t timeoutMs);
948 
949 
984  NvRmGpuClockGetEntry *pClkGetEntries,
985  size_t numEntries);
986 
989 typedef enum
990 {
993 
996 
1000 
1019  const NvRmGpuDeviceVoltage **pSensors,
1020  size_t *pNumSensors);
1021 
1022 
1042  NvRmGpuDeviceVoltage which,
1043  uint64_t *pVoltageMicroVolt);
1044 
1047 typedef enum
1048 {
1052 
1053 
1073  const NvRmGpuDeviceCurrent **pSensors,
1074  size_t *pNumSensors);
1075 
1095  NvRmGpuDeviceCurrent which,
1096  uint64_t *pCurrentMicroAmpere);
1097 
1100 typedef enum
1101 {
1105 
1124  const NvRmGpuDevicePower **pSensors,
1125  size_t *pNumSensors);
1126 
1146  NvRmGpuDevicePower which,
1147  uint64_t *pPowerMicroWatt);
1148 
1149 
1152 typedef enum
1153 {
1157 
1176  const NvRmGpuDeviceTemperature **pSensors,
1177  size_t *pNumSensors);
1178 
1200  int32_t *pTemperatureMilliCelsius);
1201 
1218  int32_t temperature_mC);
1219 
1220 
1225 typedef enum
1226 {
1227  // @brief Frequency change event
1236 
1242 
1249 
1255 
1263 
1272 
1279 
1290 
1293 
1295 
1306 {
1312 
1315 
1317 
1325 #define NVRM_GPU_DEFINE_DEVICE_EVENT_SESSION_ATTR(x) \
1326  NVRM_GPU_ATTR_NAMESPACE(NvRmGpuDeviceEventSessionOpenAttr) x = { NULL, 0 }
1327 
1336 {
1337  static const NvRmGpuDeviceEventId allEvents[] =
1338  {
1347  };
1348  attr->filterList = allEvents;
1349  attr->filterListSize = NV_ARRAY_SIZE(allEvents);
1350 }
1351 
1371  NvRmGpuDeviceEventSession **phSession);
1372 
1382 {
1385 
1396  uint64_t timeNs;
1397 
1399 
1425  NvRmGpuDeviceEventInfo *pEventInfo,
1426  uint32_t timeoutMs);
1427 
1443 
1444 #if defined(NVRM_GPU_BUILD_VARIANT)
1445 } // namespace nvrm_gpu
1446 #endif
1447 
1448 #if defined(__cplusplus)
1449 }
1450 #endif
1451 
1452 #if !defined(NV_SDK_BUILD)
1453 #include "nvrm_gpu_priv.h"
1454 #endif
1455 
1456 #endif
NvRmGpuClockSetEntryRec::freqHz
uint64_t freqHz
Frequency for clock request.
Definition: nvrm_gpu.h:686
NvRmGpuLibOpen
NvRmGpuLib * NvRmGpuLibOpen(const NvRmGpuLibOpenAttr *attr)
Opens a new instance of the nvrm_gpu library.
NvRmGpuClockDomainInfoRec::maxVfPoints
size_t maxVfPoints
Maximum number of voltage/frequency points returned by NvRmGpuClockGetPoints()
Definition: nvrm_gpu.h:722
NvRmGpuLibOpenAttrRec
Extensible attribute structure for NvRmGpuLibOpen()
Definition: nvrm_gpu.h:164
NvRmGpuClockDomain_Count
@ NvRmGpuClockDomain_Count
Number of clock domains.
Definition: nvrm_gpu.h:624
NvRmGpuLibDeviceListEntryRec::deviceState
NvRmGpuLibDeviceState deviceState
Device attachment state.
Definition: nvrm_gpu.h:299
NvRmGpuDeviceGetVoltage
NvError NvRmGpuDeviceGetVoltage(NvRmGpuDevice *hDevice, NvRmGpuDeviceVoltage which, uint64_t *pVoltageMicroVolt)
Retrieves the voltage sensor reading.
NvRmGpuDeviceListVoltageSensors
NvError NvRmGpuDeviceListVoltageSensors(NvRmGpuDevice *hDevice, const NvRmGpuDeviceVoltage **pSensors, size_t *pNumSensors)
Returns the list of available voltage sensors for the device.
NvRmGpuDeviceEventId_AlarmVfTableUpdateFailed
@ NvRmGpuDeviceEventId_AlarmVfTableUpdateFailed
VF table update failed.
Definition: nvrm_gpu.h:1262
NvRmGpuLibDeviceState_Attached
@ NvRmGpuLibDeviceState_Attached
Device is attached and may be opened with NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:270
NvRmGpuClockWaitAsyncReq
NvError NvRmGpuClockWaitAsyncReq(NvRmGpuDevice *hDevice, const NvRmGpuClockAsyncReqHandle *phReqs, size_t numEntries, uint32_t timeoutMs)
Waits for the completion of one or more asynchronous clock requests.
NvRmGpuDeviceEventSessionOpenAttrRec::filterList
const NvRmGpuDeviceEventId * filterList
List of events to listen.
Definition: nvrm_gpu.h:1311
NvRmGpuDeviceEventSession
struct NvRmGpuDeviceEventSessionRec NvRmGpuDeviceEventSession
Device event session handle.
Definition: nvrm_gpu.h:140
NvRmGpuDeviceEventId
NvRmGpuDeviceEventId
Definition: nvrm_gpu.h:1225
NvRmGpuDeviceEventId_Count
@ NvRmGpuDeviceEventId_Count
Number of events.
Definition: nvrm_gpu.h:1292
NvRmGpuDeviceEventId_AlarmLocalTargetVfNotPossible
@ NvRmGpuDeviceEventId_AlarmLocalTargetVfNotPossible
A clock domain frequency is below local target frequency requested by a session.
Definition: nvrm_gpu.h:1248
NvRmGpuDeviceVoltage_SRAM
@ NvRmGpuDeviceVoltage_SRAM
SRAM voltage.
Definition: nvrm_gpu.h:995
NvRmGpuLibAttachDevice
NvError NvRmGpuLibAttachDevice(NvRmGpuLib *hLib, int deviceIndex)
Attaches and powers up a GPU.
NvRmGpuDeviceEventId_AlarmTargetVfNotPossible
@ NvRmGpuDeviceEventId_AlarmTargetVfNotPossible
A clock domain frequency is below target.
Definition: nvrm_gpu.h:1241
NvRmGpuLib
struct NvRmGpuLibRec NvRmGpuLib
Library handle.
Definition: nvrm_gpu.h:124
NvRmGpuClockDomainInfoRec::range
NvRmGpuClockRange range
Frequency range of the clock domain.
Definition: nvrm_gpu.h:718
NvRmGpuClockAsyncNotImplemented
OS-specific type of asynchronous clock request handle (unimplemented).
NvRmGpuClockDomainInfo
struct NvRmGpuClockDomainInfoRec NvRmGpuClockDomainInfo
Clock domain info.
nverror.h
NvRmGpuDeviceEventId_VfUpdate
@ NvRmGpuDeviceEventId_VfUpdate
Voltage/frequency update occurred for a clock domain.
Definition: nvrm_gpu.h:1235
NvRmGpuDeviceVoltage
NvRmGpuDeviceVoltage
Voltage sensors.
Definition: nvrm_gpu.h:989
NvRmGpuClockCloseAsyncReq
NvError NvRmGpuClockCloseAsyncReq(NvRmGpuDevice *hDevice, NvRmGpuClockAsyncReqHandle hReq)
Closes an asynchronous clock request handle.
NvRmGpuDeviceEventSessionOpenAttrSetAllEvents
static void NvRmGpuDeviceEventSessionOpenAttrSetAllEvents(NvRmGpuDeviceEventSessionOpenAttr *attr)
Assigns device events attribute structure with a list of all events to listen to.
Definition: nvrm_gpu.h:1335
NvRmGpuClockDomain_GPCCLK
@ NvRmGpuClockDomain_GPCCLK
Main graphics core clock.
Definition: nvrm_gpu.h:621
NvRmGpuLibDeviceListEntryRec::deviceIndex
int deviceIndex
Internal device index. Used in NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:294
NvRmGpuLibDeviceListEntryRec::hasDeviceStateControl
bool hasDeviceStateControl
Indicates whether the device can be attached/detached by the user.
Definition: nvrm_gpu.h:305
NvRmGpuDeviceListPowerSensors
NvError NvRmGpuDeviceListPowerSensors(NvRmGpuDevice *hDevice, const NvRmGpuDevicePower **pSensors, size_t *pNumSensors)
Returns the list of available power sensors for the device.
NvRmGpuLibDeviceListEntryRec
Device list entry.
Definition: nvrm_gpu.h:291
NvRmGpuClockGetPoints
NvError NvRmGpuClockGetPoints(NvRmGpuDevice *hDevice, NvRmGpuClockDomain domain, NvRmGpuClockPoint *pClkPoints, size_t *pNumPoints)
Retrieves voltage/frequency (VF) points for a given clock domain. For information about VF points,...
NvRmGpuDeviceEventInfoRec
GPU device event.
Definition: nvrm_gpu.h:1381
NvRmGpuDeviceEventInfo
struct NvRmGpuDeviceEventInfoRec NvRmGpuDeviceEventInfo
GPU device event.
NvRmGpuClockSetEntry
struct NvRmGpuClockSetEntryRec NvRmGpuClockSetEntry
Entry for clock set request.
nvcommon.h
NvRmGpuClockSetEntryRec::domain
NvRmGpuClockDomain domain
Domain for clock request.
Definition: nvrm_gpu.h:683
NvRmGpuClockDomainInfoRec
Clock domain info.
Definition: nvrm_gpu.h:712
NvRmGpuSyncType_Syncpoint
@ NvRmGpuSyncType_Syncpoint
Synchronization type is Tegra HOST1X syncpoint.
Definition: nvrm_gpu.h:456
NvRmGpuLibClose
NvError NvRmGpuLibClose(NvRmGpuLib *hLib)
Closes the library and releases all resources.
NvRmGpuClockGetDomains
NvError NvRmGpuClockGetDomains(NvRmGpuDevice *hDevice, const NvRmGpuClockDomainInfo **infos, size_t *pNumDomains)
Returns available GPU clock domains for the device.
NvRmGpuClockSetEntryRec
Entry for clock set request.
Definition: nvrm_gpu.h:680
NvRmGpuClockDomain_MCLK
@ NvRmGpuClockDomain_MCLK
Memory clock.
Definition: nvrm_gpu.h:618
NvRmGpuClockPointRec::freqHz
uint64_t freqHz
Definition: nvrm_gpu.h:705
NvRmGpuClockGetEntryRec
Entry for clock get request.
Definition: nvrm_gpu.h:654
NvRmGpuDeviceVoltage_Core
@ NvRmGpuDeviceVoltage_Core
Core GPU voltage.
Definition: nvrm_gpu.h:992
NvRmGpuClockWaitAnyEvent
NvError NvRmGpuClockWaitAnyEvent(NvRmGpuDevice *hDevice, uint32_t timeoutMs)
This function is not implemented and it should be deleted.
NvRmGpuDeviceGetCurrent
NvError NvRmGpuDeviceGetCurrent(NvRmGpuDevice *hDevice, NvRmGpuDeviceCurrent which, uint64_t *pCurrentMicroAmpere)
Retrieves the electric current reading.
NvRmGpuLibListDevices
const NvRmGpuLibDeviceListEntry * NvRmGpuLibListDevices(NvRmGpuLib *hLib, size_t *pNumDevices)
Returns the list of probed GPUs.
NvRmGpuDeviceEventId_AlarmThermalAboveThreshold
@ NvRmGpuDeviceEventId_AlarmThermalAboveThreshold
Temperature above threshold.
Definition: nvrm_gpu.h:1271
NvRmGpuDevicePower
NvRmGpuDevicePower
Electric power sensors.
Definition: nvrm_gpu.h:1100
NvRmGpuDeviceEventId_AlarmGpuLost
@ NvRmGpuDeviceEventId_AlarmGpuLost
Device lost.
Definition: nvrm_gpu.h:1289
NvRmGpuDeviceVoltage_Bus
@ NvRmGpuDeviceVoltage_Bus
Bus voltage.
Definition: nvrm_gpu.h:998
NvRmGpuDeviceEventSessionOpenAttrRec::filterListSize
size_t filterListSize
Number of entries in the event list.
Definition: nvrm_gpu.h:1314
NvRmGpuClockGetEntryRec::type
NvRmGpuClockType type
(IN) Request type
Definition: nvrm_gpu.h:666
NvRmGpuClockAsyncReqHandle
struct NvRmGpuClockAsyncNotImplemented * NvRmGpuClockAsyncReqHandle
OS-specific type of asynchronous clock request handle.
Definition: nvrm_gpu.h:605
NvRmGpuDeviceEventSessionOpenAttr
struct NvRmGpuDeviceEventSessionOpenAttrRec NvRmGpuDeviceEventSessionOpenAttr
Extensible attribute structure for NvRmGpuDeviceEventSessionOpen().
NvRmGpuSyncType_SyncFd
@ NvRmGpuSyncType_SyncFd
Synchronization type is Android/Linux sync fd.
Definition: nvrm_gpu.h:453
NvRmGpuDeviceTemperature
NvRmGpuDeviceTemperature
Temperature sensors.
Definition: nvrm_gpu.h:1152
NvRmGpuClockGetEntryRec::domain
NvRmGpuClockDomain domain
(IN) Domain for the clock request
Definition: nvrm_gpu.h:660
NvRmGpuDeviceListCurrentSensors
NvError NvRmGpuDeviceListCurrentSensors(NvRmGpuDevice *hDevice, const NvRmGpuDeviceCurrent **pSensors, size_t *pNumSensors)
Returns the list of available electric current sensors for the device.
NvRmGpuDeviceOpen
NvError NvRmGpuDeviceOpen(NvRmGpuLib *hLib, int deviceIndex, const NvRmGpuDeviceOpenAttr *attr, NvRmGpuDevice **phDevice)
Opens a GPU device.
NvRmGpuDeviceClose
NvError NvRmGpuDeviceClose(NvRmGpuDevice *hDevice)
Closes the GPU device.
NvRmGpuSyncType
NvRmGpuSyncType
Inter-engine synchronization type for GPU jobs.
Definition: nvrm_gpu.h:441
NvRmGpuDeviceEventSessionClose
NvError NvRmGpuDeviceEventSessionClose(NvRmGpuDeviceEventSession *hSession)
Closes the device event session.
NvRmGpuDeviceEventSessionRead
NvError NvRmGpuDeviceEventSessionRead(NvRmGpuDeviceEventSession *hSession, NvRmGpuDeviceEventInfo *pEventInfo, uint32_t timeoutMs)
Read next device event.
NvRmGpuDeviceEventInfoRec::timeNs
uint64_t timeNs
GPU time (in nanoseconds)
Definition: nvrm_gpu.h:1396
NvRmGpuDeviceEventId_AlarmPowerAboveThreshold
@ NvRmGpuDeviceEventId_AlarmPowerAboveThreshold
Power above threshold.
Definition: nvrm_gpu.h:1278
NvRmGpuClockDomainInfoRec::domain
NvRmGpuClockDomain domain
Clock domain.
Definition: nvrm_gpu.h:715
NvRmGpuDeviceOpenAttrRec::sandboxFriendlyChannels
bool sandboxFriendlyChannels
Ignored field.
Definition: nvrm_gpu.h:494
NvRmGpuLibDeviceState_Detached
@ NvRmGpuLibDeviceState_Detached
Device is detached and powered off.
Definition: nvrm_gpu.h:274
NvRmGpuClockGetEntryRec::freqHz
uint64_t freqHz
(OUT) Frequency in Hz
Definition: nvrm_gpu.h:672
NvRmGpuClockType_Effective
@ NvRmGpuClockType_Effective
Effective clock as measured from hardware.
Definition: nvrm_gpu.h:646
NvRmGpuClockGetEntry
struct NvRmGpuClockGetEntryRec NvRmGpuClockGetEntry
Entry for clock get request.
NvRmGpuLibDeviceState_Unknown
@ NvRmGpuLibDeviceState_Unknown
Device state is not known.
Definition: nvrm_gpu.h:281
NvRmGpuClockRangeRec::maxHz
uint64_t maxHz
Definition: nvrm_gpu.h:696
NvRmGpuDeviceThermalAlertSetLimit
NvError NvRmGpuDeviceThermalAlertSetLimit(NvRmGpuDevice *hDevice, int32_t temperature_mC)
Sets the thermal alert limit.
NvRmGpuClockDomain
NvRmGpuClockDomain
Clock domains.
Definition: nvrm_gpu.h:615
NvRmGpuLibOpenAttrRec::reserved
uint32_t reserved
Dummy field for C/C++ ABI compatibility.
Definition: nvrm_gpu.h:167
NvRmGpuClockPointRec
Clock voltage/frequency point.
Definition: nvrm_gpu.h:703
NvRmGpuLibDeviceState_InsufficientPrivileges
@ NvRmGpuLibDeviceState_InsufficientPrivileges
Device exists, but not enough privileges to access.
Definition: nvrm_gpu.h:277
NvRmGpuDeviceCurrent
NvRmGpuDeviceCurrent
Electric current sensors.
Definition: nvrm_gpu.h:1047
NvRmGpuLibDeviceState
NvRmGpuLibDeviceState
Device attachment state.
Definition: nvrm_gpu.h:267
NvRmGpuClockRangeRec::minHz
uint64_t minHz
Definition: nvrm_gpu.h:695
NvRmGpuDeviceOpenAttrRec
Extensible attribute structure for NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:468
NvRmGpuClockGet
NvError NvRmGpuClockGet(NvRmGpuDevice *hDevice, NvRmGpuClockGetEntry *pClkGetEntries, size_t numEntries)
Request one or more clock domain frequency state.
NvRmGpuClockType_Actual
@ NvRmGpuClockType_Actual
Clock frequency programmed to the HW (including PLL constraints).
Definition: nvrm_gpu.h:643
NvRmGpuClockPoint
struct NvRmGpuClockPointRec NvRmGpuClockPoint
Clock voltage/frequency point.
NvRmGpuClockType
NvRmGpuClockType
Request type for clock get.
Definition: nvrm_gpu.h:631
NvRmGpuDeviceGetTemperature
NvError NvRmGpuDeviceGetTemperature(NvRmGpuDevice *hDevice, NvRmGpuDeviceTemperature which, int32_t *pTemperatureMilliCelsius)
Retrieves the temperature sensor reading.
NvRmGpuDeviceEventId_AlarmClockArbiterFailed
@ NvRmGpuDeviceEventId_AlarmClockArbiterFailed
The clock arbiter has failed.
Definition: nvrm_gpu.h:1254
NvRmGpuDeviceCurrent_Bus
@ NvRmGpuDeviceCurrent_Bus
Bus current.
Definition: nvrm_gpu.h:1050
NvRmGpuClockSet
NvError NvRmGpuClockSet(NvRmGpuDevice *hDevice, const NvRmGpuClockSetEntry *pClkSetEntries, size_t numEntries, NvRmGpuClockAsyncReqHandle *phReq)
Requests minimum clocks for one or more clock domains.
NvRmGpuDevice
struct NvRmGpuDeviceRec NvRmGpuDevice
Device handle.
Definition: nvrm_gpu.h:133
NvRmGpuClockRange
struct NvRmGpuClockRangeRec NvRmGpuClockRange
Frequency range for clock domain.
NvRmGpuDeviceTemperature_InternalSensor
@ NvRmGpuDeviceTemperature_InternalSensor
The internal GPU temperature sensor.
Definition: nvrm_gpu.h:1155
NvRmGpuDeviceOpenAttrRec::syncType
NvRmGpuSyncType syncType
The default sync type for this device.
Definition: nvrm_gpu.h:482
NvError
NvError
The NvError enumeration contains ALL return / error codes.
Definition: nverror.h:32
NvRmGpuDeviceEventSessionOpen
NvError NvRmGpuDeviceEventSessionOpen(NvRmGpuDevice *hDevice, const NvRmGpuDeviceEventSessionOpenAttr *attr, NvRmGpuDeviceEventSession **phSession)
Opens a session to monitor device events.
NvRmGpuSyncType_Default
@ NvRmGpuSyncType_Default
Default sync type.
Definition: nvrm_gpu.h:450
NV_ARRAY_SIZE
#define NV_ARRAY_SIZE(x)
Macro for determining the size of an array.
Definition: nvcommon.h:145
NvRmGpuDeviceGetPower
NvError NvRmGpuDeviceGetPower(NvRmGpuDevice *hDevice, NvRmGpuDevicePower which, uint64_t *pPowerMicroWatt)
Retrieves the power sensor reading.
NvRmGpuLibDeviceListEntry
struct NvRmGpuLibDeviceListEntryRec NvRmGpuLibDeviceListEntry
Device list entry.
NvRmGpuDeviceEventInfoRec::eventId
NvRmGpuDeviceEventId eventId
Event type.
Definition: nvrm_gpu.h:1384
NvRmGpuDeviceEventSessionOpenAttrRec
Extensible attribute structure for NvRmGpuDeviceEventSessionOpen().
Definition: nvrm_gpu.h:1305
NvRmGpuClockRangeRec
Frequency range for clock domain.
Definition: nvrm_gpu.h:693
NvRmGpuDevicePower_Bus
@ NvRmGpuDevicePower_Bus
Power consumed at the regulator.
Definition: nvrm_gpu.h:1103
NvRmGpuClockType_Target
@ NvRmGpuClockType_Target
Target clock frequency requested by the user.
Definition: nvrm_gpu.h:637
NvRmGpuDeviceOpenAttr
struct NvRmGpuDeviceOpenAttrRec NvRmGpuDeviceOpenAttr
Extensible attribute structure for NvRmGpuDeviceOpen()
NvRmGpuLibDetachDevice
NvError NvRmGpuLibDetachDevice(NvRmGpuLib *hLib, int deviceIndex)
Powers down and detaches a GPU.
NvRmGpuLibDeviceListEntryRec::name
const char * name
Informative device name.
Definition: nvrm_gpu.h:316
NvRmGpuDeviceListTemperatureSensors
NvError NvRmGpuDeviceListTemperatureSensors(NvRmGpuDevice *hDevice, const NvRmGpuDeviceTemperature **pSensors, size_t *pNumSensors)
Returns the list of available temperature sensors for the device.
NvRmGpuLibOpenAttr
struct NvRmGpuLibOpenAttrRec NvRmGpuLibOpenAttr
Extensible attribute structure for NvRmGpuLibOpen()