NVIDIA DRIVE OS Linux SDK API Reference

6.0.9 Release
nvrm_gpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2023 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 
300 
301 // -------------------------------------------------
302 // --------------- API Groups ----------------------
303 // -------------------------------------------------
304 
306 
311 
315 
320 
324 
325 // -------------------------------------------------
326 // --------------- Handles -------------------------
327 // -------------------------------------------------
328 
336 typedef struct NvRmGpuLibRec NvRmGpuLib;
337 
345 typedef struct NvRmGpuDeviceRec NvRmGpuDevice;
346 
352 typedef struct NvRmGpuDeviceEventSessionRec NvRmGpuDeviceEventSession;
353 
354 
355 // -------------------------------------------------
356 // --------------- Library functions ---------------
357 // -------------------------------------------------
358 
365 {
369  uint32_t major;
370 
374  uint32_t minor;
375 
379  uint32_t patch;
380 
391  const char *suffix;
392 
394 
421 
439 typedef struct NvRmGpuLibOpenAttrRec
440 {
442  uint32_t reserved;
443 
445 
452 #define NVRM_GPU_DEFINE_LIB_OPEN_ATTR(x) NvRmGpuLibOpenAttr x = { 0U }
453 
525 
562 
569 typedef enum
570 {
573 
576 
580 
582 
583 
590 {
593 
598 
608  const char *name;
610 
645 const NvRmGpuLibDeviceListEntry *NvRmGpuLibListDevices(NvRmGpuLib *hLib, size_t *pNumDevices);
646 
647 
648 
658 #define NVRM_GPU_DEVICE_INDEX_DEFAULT (-1)
659 
698 typedef enum
699 {
708 
711 
715 
716 
726 {
740 
753 
762 #define NVRM_GPU_DEFINE_DEVICE_OPEN_ATTR(x) \
763  NvRmGpuDeviceOpenAttr x = { NvRmGpuSyncType_Default, false }
764 
765 
806 NvError NvRmGpuDeviceOpen(NvRmGpuLib *hLib, int deviceIndex, const NvRmGpuDeviceOpenAttr *attr,
807  NvRmGpuDevice **phDevice);
808 
846 
847 
848 #if NVOS_IS_LINUX || NVOS_IS_QNX
849 
854 #define NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "d"
855 
860 #define NVRM_GPU_CLOCK_ASYNC_REQ_INVALID_HANDLE (-1)
861 
873 typedef int NvRmGpuClockAsyncReqHandle;
874 #else
875 
880 #define NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "p"
881 
886 #define NVRM_GPU_CLOCK_ASYNC_REQ_INVALID_HANDLE (NULL)
887 
909 #endif
910 
918 typedef enum
919 {
922 
925 
929 
934 typedef enum NvRmGpuClockType
935 {
941 
947 
951 
952 
958 {
964 
970 
975  uint64_t freqHz;
976 
978 
984 {
987 
989  uint64_t freqHz;
991 
996 typedef struct NvRmGpuClockRangeRec
997 {
998  uint64_t minHz;
999  uint64_t maxHz;
1001 
1006 typedef struct NvRmGpuClockPointRec
1007 {
1008  uint64_t freqHz;
1010 
1016 {
1019 
1022 
1025  size_t maxVfPoints;
1026 
1028 
1074  const NvRmGpuClockDomainInfo **infos,
1075  size_t *pNumDomains);
1076 
1122  NvRmGpuClockDomain domain,
1123  NvRmGpuClockPoint *pClkPoints,
1124  size_t *pNumPoints);
1125 
1244  const NvRmGpuClockSetEntry *pClkSetEntries,
1245  size_t numEntries,
1247 
1293  const NvRmGpuClockAsyncReqHandle *phReqs,
1294  size_t numEntries,
1295  uint32_t timeoutMs);
1296 
1297 
1335 
1336 
1356  uint32_t timeoutMs);
1357 
1358 
1410  NvRmGpuClockGetEntry *pClkGetEntries,
1411  size_t numEntries);
1412 
1415 typedef enum
1416 {
1419 
1422 
1426 
1461  const NvRmGpuDeviceVoltage **pSensors,
1462  size_t *pNumSensors);
1463 
1464 
1502  NvRmGpuDeviceVoltage which,
1503  uint64_t *pVoltageMicroVolt);
1504 
1507 typedef enum
1508 {
1512 
1513 
1549  const NvRmGpuDeviceCurrent **pSensors,
1550  size_t *pNumSensors);
1551 
1588  NvRmGpuDeviceCurrent which,
1589  uint64_t *pCurrentMicroAmpere);
1590 
1593 typedef enum
1594 {
1598 
1633  const NvRmGpuDevicePower **pSensors,
1634  size_t *pNumSensors);
1635 
1672  NvRmGpuDevicePower which,
1673  uint64_t *pPowerMicroWatt);
1674 
1675 
1678 typedef enum
1679 {
1683 
1719  const NvRmGpuDeviceTemperature **pSensors,
1720  size_t *pNumSensors);
1721 
1761  int32_t *pTemperatureMilliCelsius);
1762 
1796  int32_t temperature_mC);
1797 
1798 
1803 typedef enum
1804 {
1805  // @brief Frequency change event
1814 
1820 
1827 
1833 
1841 
1850 
1857 
1868 
1871 
1873 
1884 {
1890 
1893 
1895 
1903 #define NVRM_GPU_DEFINE_DEVICE_EVENT_SESSION_ATTR(x) \
1904  NvRmGpuDeviceEventSessionOpenAttr x = { NULL, 0 }
1905 
1930 {
1931  static const NvRmGpuDeviceEventId allEvents[] =
1932  {
1941  };
1942  attr->filterList = allEvents;
1943  attr->filterListSize = NV_ARRAY_SIZE(allEvents);
1944 }
1945 
1982  NvRmGpuDeviceEventSession **phSession);
1983 
1993 {
1996 
2007  uint64_t timeNs;
2008 
2010 
2052  NvRmGpuDeviceEventInfo *pEventInfo,
2053  uint32_t timeoutMs);
2054 
2086 
2087 #if defined(NVRM_GPU_BUILD_VARIANT)
2088 } // namespace nvrm_gpu
2089 #endif
2090 
2091 #if defined(__cplusplus)
2092 }
2093 #endif
2094 
2095 #if !defined(NV_SDK_BUILD)
2096 #include "nvrm_gpu_priv.h"
2097 #endif
2098 
2099 #endif
NvRmGpuClockSetEntryRec::freqHz
uint64_t freqHz
Frequency for clock request.
Definition: nvrm_gpu.h:989
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:1025
NvRmGpuLibOpenAttrRec
Extensible attribute structure for NvRmGpuLibOpen()
Definition: nvrm_gpu.h:439
NvRmGpuClockDomain_Count
@ NvRmGpuClockDomain_Count
Number of clock domains.
Definition: nvrm_gpu.h:927
NvRmGpuLibDeviceListEntryRec::deviceState
NvRmGpuLibDeviceState deviceState
Device attachment state.
Definition: nvrm_gpu.h:597
NvRmGpuDeviceGetVoltage
NvError NvRmGpuDeviceGetVoltage(NvRmGpuDevice *hDevice, NvRmGpuDeviceVoltage which, uint64_t *pVoltageMicroVolt)
Retrieves the voltage sensor reading.
NvRmGpuLibVersionInfoRec
The version information structure returned by NvRmGpuLibGetVersionInfo().
Definition: nvrm_gpu.h:364
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:1840
NvRmGpuLibDeviceState_Attached
@ NvRmGpuLibDeviceState_Attached
Device is attached and may be opened with NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:572
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:1889
NvRmGpuDeviceEventSession
struct NvRmGpuDeviceEventSessionRec NvRmGpuDeviceEventSession
Device event session handle.
Definition: nvrm_gpu.h:352
NvRmGpuDeviceEventId
NvRmGpuDeviceEventId
Definition: nvrm_gpu.h:1803
NvRmGpuDeviceEventId_Count
@ NvRmGpuDeviceEventId_Count
Number of events.
Definition: nvrm_gpu.h:1870
NvRmGpuDeviceEventId_AlarmLocalTargetVfNotPossible
@ NvRmGpuDeviceEventId_AlarmLocalTargetVfNotPossible
A clock domain frequency is below local target frequency requested by a session.
Definition: nvrm_gpu.h:1826
NvRmGpuDeviceVoltage_SRAM
@ NvRmGpuDeviceVoltage_SRAM
SRAM voltage.
Definition: nvrm_gpu.h:1421
NvRmGpuDeviceEventId_AlarmTargetVfNotPossible
@ NvRmGpuDeviceEventId_AlarmTargetVfNotPossible
A clock domain frequency is below target.
Definition: nvrm_gpu.h:1819
NvRmGpuLibVersionInfoRec::patch
uint32_t patch
The library patch level.
Definition: nvrm_gpu.h:379
NvRmGpuLib
struct NvRmGpuLibRec NvRmGpuLib
Library handle.
Definition: nvrm_gpu.h:336
NvRmGpuClockDomainInfoRec::range
NvRmGpuClockRange range
Frequency range of the clock domain.
Definition: nvrm_gpu.h:1021
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:1813
NvRmGpuDeviceVoltage
NvRmGpuDeviceVoltage
Voltage sensors.
Definition: nvrm_gpu.h:1415
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:1929
NvRmGpuClockDomain_GPCCLK
@ NvRmGpuClockDomain_GPCCLK
Main graphics core clock.
Definition: nvrm_gpu.h:924
NvRmGpuLibDeviceListEntryRec::deviceIndex
int deviceIndex
Internal device index. Used in NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:592
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:589
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:1992
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:986
NvRmGpuClockDomainInfoRec
Clock domain info.
Definition: nvrm_gpu.h:1015
NvRmGpuLibVersionInfoRec::major
uint32_t major
The library major version.
Definition: nvrm_gpu.h:369
NvRmGpuSyncType_Syncpoint
@ NvRmGpuSyncType_Syncpoint
Synchronization type is Tegra HOST1X syncpoint.
Definition: nvrm_gpu.h:713
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:983
NvRmGpuClockDomain_MCLK
@ NvRmGpuClockDomain_MCLK
Memory clock.
Definition: nvrm_gpu.h:921
NvRmGpuClockPointRec::freqHz
uint64_t freqHz
Definition: nvrm_gpu.h:1008
NvRmGpuClockGetEntryRec
Entry for clock get request.
Definition: nvrm_gpu.h:957
NvRmGpuDeviceVoltage_Core
@ NvRmGpuDeviceVoltage_Core
Core GPU voltage.
Definition: nvrm_gpu.h:1418
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:1849
NvRmGpuDevicePower
NvRmGpuDevicePower
Electric power sensors.
Definition: nvrm_gpu.h:1593
NvRmGpuDeviceEventId_AlarmGpuLost
@ NvRmGpuDeviceEventId_AlarmGpuLost
Device lost.
Definition: nvrm_gpu.h:1867
NvRmGpuDeviceVoltage_Bus
@ NvRmGpuDeviceVoltage_Bus
Bus voltage.
Definition: nvrm_gpu.h:1424
NvRmGpuDeviceEventSessionOpenAttrRec::filterListSize
size_t filterListSize
Number of entries in the event list.
Definition: nvrm_gpu.h:1892
NvRmGpuClockGetEntryRec::type
NvRmGpuClockType type
(IN) Request type
Definition: nvrm_gpu.h:969
NvRmGpuClockAsyncReqHandle
struct NvRmGpuClockAsyncNotImplemented * NvRmGpuClockAsyncReqHandle
OS-specific type of asynchronous clock request handle.
Definition: nvrm_gpu.h:908
NvRmGpuDeviceEventSessionOpenAttr
struct NvRmGpuDeviceEventSessionOpenAttrRec NvRmGpuDeviceEventSessionOpenAttr
Extensible attribute structure for NvRmGpuDeviceEventSessionOpen().
NvRmGpuSyncType_SyncFd
@ NvRmGpuSyncType_SyncFd
Synchronization type is Android/Linux sync fd.
Definition: nvrm_gpu.h:710
NvRmGpuDeviceTemperature
NvRmGpuDeviceTemperature
Temperature sensors.
Definition: nvrm_gpu.h:1678
NvRmGpuClockGetEntryRec::domain
NvRmGpuClockDomain domain
(IN) Domain for the clock request
Definition: nvrm_gpu.h:963
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:698
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:2007
NvRmGpuDeviceEventId_AlarmPowerAboveThreshold
@ NvRmGpuDeviceEventId_AlarmPowerAboveThreshold
Power above threshold.
Definition: nvrm_gpu.h:1856
NvRmGpuLibVersionInfoRec::suffix
const char * suffix
Version string suffix (always non-NULL)
Definition: nvrm_gpu.h:391
NvRmGpuClockDomainInfoRec::domain
NvRmGpuClockDomain domain
Clock domain.
Definition: nvrm_gpu.h:1018
NvRmGpuDeviceOpenAttrRec::sandboxFriendlyChannels
bool sandboxFriendlyChannels
Ignored field.
Definition: nvrm_gpu.h:751
NvRmGpuClockGetEntryRec::freqHz
uint64_t freqHz
(OUT) Frequency in Hz
Definition: nvrm_gpu.h:975
NvRmGpuLibVersionInfoRec::minor
uint32_t minor
The library minor version.
Definition: nvrm_gpu.h:374
NvRmGpuClockType_Effective
@ NvRmGpuClockType_Effective
Effective clock as measured from hardware.
Definition: nvrm_gpu.h:949
NvRmGpuClockGetEntry
struct NvRmGpuClockGetEntryRec NvRmGpuClockGetEntry
Entry for clock get request.
NvRmGpuLibDeviceState_Unknown
@ NvRmGpuLibDeviceState_Unknown
Device state is not known.
Definition: nvrm_gpu.h:579
NvRmGpuClockRangeRec::maxHz
uint64_t maxHz
Definition: nvrm_gpu.h:999
NvRmGpuDeviceThermalAlertSetLimit
NvError NvRmGpuDeviceThermalAlertSetLimit(NvRmGpuDevice *hDevice, int32_t temperature_mC)
Sets the thermal alert limit.
NvRmGpuClockDomain
NvRmGpuClockDomain
Clock domains.
Definition: nvrm_gpu.h:918
NvRmGpuLibOpenAttrRec::reserved
uint32_t reserved
Dummy field for C/C++ ABI compatibility.
Definition: nvrm_gpu.h:442
NvRmGpuClockPointRec
Clock voltage/frequency point.
Definition: nvrm_gpu.h:1006
NvRmGpuLibDeviceState_InsufficientPrivileges
@ NvRmGpuLibDeviceState_InsufficientPrivileges
Device exists, but not enough privileges to access.
Definition: nvrm_gpu.h:575
NvRmGpuDeviceCurrent
NvRmGpuDeviceCurrent
Electric current sensors.
Definition: nvrm_gpu.h:1507
NvRmGpuLibDeviceState
NvRmGpuLibDeviceState
Device attachment state.
Definition: nvrm_gpu.h:569
NvRmGpuClockRangeRec::minHz
uint64_t minHz
Definition: nvrm_gpu.h:998
NvRmGpuDeviceOpenAttrRec
Extensible attribute structure for NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:725
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:946
NvRmGpuClockPoint
struct NvRmGpuClockPointRec NvRmGpuClockPoint
Clock voltage/frequency point.
NvRmGpuClockType
NvRmGpuClockType
Request type for clock get.
Definition: nvrm_gpu.h:934
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:1832
NvRmGpuDeviceCurrent_Bus
@ NvRmGpuDeviceCurrent_Bus
Bus current.
Definition: nvrm_gpu.h:1510
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:345
NvRmGpuClockRange
struct NvRmGpuClockRangeRec NvRmGpuClockRange
Frequency range for clock domain.
NvRmGpuDeviceTemperature_InternalSensor
@ NvRmGpuDeviceTemperature_InternalSensor
The internal GPU temperature sensor.
Definition: nvrm_gpu.h:1681
NvRmGpuDeviceOpenAttrRec::syncType
NvRmGpuSyncType syncType
The default sync type for this device.
Definition: nvrm_gpu.h:739
NvError
NvError
The NvError enumeration contains ALL return / error codes.
Definition: nverror.h:32
NvRmGpuLibVersionInfo
struct NvRmGpuLibVersionInfoRec NvRmGpuLibVersionInfo
The version information structure returned by NvRmGpuLibGetVersionInfo().
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:707
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:1995
NvRmGpuDeviceEventSessionOpenAttrRec
Extensible attribute structure for NvRmGpuDeviceEventSessionOpen().
Definition: nvrm_gpu.h:1883
NvRmGpuClockRangeRec
Frequency range for clock domain.
Definition: nvrm_gpu.h:996
NvRmGpuDevicePower_Bus
@ NvRmGpuDevicePower_Bus
Power consumed at the regulator.
Definition: nvrm_gpu.h:1596
NvRmGpuClockType_Target
@ NvRmGpuClockType_Target
Target clock frequency requested by the user.
Definition: nvrm_gpu.h:940
NvRmGpuLibGetVersionInfo
const NvRmGpuLibVersionInfo * NvRmGpuLibGetVersionInfo(void)
Returns the library version information.
NvRmGpuDeviceOpenAttr
struct NvRmGpuDeviceOpenAttrRec NvRmGpuDeviceOpenAttr
Extensible attribute structure for NvRmGpuDeviceOpen()
NvRmGpuLibDeviceListEntryRec::name
const char * name
Informative device name.
Definition: nvrm_gpu.h:608
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()