#![allow(unused)] ///! When ioctl returns success (retval >= 0) but sets the status value of the arg structure to 3 ///! then `nvidia-vgpud` will sleep for a bit (first 0.1s then 1s then 10s) then issue the same ///! ioctl call again until the status differs from 3. It will attempt this for up to 24h before ///! giving up. ///! ///! Sourced from https://github.com/NVIDIA/open-gpu-kernel-modules/blob/5f40a5aee5ef9c92085836bf5b5a9056174f07f1/kernel-open/common/inc/nvstatuscodes.h pub const NV_OK: u32 = 0x00000000; pub const NV_ERR_GENERIC: u32 = 0x0000ffff; pub const NV_ERR_BROKEN_FB: u32 = 0x00000001; pub const NV_ERR_BUFFER_TOO_SMALL: u32 = 0x00000002; pub const NV_ERR_BUSY_RETRY: u32 = 0x00000003; pub const NV_ERR_CALLBACK_NOT_SCHEDULED: u32 = 0x00000004; pub const NV_ERR_CARD_NOT_PRESENT: u32 = 0x00000005; pub const NV_ERR_CYCLE_DETECTED: u32 = 0x00000006; pub const NV_ERR_DMA_IN_USE: u32 = 0x00000007; pub const NV_ERR_DMA_MEM_NOT_LOCKED: u32 = 0x00000008; pub const NV_ERR_DMA_MEM_NOT_UNLOCKED: u32 = 0x00000009; pub const NV_ERR_DUAL_LINK_INUSE: u32 = 0x0000000a; pub const NV_ERR_ECC_ERROR: u32 = 0x0000000b; pub const NV_ERR_FIFO_BAD_ACCESS: u32 = 0x0000000c; pub const NV_ERR_FREQ_NOT_SUPPORTED: u32 = 0x0000000d; pub const NV_ERR_GPU_DMA_NOT_INITIALIZED: u32 = 0x0000000e; pub const NV_ERR_GPU_IS_LOST: u32 = 0x0000000f; pub const NV_ERR_GPU_IN_FULLCHIP_RESET: u32 = 0x00000010; pub const NV_ERR_GPU_NOT_FULL_POWER: u32 = 0x00000011; pub const NV_ERR_GPU_UUID_NOT_FOUND: u32 = 0x00000012; pub const NV_ERR_HOT_SWITCH: u32 = 0x00000013; pub const NV_ERR_I2C_ERROR: u32 = 0x00000014; pub const NV_ERR_I2C_SPEED_TOO_HIGH: u32 = 0x00000015; pub const NV_ERR_ILLEGAL_ACTION: u32 = 0x00000016; pub const NV_ERR_IN_USE: u32 = 0x00000017; pub const NV_ERR_INFLATE_COMPRESSED_DATA_FAILED: u32 = 0x00000018; pub const NV_ERR_INSERT_DUPLICATE_NAME: u32 = 0x00000019; pub const NV_ERR_INSUFFICIENT_RESOURCES: u32 = 0x0000001a; pub const NV_ERR_INSUFFICIENT_PERMISSIONS: u32 = 0x0000001b; pub const NV_ERR_INSUFFICIENT_POWER: u32 = 0x0000001c; pub const NV_ERR_INVALID_ACCESS_TYPE: u32 = 0x0000001d; pub const NV_ERR_INVALID_ADDRESS: u32 = 0x0000001e; pub const NV_ERR_INVALID_ARGUMENT: u32 = 0x0000001f; pub const NV_ERR_INVALID_BASE: u32 = 0x00000020; pub const NV_ERR_INVALID_CHANNEL: u32 = 0x00000021; pub const NV_ERR_INVALID_CLASS: u32 = 0x00000022; pub const NV_ERR_INVALID_CLIENT: u32 = 0x00000023; pub const NV_ERR_INVALID_COMMAND: u32 = 0x00000024; pub const NV_ERR_INVALID_DATA: u32 = 0x00000025; pub const NV_ERR_INVALID_DEVICE: u32 = 0x00000026; pub const NV_ERR_INVALID_DMA_SPECIFIER: u32 = 0x00000027; pub const NV_ERR_INVALID_EVENT: u32 = 0x00000028; pub const NV_ERR_INVALID_FLAGS: u32 = 0x00000029; pub const NV_ERR_INVALID_FUNCTION: u32 = 0x0000002a; pub const NV_ERR_INVALID_HEAP: u32 = 0x0000002b; pub const NV_ERR_INVALID_INDEX: u32 = 0x0000002c; pub const NV_ERR_INVALID_IRQ_LEVEL: u32 = 0x0000002d; pub const NV_ERR_INVALID_LIMIT: u32 = 0x0000002e; pub const NV_ERR_INVALID_LOCK_STATE: u32 = 0x0000002f; pub const NV_ERR_INVALID_METHOD: u32 = 0x00000030; pub const NV_ERR_INVALID_OBJECT: u32 = 0x00000031; pub const NV_ERR_INVALID_OBJECT_BUFFER: u32 = 0x00000032; pub const NV_ERR_INVALID_OBJECT_HANDLE: u32 = 0x00000033; pub const NV_ERR_INVALID_OBJECT_NEW: u32 = 0x00000034; pub const NV_ERR_INVALID_OBJECT_OLD: u32 = 0x00000035; pub const NV_ERR_INVALID_OBJECT_PARENT: u32 = 0x00000036; pub const NV_ERR_INVALID_OFFSET: u32 = 0x00000037; pub const NV_ERR_INVALID_OPERATION: u32 = 0x00000038; pub const NV_ERR_INVALID_OWNER: u32 = 0x00000039; pub const NV_ERR_INVALID_PARAM_STRUCT: u32 = 0x0000003a; pub const NV_ERR_INVALID_PARAMETER: u32 = 0x0000003b; pub const NV_ERR_INVALID_PATH: u32 = 0x0000003c; pub const NV_ERR_INVALID_POINTER: u32 = 0x0000003d; pub const NV_ERR_INVALID_REGISTRY_KEY: u32 = 0x0000003e; pub const NV_ERR_INVALID_REQUEST: u32 = 0x0000003f; pub const NV_ERR_INVALID_STATE: u32 = 0x00000040; pub const NV_ERR_INVALID_STRING_LENGTH: u32 = 0x00000041; pub const NV_ERR_INVALID_READ: u32 = 0x00000042; pub const NV_ERR_INVALID_WRITE: u32 = 0x00000043; pub const NV_ERR_INVALID_XLATE: u32 = 0x00000044; pub const NV_ERR_IRQ_NOT_FIRING: u32 = 0x00000045; pub const NV_ERR_IRQ_EDGE_TRIGGERED: u32 = 0x00000046; pub const NV_ERR_MEMORY_TRAINING_FAILED: u32 = 0x00000047; pub const NV_ERR_MISMATCHED_SLAVE: u32 = 0x00000048; pub const NV_ERR_MISMATCHED_TARGET: u32 = 0x00000049; pub const NV_ERR_MISSING_TABLE_ENTRY: u32 = 0x0000004a; pub const NV_ERR_MODULE_LOAD_FAILED: u32 = 0x0000004b; pub const NV_ERR_MORE_DATA_AVAILABLE: u32 = 0x0000004c; pub const NV_ERR_MORE_PROCESSING_REQUIRED: u32 = 0x0000004d; pub const NV_ERR_MULTIPLE_MEMORY_TYPES: u32 = 0x0000004e; pub const NV_ERR_NO_FREE_FIFOS: u32 = 0x0000004f; pub const NV_ERR_NO_INTR_PENDING: u32 = 0x00000050; pub const NV_ERR_NO_MEMORY: u32 = 0x00000051; pub const NV_ERR_NO_SUCH_DOMAIN: u32 = 0x00000052; pub const NV_ERR_NO_VALID_PATH: u32 = 0x00000053; pub const NV_ERR_NOT_COMPATIBLE: u32 = 0x00000054; pub const NV_ERR_NOT_READY: u32 = 0x00000055; pub const NV_ERR_NOT_SUPPORTED: u32 = 0x00000056; pub const NV_ERR_OBJECT_NOT_FOUND: u32 = 0x00000057; pub const NV_ERR_OBJECT_TYPE_MISMATCH: u32 = 0x00000058; pub const NV_ERR_OPERATING_SYSTEM: u32 = 0x00000059; pub const NV_ERR_OTHER_DEVICE_FOUND: u32 = 0x0000005a; pub const NV_ERR_OUT_OF_RANGE: u32 = 0x0000005b; pub const NV_ERR_OVERLAPPING_UVM_COMMIT: u32 = 0x0000005c; pub const NV_ERR_PAGE_TABLE_NOT_AVAIL: u32 = 0x0000005d; pub const NV_ERR_PID_NOT_FOUND: u32 = 0x0000005e; pub const NV_ERR_PROTECTION_FAULT: u32 = 0x0000005f; pub const NV_ERR_RC_ERROR: u32 = 0x00000060; pub const NV_ERR_REJECTED_VBIOS: u32 = 0x00000061; pub const NV_ERR_RESET_REQUIRED: u32 = 0x00000062; pub const NV_ERR_STATE_IN_USE: u32 = 0x00000063; pub const NV_ERR_SIGNAL_PENDING: u32 = 0x00000064; pub const NV_ERR_TIMEOUT: u32 = 0x00000065; pub const NV_ERR_TIMEOUT_RETRY: u32 = 0x00000066; pub const NV_ERR_TOO_MANY_PRIMARIES: u32 = 0x00000067; pub const NV_ERR_UVM_ADDRESS_IN_USE: u32 = 0x00000068; pub const NV_ERR_MAX_SESSION_LIMIT_REACHED: u32 = 0x00000069; pub const NV_ERR_LIB_RM_VERSION_MISMATCH: u32 = 0x0000006a; pub const NV_ERR_PRIV_SEC_VIOLATION: u32 = 0x0000006b; pub const NV_ERR_GPU_IN_DEBUG_MODE: u32 = 0x0000006c; pub const NV_ERR_FEATURE_NOT_ENABLED: u32 = 0x0000006d; pub const NV_ERR_RESOURCE_LOST: u32 = 0x0000006e; pub const NV_ERR_PMU_NOT_READY: u32 = 0x0000006f; pub const NV_ERR_FLCN_ERROR: u32 = 0x00000070; pub const NV_ERR_FATAL_ERROR: u32 = 0x00000071; pub const NV_ERR_MEMORY_ERROR: u32 = 0x00000072; pub const NV_ERR_INVALID_LICENSE: u32 = 0x00000073; pub const NV_ERR_NVLINK_INIT_ERROR: u32 = 0x00000074; pub const NV_ERR_NVLINK_MINION_ERROR: u32 = 0x00000075; pub const NV_ERR_NVLINK_CLOCK_ERROR: u32 = 0x00000076; pub const NV_ERR_NVLINK_TRAINING_ERROR: u32 = 0x00000077; pub const NV_ERR_NVLINK_CONFIGURATION_ERROR: u32 = 0x00000078; pub const NV_ERR_RISCV_ERROR: u32 = 0x00000079; pub const NV_ERR_FABRIC_MANAGER_NOT_PRESENT: u32 = 0x0000007a; pub const NV_WARN_HOT_SWITCH: u32 = 0x00010001; pub const NV_WARN_INCORRECT_PERFMON_DATA: u32 = 0x00010002; pub const NV_WARN_MISMATCHED_SLAVE: u32 = 0x00010003; pub const NV_WARN_MISMATCHED_TARGET: u32 = 0x00010004; pub const NV_WARN_MORE_PROCESSING_REQUIRED: u32 = 0x00010005; pub const NV_WARN_NOTHING_TO_DO: u32 = 0x00010006; pub const NV_WARN_NULL_OBJECT: u32 = 0x00010007; pub const NV_WARN_OUT_OF_RANGE: u32 = 0x00010008;