NVIDIA DRIVE OS Linux SDK API Reference

6.0.10.0 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 
306 
307 // -------------------------------------------------
308 // --------------- API Groups ----------------------
309 // -------------------------------------------------
310 
312 
317 
321 
326 
330 
331 // -------------------------------------------------
332 // --------------- Handles -------------------------
333 // -------------------------------------------------
334 
342 typedef struct NvRmGpuLibRec NvRmGpuLib;
343 
351 typedef struct NvRmGpuDeviceRec NvRmGpuDevice;
352 
358 typedef struct NvRmGpuDeviceEventSessionRec NvRmGpuDeviceEventSession;
359 
360 
361 // -------------------------------------------------
362 // --------------- Library functions ---------------
363 // -------------------------------------------------
364 
371 {
375  uint32_t major;
376 
380  uint32_t minor;
381 
385  uint32_t patch;
386 
397  const char *suffix;
398 
400 
430 
448 typedef struct NvRmGpuLibOpenAttrRec
449 {
451  uint32_t reserved;
452 
454 
461 #define NVRM_GPU_DEFINE_LIB_OPEN_ATTR(x) NvRmGpuLibOpenAttr x = { 0U }
462 
540 
581 
588 typedef enum
589 {
592 
595 
599 
601 
602 
609 {
612 
617 
627  const char *name;
629 
668 const NvRmGpuLibDeviceListEntry *NvRmGpuLibListDevices(NvRmGpuLib *hLib, size_t *pNumDevices);
669 
670 
671 
681 #define NVRM_GPU_DEVICE_INDEX_DEFAULT (-1)
682 
721 typedef enum
722 {
731 
734 
738 
739 
749 {
763 
776 
785 #define NVRM_GPU_DEFINE_DEVICE_OPEN_ATTR(x) \
786  NvRmGpuDeviceOpenAttr x = { NvRmGpuSyncType_Default, false }
787 
788 
833 NvError NvRmGpuDeviceOpen(NvRmGpuLib *hLib, int deviceIndex, const NvRmGpuDeviceOpenAttr *attr,
834  NvRmGpuDevice **phDevice);
835 
877 
878 
879 #if NVOS_IS_LINUX || NVOS_IS_QNX
880 
885 #define NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "d"
886 
891 #define NVRM_GPU_CLOCK_ASYNC_REQ_INVALID_HANDLE (-1)
892 
904 typedef int NvRmGpuClockAsyncReqHandle;
905 #else
906 
911 #define NVRM_GPU_CLOCK_ASYNC_REQ_HANDLE_PRIFMT "p"
912 
917 #define NVRM_GPU_CLOCK_ASYNC_REQ_INVALID_HANDLE (NULL)
918 
940 #endif
941 
949 typedef enum
950 {
953 
956 
960 
965 typedef enum NvRmGpuClockType
966 {
972 
978 
982 
983 
989 {
995 
1001 
1006  uint64_t freqHz;
1007 
1009 
1015 {
1018 
1020  uint64_t freqHz;
1022 
1027 typedef struct NvRmGpuClockRangeRec
1028 {
1029  uint64_t minHz;
1030  uint64_t maxHz;
1032 
1037 typedef struct NvRmGpuClockPointRec
1038 {
1039  uint64_t freqHz;
1041 
1047 {
1050 
1053 
1056  size_t maxVfPoints;
1057 
1059 
1105  const NvRmGpuClockDomainInfo **infos,
1106  size_t *pNumDomains);
1107 
1153  NvRmGpuClockDomain domain,
1154  NvRmGpuClockPoint *pClkPoints,
1155  size_t *pNumPoints);
1156 
1275  const NvRmGpuClockSetEntry *pClkSetEntries,
1276  size_t numEntries,
1278 
1324  const NvRmGpuClockAsyncReqHandle *phReqs,
1325  size_t numEntries,
1326  uint32_t timeoutMs);
1327 
1328 
1366 
1367 
1387  uint32_t timeoutMs);
1388 
1389 
1441  NvRmGpuClockGetEntry *pClkGetEntries,
1442  size_t numEntries);
1443 
1446 typedef enum
1447 {
1450 
1453 
1457 
1492  const NvRmGpuDeviceVoltage **pSensors,
1493  size_t *pNumSensors);
1494 
1495 
1533  NvRmGpuDeviceVoltage which,
1534  uint64_t *pVoltageMicroVolt);
1535 
1538 typedef enum
1539 {
1543 
1544 
1580  const NvRmGpuDeviceCurrent **pSensors,
1581  size_t *pNumSensors);
1582 
1619  NvRmGpuDeviceCurrent which,
1620  uint64_t *pCurrentMicroAmpere);
1621 
1624 typedef enum
1625 {
1629 
1664  const NvRmGpuDevicePower **pSensors,
1665  size_t *pNumSensors);
1666 
1703  NvRmGpuDevicePower which,
1704  uint64_t *pPowerMicroWatt);
1705 
1706 
1709 typedef enum
1710 {
1714 
1750  const NvRmGpuDeviceTemperature **pSensors,
1751  size_t *pNumSensors);
1752 
1792  int32_t *pTemperatureMilliCelsius);
1793 
1827  int32_t temperature_mC);
1828 
1829 
1834 typedef enum
1835 {
1836  // @brief Frequency change event
1845 
1851 
1858 
1864 
1872 
1881 
1888 
1899 
1902 
1904 
1915 {
1921 
1924 
1926 
1934 #define NVRM_GPU_DEFINE_DEVICE_EVENT_SESSION_ATTR(x) \
1935  NvRmGpuDeviceEventSessionOpenAttr x = { NULL, 0 }
1936 
1961 {
1962  static const NvRmGpuDeviceEventId allEvents[] =
1963  {
1972  };
1973  attr->filterList = allEvents;
1974  attr->filterListSize = NV_ARRAY_SIZE(allEvents);
1975 }
1976 
2013  NvRmGpuDeviceEventSession **phSession);
2014 
2024 {
2027 
2038  uint64_t timeNs;
2039 
2041 
2083  NvRmGpuDeviceEventInfo *pEventInfo,
2084  uint32_t timeoutMs);
2085 
2117 
2118 #if defined(NVRM_GPU_BUILD_VARIANT)
2119 } // namespace nvrm_gpu
2120 #endif
2121 
2122 #if defined(__cplusplus)
2123 }
2124 #endif
2125 
2126 #if !defined(NV_SDK_BUILD)
2127 #include "nvrm_gpu_priv.h"
2128 #endif
2129 
2130 #endif
NvRmGpuClockSetEntryRec::freqHz
uint64_t freqHz
Frequency for clock request.
Definition: nvrm_gpu.h:1020
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:1056
NvRmGpuLibOpenAttrRec
Extensible attribute structure for NvRmGpuLibOpen()
Definition: nvrm_gpu.h:448
NvRmGpuClockDomain_Count
@ NvRmGpuClockDomain_Count
Number of clock domains.
Definition: nvrm_gpu.h:958
NvRmGpuLibDeviceListEntryRec::deviceState
NvRmGpuLibDeviceState deviceState
Device attachment state.
Definition: nvrm_gpu.h:616
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:370
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:1871
NvRmGpuLibDeviceState_Attached
@ NvRmGpuLibDeviceState_Attached
Device is attached and may be opened with NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:591
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:1920
NvRmGpuDeviceEventSession
struct NvRmGpuDeviceEventSessionRec NvRmGpuDeviceEventSession
Device event session handle.
Definition: nvrm_gpu.h:358
NvRmGpuDeviceEventId
NvRmGpuDeviceEventId
Definition: nvrm_gpu.h:1834
NvRmGpuDeviceEventId_Count
@ NvRmGpuDeviceEventId_Count
Number of events.
Definition: nvrm_gpu.h:1901
NvRmGpuDeviceEventId_AlarmLocalTargetVfNotPossible
@ NvRmGpuDeviceEventId_AlarmLocalTargetVfNotPossible
A clock domain frequency is below local target frequency requested by a session.
Definition: nvrm_gpu.h:1857
NvRmGpuDeviceVoltage_SRAM
@ NvRmGpuDeviceVoltage_SRAM
SRAM voltage.
Definition: nvrm_gpu.h:1452
NvRmGpuDeviceEventId_AlarmTargetVfNotPossible
@ NvRmGpuDeviceEventId_AlarmTargetVfNotPossible
A clock domain frequency is below target.
Definition: nvrm_gpu.h:1850
NvRmGpuLibVersionInfoRec::patch
uint32_t patch
The library patch level.
Definition: nvrm_gpu.h:385
NvRmGpuLib
struct NvRmGpuLibRec NvRmGpuLib
Library handle.
Definition: nvrm_gpu.h:342
NvRmGpuClockDomainInfoRec::range
NvRmGpuClockRange range
Frequency range of the clock domain.
Definition: nvrm_gpu.h:1052
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:1844
NvRmGpuDeviceVoltage
NvRmGpuDeviceVoltage
Voltage sensors.
Definition: nvrm_gpu.h:1446
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:1960
NvRmGpuClockDomain_GPCCLK
@ NvRmGpuClockDomain_GPCCLK
Main graphics core clock.
Definition: nvrm_gpu.h:955
NvRmGpuLibDeviceListEntryRec::deviceIndex
int deviceIndex
Internal device index. Used in NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:611
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:608
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:2023
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:1017
NvRmGpuClockDomainInfoRec
Clock domain info.
Definition: nvrm_gpu.h:1046
NvRmGpuLibVersionInfoRec::major
uint32_t major
The library major version.
Definition: nvrm_gpu.h:375
NvRmGpuSyncType_Syncpoint
@ NvRmGpuSyncType_Syncpoint
Synchronization type is Tegra HOST1X syncpoint.
Definition: nvrm_gpu.h:736
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:1014
NvRmGpuClockDomain_MCLK
@ NvRmGpuClockDomain_MCLK
Memory clock.
Definition: nvrm_gpu.h:952
NvRmGpuClockPointRec::freqHz
uint64_t freqHz
Definition: nvrm_gpu.h:1039
NvRmGpuClockGetEntryRec
Entry for clock get request.
Definition: nvrm_gpu.h:988
NvRmGpuDeviceVoltage_Core
@ NvRmGpuDeviceVoltage_Core
Core GPU voltage.
Definition: nvrm_gpu.h:1449
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:1880
NvRmGpuDevicePower
NvRmGpuDevicePower
Electric power sensors.
Definition: nvrm_gpu.h:1624
NvRmGpuDeviceEventId_AlarmGpuLost
@ NvRmGpuDeviceEventId_AlarmGpuLost
Device lost.
Definition: nvrm_gpu.h:1898
NvRmGpuDeviceVoltage_Bus
@ NvRmGpuDeviceVoltage_Bus
Bus voltage.
Definition: nvrm_gpu.h:1455
NvRmGpuDeviceEventSessionOpenAttrRec::filterListSize
size_t filterListSize
Number of entries in the event list.
Definition: nvrm_gpu.h:1923
NvRmGpuClockGetEntryRec::type
NvRmGpuClockType type
(IN) Request type
Definition: nvrm_gpu.h:1000
NvRmGpuClockAsyncReqHandle
struct NvRmGpuClockAsyncNotImplemented * NvRmGpuClockAsyncReqHandle
OS-specific type of asynchronous clock request handle.
Definition: nvrm_gpu.h:939
NvRmGpuDeviceEventSessionOpenAttr
struct NvRmGpuDeviceEventSessionOpenAttrRec NvRmGpuDeviceEventSessionOpenAttr
Extensible attribute structure for NvRmGpuDeviceEventSessionOpen().
NvRmGpuSyncType_SyncFd
@ NvRmGpuSyncType_SyncFd
Synchronization type is Android/Linux sync fd.
Definition: nvrm_gpu.h:733
NvRmGpuDeviceTemperature
NvRmGpuDeviceTemperature
Temperature sensors.
Definition: nvrm_gpu.h:1709
NvRmGpuClockGetEntryRec::domain
NvRmGpuClockDomain domain
(IN) Domain for the clock request
Definition: nvrm_gpu.h:994
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:721
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:2038
NvRmGpuDeviceEventId_AlarmPowerAboveThreshold
@ NvRmGpuDeviceEventId_AlarmPowerAboveThreshold
Power above threshold.
Definition: nvrm_gpu.h:1887
NvRmGpuLibVersionInfoRec::suffix
const char * suffix
Version string suffix (always non-NULL)
Definition: nvrm_gpu.h:397
NvRmGpuClockDomainInfoRec::domain
NvRmGpuClockDomain domain
Clock domain.
Definition: nvrm_gpu.h:1049
NvRmGpuDeviceOpenAttrRec::sandboxFriendlyChannels
bool sandboxFriendlyChannels
Ignored field.
Definition: nvrm_gpu.h:774
NvRmGpuClockGetEntryRec::freqHz
uint64_t freqHz
(OUT) Frequency in Hz
Definition: nvrm_gpu.h:1006
NvRmGpuLibVersionInfoRec::minor
uint32_t minor
The library minor version.
Definition: nvrm_gpu.h:380
NvRmGpuClockType_Effective
@ NvRmGpuClockType_Effective
Effective clock as measured from hardware.
Definition: nvrm_gpu.h:980
NvRmGpuClockGetEntry
struct NvRmGpuClockGetEntryRec NvRmGpuClockGetEntry
Entry for clock get request.
NvRmGpuLibDeviceState_Unknown
@ NvRmGpuLibDeviceState_Unknown
Device state is not known.
Definition: nvrm_gpu.h:598
NvRmGpuClockRangeRec::maxHz
uint64_t maxHz
Definition: nvrm_gpu.h:1030
NvRmGpuDeviceThermalAlertSetLimit
NvError NvRmGpuDeviceThermalAlertSetLimit(NvRmGpuDevice *hDevice, int32_t temperature_mC)
Sets the thermal alert limit.
NvRmGpuClockDomain
NvRmGpuClockDomain
Clock domains.
Definition: nvrm_gpu.h:949
NvRmGpuLibOpenAttrRec::reserved
uint32_t reserved
Dummy field for C/C++ ABI compatibility.
Definition: nvrm_gpu.h:451
NvRmGpuClockPointRec
Clock voltage/frequency point.
Definition: nvrm_gpu.h:1037
NvRmGpuLibDeviceState_InsufficientPrivileges
@ NvRmGpuLibDeviceState_InsufficientPrivileges
Device exists, but not enough privileges to access.
Definition: nvrm_gpu.h:594
NvRmGpuDeviceCurrent
NvRmGpuDeviceCurrent
Electric current sensors.
Definition: nvrm_gpu.h:1538
NvRmGpuLibDeviceState
NvRmGpuLibDeviceState
Device attachment state.
Definition: nvrm_gpu.h:588
NvRmGpuClockRangeRec::minHz
uint64_t minHz
Definition: nvrm_gpu.h:1029
NvRmGpuDeviceOpenAttrRec
Extensible attribute structure for NvRmGpuDeviceOpen()
Definition: nvrm_gpu.h:748
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:977
NvRmGpuClockPoint
struct NvRmGpuClockPointRec NvRmGpuClockPoint
Clock voltage/frequency point.
NvRmGpuClockType
NvRmGpuClockType
Request type for clock get.
Definition: nvrm_gpu.h:965
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:1863
NvRmGpuDeviceCurrent_Bus
@ NvRmGpuDeviceCurrent_Bus
Bus current.
Definition: nvrm_gpu.h:1541
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:351
NvRmGpuClockRange
struct NvRmGpuClockRangeRec NvRmGpuClockRange
Frequency range for clock domain.
NvRmGpuDeviceTemperature_InternalSensor
@ NvRmGpuDeviceTemperature_InternalSensor
The internal GPU temperature sensor.
Definition: nvrm_gpu.h:1712
NvRmGpuDeviceOpenAttrRec::syncType
NvRmGpuSyncType syncType
The default sync type for this device.
Definition: nvrm_gpu.h:762
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:730
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:2026
NvRmGpuDeviceEventSessionOpenAttrRec
Extensible attribute structure for NvRmGpuDeviceEventSessionOpen().
Definition: nvrm_gpu.h:1914
NvRmGpuClockRangeRec
Frequency range for clock domain.
Definition: nvrm_gpu.h:1027
NvRmGpuDevicePower_Bus
@ NvRmGpuDevicePower_Bus
Power consumed at the regulator.
Definition: nvrm_gpu.h:1627
NvRmGpuClockType_Target
@ NvRmGpuClockType_Target
Target clock frequency requested by the user.
Definition: nvrm_gpu.h:971
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:627
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()