1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef _UAPI_TEGRA_DRM_H_ 20#define _UAPI_TEGRA_DRM_H_ 21#include <drm/drm.h> 22#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) 25struct drm_tegra_gem_create { 26 __u64 size; 27 __u32 flags; 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __u32 handle; 30}; 31struct drm_tegra_gem_mmap { 32 __u32 handle; 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 __u32 pad; 35 __u64 offset; 36}; 37struct drm_tegra_syncpt_read { 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 __u32 id; 40 __u32 value; 41}; 42struct drm_tegra_syncpt_incr { 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u32 id; 45 __u32 pad; 46}; 47struct drm_tegra_syncpt_wait { 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 __u32 id; 50 __u32 thresh; 51 __u32 timeout; 52 __u32 value; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54}; 55#define DRM_TEGRA_NO_TIMEOUT (0xffffffff) 56struct drm_tegra_open_channel { 57 __u32 client; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 __u32 pad; 60 __u64 context; 61}; 62struct drm_tegra_close_channel { 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 __u64 context; 65}; 66struct drm_tegra_get_syncpt { 67 __u64 context; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 __u32 index; 70 __u32 id; 71}; 72struct drm_tegra_get_syncpt_base { 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 __u64 context; 75 __u32 syncpt; 76 __u32 id; 77}; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79struct drm_tegra_syncpt { 80 __u32 id; 81 __u32 incrs; 82}; 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84struct drm_tegra_cmdbuf { 85 __u32 handle; 86 __u32 offset; 87 __u32 words; 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 __u32 pad; 90}; 91struct drm_tegra_reloc { 92 struct { 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 __u32 handle; 95 __u32 offset; 96 } cmdbuf; 97 struct { 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 __u32 handle; 100 __u32 offset; 101 } target; 102 __u32 shift; 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 __u32 pad; 105}; 106struct drm_tegra_waitchk { 107 __u32 handle; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 __u32 offset; 110 __u32 syncpt; 111 __u32 thresh; 112}; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114struct drm_tegra_submit { 115 __u64 context; 116 __u32 num_syncpts; 117 __u32 num_cmdbufs; 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 __u32 num_relocs; 120 __u32 num_waitchks; 121 __u32 waitchk_mask; 122 __u32 timeout; 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 __u64 syncpts; 125 __u64 cmdbufs; 126 __u64 relocs; 127 __u64 waitchks; 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 __u32 fence; 130 __u32 reserved[5]; 131}; 132#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134#define DRM_TEGRA_GEM_TILING_MODE_TILED 1 135#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2 136struct drm_tegra_gem_set_tiling { 137 __u32 handle; 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 __u32 mode; 140 __u32 value; 141 __u32 pad; 142}; 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144struct drm_tegra_gem_get_tiling { 145 __u32 handle; 146 __u32 mode; 147 __u32 value; 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 __u32 pad; 150}; 151#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0) 152#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP) 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154struct drm_tegra_gem_set_flags { 155 __u32 handle; 156 __u32 flags; 157}; 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159struct drm_tegra_gem_get_flags { 160 __u32 handle; 161 __u32 flags; 162}; 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164#define DRM_TEGRA_GEM_CREATE 0x00 165#define DRM_TEGRA_GEM_MMAP 0x01 166#define DRM_TEGRA_SYNCPT_READ 0x02 167#define DRM_TEGRA_SYNCPT_INCR 0x03 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169#define DRM_TEGRA_SYNCPT_WAIT 0x04 170#define DRM_TEGRA_OPEN_CHANNEL 0x05 171#define DRM_TEGRA_CLOSE_CHANNEL 0x06 172#define DRM_TEGRA_GET_SYNCPT 0x07 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174#define DRM_TEGRA_SUBMIT 0x08 175#define DRM_TEGRA_GET_SYNCPT_BASE 0x09 176#define DRM_TEGRA_GEM_SET_TILING 0x0a 177#define DRM_TEGRA_GEM_GET_TILING 0x0b 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179#define DRM_TEGRA_GEM_SET_FLAGS 0x0c 180#define DRM_TEGRA_GEM_GET_FLAGS 0x0d 181#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) 182#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read) 185#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr) 186#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait) 187#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel) 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel) 190#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) 191#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) 192#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling) 195#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling) 196#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) 197#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199#endif 200