5#define _NV_IOC_NRBITS 8
6#define _NV_IOC_TYPEBITS 8
7#define _NV_IOC_SIZEBITS 14
8#define _NV_IOC_DIRBITS 2
10#define _NV_IOC_NRMASK ((1 << _NV_IOC_NRBITS)-1)
11#define _NV_IOC_TYPEMASK ((1 << _NV_IOC_TYPEBITS)-1)
12#define _NV_IOC_SIZEMASK ((1 << _NV_IOC_SIZEBITS)-1)
13#define _NV_IOC_DIRMASK ((1 << _NV_IOC_DIRBITS)-1)
15#define _NV_IOC_NRSHIFT 0
16#define _NV_IOC_TYPESHIFT (_NV_IOC_NRSHIFT+_NV_IOC_NRBITS)
17#define _NV_IOC_SIZESHIFT (_NV_IOC_TYPESHIFT+_NV_IOC_TYPEBITS)
18#define _NV_IOC_DIRSHIFT (_NV_IOC_SIZESHIFT+_NV_IOC_SIZEBITS)
21#define _NV_IOC_NONE 0U
22#define _NV_IOC_WRITE 1U
23#define _NV_IOC_READ 2U
25#define _NV_IOC(dir,type,nr,size) \
26 (((dir) << _NV_IOC_DIRSHIFT) | \
27 ((type) << _NV_IOC_TYPESHIFT) | \
28 ((nr) << _NV_IOC_NRSHIFT) | \
29 ((size) << _NV_IOC_SIZESHIFT))
32#define _NV_IO(type,nr) _NV_IOC(_NV_IOC_NONE,(type),(nr),0)
33#define _NV_IOR(type,nr,size) _NV_IOC(_NV_IOC_READ,(type),(nr),sizeof(size))
34#define _NV_IOW(type,nr,size) _NV_IOC(_NV_IOC_WRITE,(type),(nr),sizeof(size))
35#define _NV_IOWR(type,nr,size) _NV_IOC(_NV_IOC_READ|_NV_IOC_WRITE,(type),(nr),sizeof(size))
38#define _NV_IOC_DIR(nr) (((nr) >> _NV_IOC_DIRSHIFT) & _NV_IOC_DIRMASK)
39#define _NV_IOC_TYPE(nr) (((nr) >> _NV_IOC_TYPESHIFT) & _NV_IOC_TYPEMASK)
40#define _NV_IOC_NR(nr) (((nr) >> _NV_IOC_NRSHIFT) & _NV_IOC_NRMASK)
41#define _NV_IOC_SIZE(nr) (((nr) >> _NV_IOC_SIZESHIFT) & _NV_IOC_SIZEMASK)
48 u32 width_align_pixels;
49 u32 height_align_pixels;
50 u32 pixel_squares_by_aliquots;
52 u32 region_byte_multiplier;
53 u32 region_header_size;
54 u32 subregion_header_size;
55 u32 subregion_width_align_pixels;
56 u32 subregion_height_align_pixels;
76 u64 on_board_video_memory_size;
80 u32 compression_page_size;
81 u32 pde_coverage_bit_count;
82 u32 available_big_page_sizes;
84 u32 sm_arch_sm_version;
85 u32 sm_arch_spa_version;
86 u32 sm_arch_warp_count;
94 u32 inline_to_memory_class;
102 u32 rop_l2_en_mask_0;
103 u32 rop_l2_en_mask_1;
105 u64 gr_compbit_store_base_hw;
172#define NVGPU_ZBC_TYPE_INVALID 0
173#define NVGPU_ZBC_TYPE_COLOR 1
174#define NVGPU_ZBC_TYPE_DEPTH 2
177typedef enum nvioctl_map_param {
179 NvMapParam_Alignment = 2,
186typedef enum nvioctl_channel_obj_classnum {
187 NvClassNumber_2D = 0x902D,
188 NvClassNumber_3D = 0xB197,
189 NvClassNumber_Compute = 0xB1C0,
190 NvClassNumber_Kepler = 0xA140,
191 NvClassNumber_DMA = 0xB0B5,
192 NvClassNumber_ChannelGpfifo = 0xB06F
196typedef enum nvioctl_channel_priority {
197 NvChannelPriority_Low = 50,
198 NvChannelPriority_Medium = 100,
199 NvChannelPriority_High = 150
204 NvZcullConfig_Global = 0,
205 NvZcullConfig_NoCtxSwitch = 1,
206 NvZcullConfig_SeparateBuffer = 2,
207 NvZcullConfig_PartOfRegularBuffer = 3
212 NvAllocSpaceFlags_FixedOffset = 1,
213 NvAllocSpaceFlags_Sparse = 2,
218 NvMapBufferFlags_FixedOffset = 1,
219 NvMapBufferFlags_IsCacheable = 4,
220 NvMapBufferFlags_Modify = 0x100,
224 NvNotificationType_FifoErrorIdleTimeout=8,
225 NvNotificationType_GrErrorSwNotify=13,
226 NvNotificationType_GrSemaphoreTimeout=24,
227 NvNotificationType_GrIllegalNotify=25,
228 NvNotificationType_FifoErrorMmuErrFlt=31,
229 NvNotificationType_PbdmaError=32,
230 NvNotificationType_ResetChannelVerifError=43,
231 NvNotificationType_PbdmaPushbufferCrcMismatch=80
249Result nvioctlNvhostCtrl_EventSignal(
u32 fd,
u32 event_id);
251Result nvioctlNvhostCtrl_EventWaitAsync(
u32 fd,
u32 syncpt_id,
u32 threshold,
s32 timeout,
u32 event_id);
252Result nvioctlNvhostCtrl_EventRegister(
u32 fd,
u32 event_id);
253Result nvioctlNvhostCtrl_EventUnregister(
u32 fd,
u32 event_id);
255Result nvioctlNvhostCtrlGpu_ZCullGetCtxSize(
u32 fd,
u32 *out);
257Result nvioctlNvhostCtrlGpu_ZbcSetTable(
u32 fd,
const u32 color_ds[4],
const u32 color_l2[4],
u32 depth,
u32 format,
u32 type);
260Result nvioctlNvhostCtrlGpu_GetTpcMasks(
u32 fd,
void *buffer,
size_t size);
264Result nvioctlNvhostAsGpu_BindChannel(
u32 fd,
u32 channel_fd);
267Result nvioctlNvhostAsGpu_MapBufferEx(
u32 fd,
u32 flags,
u32 kind,
u32 nvmap_handle,
u32 page_size,
u64 buffer_offset,
u64 mapping_size,
u64 input_offset,
u64 *offset);
268Result nvioctlNvhostAsGpu_UnmapBuffer(
u32 fd,
u64 offset);
270Result nvioctlNvhostAsGpu_InitializeEx(
u32 fd,
u32 flags,
u32 big_page_size);
276Result nvioctlNvmap_Param(
u32 fd,
u32 nvmap_handle, NvMapParam param,
u32 *result);
284Result nvioctlChannel_SetErrorNotifier(
u32 fd,
u32 enable);
290Result nvioctlChannel_SetUserData(
u32 fd,
void* addr);
294Result nvioctlChannel_GetModuleClockRate(
u32 fd,
u32 module_id,
u32 *freq);
295Result nvioctlChannel_SetModuleClockRate(
u32 fd,
u32 module_id,
u32 freq);
298Result nvioctlChannel_SetSubmitTimeout(
u32 fd,
u32 timeout);
uint64_t u64
64-bit unsigned integer.
Definition types.h:22
uint8_t u8
8-bit unsigned integer.
Definition types.h:19
uint16_t u16
16-bit unsigned integer.
Definition types.h:20
u32 Result
Function error code result type.
Definition types.h:44
int32_t s32
32-bit signed integer.
Definition types.h:27
uint32_t u32
32-bit unsigned integer.
Definition types.h:21