diff options
| author | Anuj Gangwar <anujg@nvidia.com> | 2019-05-02 04:39:47 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-05-03 16:43:32 -0400 |
| commit | b84c71d300cca687c1e00cab63f0281bac0ef29f (patch) | |
| tree | 8ee4bd7171542fc09f59c1873ab85aa84b352310 /include/linux | |
| parent | f2a9346cca352528eb0884da92b35f979fcf2356 (diff) | |
include: uapi: move nvhost user-interface headers
Move the linux user-interface headers from include/linux/
to include/uapi/linux/.
Change the path for above headers in the dependent files
Bug 2062672
Change-Id: I2e116dc8f6c33f53c03fb56b923931b6e600b534
Signed-off-by: Anuj Gangwar <anujg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1953709
(cherry picked from commit 965ceca35c92eba011163f4c637b3b9e0f073f1a)
Signed-off-by: Anuj Gangwar <anujg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2110116
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvhost_ioctl.h | 499 | ||||
| -rw-r--r-- | include/linux/nvhost_isp_ioctl.h | 65 | ||||
| -rw-r--r-- | include/linux/nvhost_nvcsi_ioctl.h | 89 | ||||
| -rw-r--r-- | include/linux/nvhost_nvdec_ioctl.h | 48 | ||||
| -rw-r--r-- | include/linux/nvhost_nvdla_ioctl.h | 233 | ||||
| -rw-r--r-- | include/linux/nvhost_vi_ioctl.h | 47 |
6 files changed, 0 insertions, 981 deletions
diff --git a/include/linux/nvhost_ioctl.h b/include/linux/nvhost_ioctl.h deleted file mode 100644 index c1b3df572..000000000 --- a/include/linux/nvhost_ioctl.h +++ /dev/null | |||
| @@ -1,499 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nvhost_ioctl.h | ||
| 3 | * | ||
| 4 | * Tegra graphics host driver | ||
| 5 | * | ||
| 6 | * Copyright (c) 2009-2018, NVIDIA Corporation. All rights reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 16 | * more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License along | ||
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_NVHOST_IOCTL_H | ||
| 24 | #define __LINUX_NVHOST_IOCTL_H | ||
| 25 | |||
| 26 | #include <linux/ioctl.h> | ||
| 27 | #include <linux/types.h> | ||
| 28 | |||
| 29 | #if !defined(__KERNEL__) | ||
| 30 | #define __user | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #define NVHOST_INVALID_SYNCPOINT 0xFFFFFFFF | ||
| 34 | #define NVHOST_NO_TIMEOUT (-1) | ||
| 35 | #define NVHOST_NO_CONTEXT 0x0 | ||
| 36 | #define NVHOST_IOCTL_MAGIC 'H' | ||
| 37 | #define NVHOST_PRIORITY_LOW 50 | ||
| 38 | #define NVHOST_PRIORITY_MEDIUM 100 | ||
| 39 | #define NVHOST_PRIORITY_HIGH 150 | ||
| 40 | |||
| 41 | #define NVHOST_TIMEOUT_FLAG_DISABLE_DUMP 0 | ||
| 42 | |||
| 43 | #define NVHOST_SUBMIT_VERSION_V0 0x0 | ||
| 44 | #define NVHOST_SUBMIT_VERSION_V1 0x1 | ||
| 45 | #define NVHOST_SUBMIT_VERSION_V2 0x2 | ||
| 46 | #define NVHOST_SUBMIT_VERSION_MAX_SUPPORTED NVHOST_SUBMIT_VERSION_V2 | ||
| 47 | |||
| 48 | struct nvhost_cmdbuf { | ||
| 49 | __u32 mem; | ||
| 50 | __u32 offset; | ||
| 51 | __u32 words; | ||
| 52 | } __packed; | ||
| 53 | |||
| 54 | struct nvhost_cmdbuf_ext { | ||
| 55 | __s32 pre_fence; | ||
| 56 | __u32 reserved; | ||
| 57 | }; | ||
| 58 | |||
| 59 | struct nvhost_reloc { | ||
| 60 | __u32 cmdbuf_mem; | ||
| 61 | __u32 cmdbuf_offset; | ||
| 62 | __u32 target; | ||
| 63 | __u32 target_offset; | ||
| 64 | }; | ||
| 65 | |||
| 66 | struct nvhost_reloc_shift { | ||
| 67 | __u32 shift; | ||
| 68 | } __packed; | ||
| 69 | |||
| 70 | #define NVHOST_RELOC_TYPE_DEFAULT 0 | ||
| 71 | #define NVHOST_RELOC_TYPE_PITCH_LINEAR 1 | ||
| 72 | #define NVHOST_RELOC_TYPE_BLOCK_LINEAR 2 | ||
| 73 | #define NVHOST_RELOC_TYPE_NVLINK 3 | ||
| 74 | struct nvhost_reloc_type { | ||
| 75 | __u32 reloc_type; | ||
| 76 | __u32 padding; | ||
| 77 | }; | ||
| 78 | |||
| 79 | struct nvhost_waitchk { | ||
| 80 | __u32 mem; | ||
| 81 | __u32 offset; | ||
| 82 | __u32 syncpt_id; | ||
| 83 | __u32 thresh; | ||
| 84 | }; | ||
| 85 | |||
| 86 | struct nvhost_syncpt_incr { | ||
| 87 | __u32 syncpt_id; | ||
| 88 | __u32 syncpt_incrs; | ||
| 89 | }; | ||
| 90 | |||
| 91 | struct nvhost_get_param_args { | ||
| 92 | __u32 value; | ||
| 93 | } __packed; | ||
| 94 | |||
| 95 | struct nvhost_get_param_arg { | ||
| 96 | __u32 param; | ||
| 97 | __u32 value; | ||
| 98 | }; | ||
| 99 | |||
| 100 | struct nvhost_get_client_managed_syncpt_arg { | ||
| 101 | __u64 name; | ||
| 102 | __u32 param; | ||
| 103 | __u32 value; | ||
| 104 | }; | ||
| 105 | |||
| 106 | struct nvhost_free_client_managed_syncpt_arg { | ||
| 107 | __u32 param; | ||
| 108 | __u32 value; | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct nvhost_channel_open_args { | ||
| 112 | __s32 channel_fd; | ||
| 113 | }; | ||
| 114 | |||
| 115 | struct nvhost_set_syncpt_name_args { | ||
| 116 | __u64 name; | ||
| 117 | __u32 syncpt_id; | ||
| 118 | __u32 padding; | ||
| 119 | }; | ||
| 120 | |||
| 121 | struct nvhost_set_nvmap_fd_args { | ||
| 122 | __u32 fd; | ||
| 123 | } __packed; | ||
| 124 | |||
| 125 | enum nvhost_clk_attr { | ||
| 126 | NVHOST_CLOCK = 0, | ||
| 127 | NVHOST_BW, | ||
| 128 | NVHOST_PIXELRATE, | ||
| 129 | NVHOST_BW_KHZ, | ||
| 130 | }; | ||
| 131 | |||
| 132 | /* | ||
| 133 | * moduleid[15:0] => module id | ||
| 134 | * moduleid[24:31] => nvhost_clk_attr | ||
| 135 | */ | ||
| 136 | #define NVHOST_MODULE_ID_BIT_POS 0 | ||
| 137 | #define NVHOST_MODULE_ID_BIT_WIDTH 16 | ||
| 138 | #define NVHOST_CLOCK_ATTR_BIT_POS 24 | ||
| 139 | #define NVHOST_CLOCK_ATTR_BIT_WIDTH 8 | ||
| 140 | struct nvhost_clk_rate_args { | ||
| 141 | __u32 rate; | ||
| 142 | __u32 moduleid; | ||
| 143 | }; | ||
| 144 | |||
| 145 | struct nvhost_set_timeout_args { | ||
| 146 | __u32 timeout; | ||
| 147 | } __packed; | ||
| 148 | |||
| 149 | struct nvhost_set_timeout_ex_args { | ||
| 150 | __u32 timeout; | ||
| 151 | __u32 flags; | ||
| 152 | }; | ||
| 153 | |||
| 154 | struct nvhost_set_priority_args { | ||
| 155 | __u32 priority; | ||
| 156 | } __packed; | ||
| 157 | |||
| 158 | struct nvhost_set_error_notifier { | ||
| 159 | __u64 offset; | ||
| 160 | __u64 size; | ||
| 161 | __u32 mem; | ||
| 162 | __u32 padding; | ||
| 163 | }; | ||
| 164 | |||
| 165 | struct nvhost32_ctrl_module_regrdwr_args { | ||
| 166 | __u32 id; | ||
| 167 | __u32 num_offsets; | ||
| 168 | __u32 block_size; | ||
| 169 | __u32 offsets; | ||
| 170 | __u32 values; | ||
| 171 | __u32 write; | ||
| 172 | }; | ||
| 173 | |||
| 174 | struct nvhost_ctrl_module_regrdwr_args { | ||
| 175 | __u32 id; | ||
| 176 | __u32 num_offsets; | ||
| 177 | __u32 block_size; | ||
| 178 | __u32 write; | ||
| 179 | __u64 offsets; | ||
| 180 | __u64 values; | ||
| 181 | }; | ||
| 182 | |||
| 183 | struct nvhost32_submit_args { | ||
| 184 | __u32 submit_version; | ||
| 185 | __u32 num_syncpt_incrs; | ||
| 186 | __u32 num_cmdbufs; | ||
| 187 | __u32 num_relocs; | ||
| 188 | __u32 num_waitchks; | ||
| 189 | __u32 timeout; | ||
| 190 | __u32 syncpt_incrs; | ||
| 191 | __u32 cmdbufs; | ||
| 192 | __u32 relocs; | ||
| 193 | __u32 reloc_shifts; | ||
| 194 | __u32 waitchks; | ||
| 195 | __u32 waitbases; | ||
| 196 | __u32 class_ids; | ||
| 197 | |||
| 198 | __u32 pad[2]; /* future expansion */ | ||
| 199 | |||
| 200 | __u32 fences; | ||
| 201 | __u32 fence; /* Return value */ | ||
| 202 | } __packed; | ||
| 203 | |||
| 204 | #define NVHOST_SUBMIT_FLAG_SYNC_FENCE_FD 0 | ||
| 205 | #define NVHOST_SUBMIT_MAX_NUM_SYNCPT_INCRS 10 | ||
| 206 | |||
| 207 | struct nvhost_submit_args { | ||
| 208 | __u32 submit_version; | ||
| 209 | __u32 num_syncpt_incrs; | ||
| 210 | __u32 num_cmdbufs; | ||
| 211 | __u32 num_relocs; | ||
| 212 | __u32 num_waitchks; | ||
| 213 | __u32 timeout; | ||
| 214 | __u32 flags; | ||
| 215 | __u32 fence; /* Return value */ | ||
| 216 | __u64 syncpt_incrs; | ||
| 217 | __u64 cmdbuf_exts; | ||
| 218 | |||
| 219 | __u32 checksum_methods; | ||
| 220 | __u32 checksum_falcon_methods; | ||
| 221 | |||
| 222 | __u64 pad[1]; /* future expansion */ | ||
| 223 | |||
| 224 | __u64 reloc_types; | ||
| 225 | __u64 cmdbufs; | ||
| 226 | __u64 relocs; | ||
| 227 | __u64 reloc_shifts; | ||
| 228 | __u64 waitchks; | ||
| 229 | __u64 waitbases; | ||
| 230 | __u64 class_ids; | ||
| 231 | __u64 fences; | ||
| 232 | }; | ||
| 233 | |||
| 234 | struct nvhost_set_ctxswitch_args { | ||
| 235 | __u32 num_cmdbufs_save; | ||
| 236 | __u32 num_save_incrs; | ||
| 237 | __u32 save_incrs; | ||
| 238 | __u32 save_waitbases; | ||
| 239 | __u32 cmdbuf_save; | ||
| 240 | __u32 num_cmdbufs_restore; | ||
| 241 | __u32 num_restore_incrs; | ||
| 242 | __u32 restore_incrs; | ||
| 243 | __u32 restore_waitbases; | ||
| 244 | __u32 cmdbuf_restore; | ||
| 245 | __u32 num_relocs; | ||
| 246 | __u32 relocs; | ||
| 247 | __u32 reloc_shifts; | ||
| 248 | |||
| 249 | __u32 pad; | ||
| 250 | }; | ||
| 251 | |||
| 252 | struct nvhost_channel_buffer { | ||
| 253 | __u32 dmabuf_fd; /* in */ | ||
| 254 | __u32 reserved0; /* reserved, must be 0 */ | ||
| 255 | __u64 reserved1[2]; /* reserved, must be 0 */ | ||
| 256 | __u64 address; /* out, device view to the buffer */ | ||
| 257 | }; | ||
| 258 | |||
| 259 | struct nvhost_channel_unmap_buffer_args { | ||
| 260 | __u32 num_buffers; /* in, number of buffers to unmap */ | ||
| 261 | __u32 reserved; /* reserved, must be 0 */ | ||
| 262 | __u64 table_address; /* pointer to beginning of buffer */ | ||
| 263 | }; | ||
| 264 | |||
| 265 | struct nvhost_channel_map_buffer_args { | ||
| 266 | __u32 num_buffers; /* in, number of buffers to map */ | ||
| 267 | __u32 reserved; /* reserved, must be 0 */ | ||
| 268 | __u64 table_address; /* pointer to beginning of buffer */ | ||
| 269 | }; | ||
| 270 | |||
| 271 | #define NVHOST_IOCTL_CHANNEL_GET_SYNCPOINTS \ | ||
| 272 | _IOR(NVHOST_IOCTL_MAGIC, 2, struct nvhost_get_param_args) | ||
| 273 | #define NVHOST_IOCTL_CHANNEL_GET_WAITBASES \ | ||
| 274 | _IOR(NVHOST_IOCTL_MAGIC, 3, struct nvhost_get_param_args) | ||
| 275 | #define NVHOST_IOCTL_CHANNEL_GET_MODMUTEXES \ | ||
| 276 | _IOR(NVHOST_IOCTL_MAGIC, 4, struct nvhost_get_param_args) | ||
| 277 | #define NVHOST_IOCTL_CHANNEL_SET_NVMAP_FD \ | ||
| 278 | _IOW(NVHOST_IOCTL_MAGIC, 5, struct nvhost_set_nvmap_fd_args) | ||
| 279 | #define NVHOST_IOCTL_CHANNEL_NULL_KICKOFF \ | ||
| 280 | _IOR(NVHOST_IOCTL_MAGIC, 6, struct nvhost_get_param_args) | ||
| 281 | #define NVHOST_IOCTL_CHANNEL_GET_CLK_RATE \ | ||
| 282 | _IOWR(NVHOST_IOCTL_MAGIC, 9, struct nvhost_clk_rate_args) | ||
| 283 | #define NVHOST_IOCTL_CHANNEL_SET_CLK_RATE \ | ||
| 284 | _IOW(NVHOST_IOCTL_MAGIC, 10, struct nvhost_clk_rate_args) | ||
| 285 | #define NVHOST_IOCTL_CHANNEL_SET_TIMEOUT \ | ||
| 286 | _IOW(NVHOST_IOCTL_MAGIC, 11, struct nvhost_set_timeout_args) | ||
| 287 | #define NVHOST_IOCTL_CHANNEL_GET_TIMEDOUT \ | ||
| 288 | _IOR(NVHOST_IOCTL_MAGIC, 12, struct nvhost_get_param_args) | ||
| 289 | #define NVHOST_IOCTL_CHANNEL_SET_PRIORITY \ | ||
| 290 | _IOW(NVHOST_IOCTL_MAGIC, 13, struct nvhost_set_priority_args) | ||
| 291 | #define NVHOST32_IOCTL_CHANNEL_MODULE_REGRDWR \ | ||
| 292 | _IOWR(NVHOST_IOCTL_MAGIC, 14, struct nvhost32_ctrl_module_regrdwr_args) | ||
| 293 | #define NVHOST32_IOCTL_CHANNEL_SUBMIT \ | ||
| 294 | _IOWR(NVHOST_IOCTL_MAGIC, 15, struct nvhost32_submit_args) | ||
| 295 | #define NVHOST_IOCTL_CHANNEL_GET_SYNCPOINT \ | ||
| 296 | _IOWR(NVHOST_IOCTL_MAGIC, 16, struct nvhost_get_param_arg) | ||
| 297 | #define NVHOST_IOCTL_CHANNEL_GET_WAITBASE \ | ||
| 298 | _IOWR(NVHOST_IOCTL_MAGIC, 17, struct nvhost_get_param_arg) | ||
| 299 | #define NVHOST_IOCTL_CHANNEL_SET_TIMEOUT_EX \ | ||
| 300 | _IOWR(NVHOST_IOCTL_MAGIC, 18, struct nvhost_set_timeout_ex_args) | ||
| 301 | #define NVHOST_IOCTL_CHANNEL_GET_CLIENT_MANAGED_SYNCPOINT \ | ||
| 302 | _IOWR(NVHOST_IOCTL_MAGIC, 19, struct nvhost_get_client_managed_syncpt_arg) | ||
| 303 | #define NVHOST_IOCTL_CHANNEL_FREE_CLIENT_MANAGED_SYNCPOINT \ | ||
| 304 | _IOWR(NVHOST_IOCTL_MAGIC, 20, struct nvhost_free_client_managed_syncpt_arg) | ||
| 305 | #define NVHOST_IOCTL_CHANNEL_GET_MODMUTEX \ | ||
| 306 | _IOWR(NVHOST_IOCTL_MAGIC, 23, struct nvhost_get_param_arg) | ||
| 307 | #define NVHOST_IOCTL_CHANNEL_SET_CTXSWITCH \ | ||
| 308 | _IOWR(NVHOST_IOCTL_MAGIC, 25, struct nvhost_set_ctxswitch_args) | ||
| 309 | |||
| 310 | /* ioctls added for 64bit compatibility */ | ||
| 311 | #define NVHOST_IOCTL_CHANNEL_SUBMIT \ | ||
| 312 | _IOWR(NVHOST_IOCTL_MAGIC, 26, struct nvhost_submit_args) | ||
| 313 | #define NVHOST_IOCTL_CHANNEL_MODULE_REGRDWR \ | ||
| 314 | _IOWR(NVHOST_IOCTL_MAGIC, 27, struct nvhost_ctrl_module_regrdwr_args) | ||
| 315 | |||
| 316 | #define NVHOST_IOCTL_CHANNEL_MAP_BUFFER \ | ||
| 317 | _IOWR(NVHOST_IOCTL_MAGIC, 28, struct nvhost_channel_map_buffer_args) | ||
| 318 | #define NVHOST_IOCTL_CHANNEL_UNMAP_BUFFER \ | ||
| 319 | _IOWR(NVHOST_IOCTL_MAGIC, 29, struct nvhost_channel_unmap_buffer_args) | ||
| 320 | |||
| 321 | #define NVHOST_IOCTL_CHANNEL_SET_SYNCPOINT_NAME \ | ||
| 322 | _IOW(NVHOST_IOCTL_MAGIC, 30, struct nvhost_set_syncpt_name_args) | ||
| 323 | |||
| 324 | #define NVHOST_IOCTL_CHANNEL_SET_ERROR_NOTIFIER \ | ||
| 325 | _IOWR(NVHOST_IOCTL_MAGIC, 111, struct nvhost_set_error_notifier) | ||
| 326 | #define NVHOST_IOCTL_CHANNEL_OPEN \ | ||
| 327 | _IOR(NVHOST_IOCTL_MAGIC, 112, struct nvhost_channel_open_args) | ||
| 328 | |||
| 329 | #define NVHOST_IOCTL_CHANNEL_LAST \ | ||
| 330 | _IOC_NR(NVHOST_IOCTL_CHANNEL_OPEN) | ||
| 331 | #define NVHOST_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvhost_submit_args) | ||
| 332 | |||
| 333 | struct nvhost_ctrl_syncpt_read_args { | ||
| 334 | __u32 id; | ||
| 335 | __u32 value; | ||
| 336 | }; | ||
| 337 | |||
| 338 | struct nvhost_ctrl_syncpt_incr_args { | ||
| 339 | __u32 id; | ||
| 340 | } __packed; | ||
| 341 | |||
| 342 | struct nvhost_ctrl_syncpt_wait_args { | ||
| 343 | __u32 id; | ||
| 344 | __u32 thresh; | ||
| 345 | __s32 timeout; | ||
| 346 | } __packed; | ||
| 347 | |||
| 348 | struct nvhost_ctrl_syncpt_waitex_args { | ||
| 349 | __u32 id; | ||
| 350 | __u32 thresh; | ||
| 351 | __s32 timeout; | ||
| 352 | __u32 value; | ||
| 353 | }; | ||
| 354 | |||
| 355 | struct nvhost_ctrl_syncpt_waitmex_args { | ||
| 356 | __u32 id; | ||
| 357 | __u32 thresh; | ||
| 358 | __s32 timeout; | ||
| 359 | __u32 value; | ||
| 360 | __u32 tv_sec; | ||
| 361 | __u32 tv_nsec; | ||
| 362 | __u32 clock_id; | ||
| 363 | __u32 reserved; | ||
| 364 | }; | ||
| 365 | |||
| 366 | struct nvhost_ctrl_sync_fence_info { | ||
| 367 | __u32 id; | ||
| 368 | __u32 thresh; | ||
| 369 | }; | ||
| 370 | |||
| 371 | struct nvhost32_ctrl_sync_fence_create_args { | ||
| 372 | __u32 num_pts; | ||
| 373 | __u64 pts; /* struct nvhost_ctrl_sync_fence_info* */ | ||
| 374 | __u64 name; /* const char* */ | ||
| 375 | __s32 fence_fd; /* fd of new fence */ | ||
| 376 | }; | ||
| 377 | |||
| 378 | struct nvhost_ctrl_sync_fence_create_args { | ||
| 379 | __u32 num_pts; | ||
| 380 | __s32 fence_fd; /* fd of new fence */ | ||
| 381 | __u64 pts; /* struct nvhost_ctrl_sync_fence_info* */ | ||
| 382 | __u64 name; /* const char* */ | ||
| 383 | }; | ||
| 384 | |||
| 385 | struct nvhost_ctrl_sync_fence_name_args { | ||
| 386 | __u64 name; /* const char* for name */ | ||
| 387 | __s32 fence_fd; /* fd of fence */ | ||
| 388 | }; | ||
| 389 | |||
| 390 | struct nvhost_ctrl_module_mutex_args { | ||
| 391 | __u32 id; | ||
| 392 | __u32 lock; | ||
| 393 | }; | ||
| 394 | |||
| 395 | enum nvhost_module_id { | ||
| 396 | NVHOST_MODULE_NONE = -1, | ||
| 397 | NVHOST_MODULE_DISPLAY_A = 0, | ||
| 398 | NVHOST_MODULE_DISPLAY_B, | ||
| 399 | NVHOST_MODULE_VI, | ||
| 400 | NVHOST_MODULE_ISP, | ||
| 401 | NVHOST_MODULE_MPE, | ||
| 402 | NVHOST_MODULE_MSENC, | ||
| 403 | NVHOST_MODULE_TSEC, | ||
| 404 | NVHOST_MODULE_GPU, | ||
| 405 | NVHOST_MODULE_VIC, | ||
| 406 | NVHOST_MODULE_NVDEC, | ||
| 407 | NVHOST_MODULE_NVJPG, | ||
| 408 | NVHOST_MODULE_VII2C, | ||
| 409 | NVHOST_MODULE_NVENC1, | ||
| 410 | NVHOST_MODULE_NVDEC1, | ||
| 411 | NVHOST_MODULE_NVCSI, | ||
| 412 | NVHOST_MODULE_TSECB = (1<<16) | NVHOST_MODULE_TSEC, | ||
| 413 | }; | ||
| 414 | |||
| 415 | struct nvhost_characteristics { | ||
| 416 | #define NVHOST_CHARACTERISTICS_GFILTER (1 << 0) | ||
| 417 | #define NVHOST_CHARACTERISTICS_RESOURCE_PER_CHANNEL_INSTANCE (1 << 1) | ||
| 418 | #define NVHOST_CHARACTERISTICS_SUPPORT_PREFENCES (1 << 2) | ||
| 419 | __u64 flags; | ||
| 420 | |||
| 421 | __u32 num_mlocks; | ||
| 422 | __u32 num_syncpts; | ||
| 423 | |||
| 424 | __u32 syncpts_base; | ||
| 425 | __u32 syncpts_limit; | ||
| 426 | |||
| 427 | __u32 num_hw_pts; | ||
| 428 | __u32 padding; | ||
| 429 | }; | ||
| 430 | |||
| 431 | struct nvhost_ctrl_get_characteristics { | ||
| 432 | __u64 nvhost_characteristics_buf_size; | ||
| 433 | __u64 nvhost_characteristics_buf_addr; | ||
| 434 | }; | ||
| 435 | |||
| 436 | struct nvhost_ctrl_check_module_support_args { | ||
| 437 | __u32 module_id; | ||
| 438 | __u32 value; | ||
| 439 | }; | ||
| 440 | |||
| 441 | struct nvhost_ctrl_poll_fd_create_args { | ||
| 442 | __s32 fd; | ||
| 443 | __u32 padding; | ||
| 444 | }; | ||
| 445 | |||
| 446 | struct nvhost_ctrl_poll_fd_trigger_event_args { | ||
| 447 | __s32 fd; | ||
| 448 | __u32 id; | ||
| 449 | __u32 thresh; | ||
| 450 | __u32 padding; | ||
| 451 | }; | ||
| 452 | |||
| 453 | #define NVHOST_IOCTL_CTRL_SYNCPT_READ \ | ||
| 454 | _IOWR(NVHOST_IOCTL_MAGIC, 1, struct nvhost_ctrl_syncpt_read_args) | ||
| 455 | #define NVHOST_IOCTL_CTRL_SYNCPT_INCR \ | ||
| 456 | _IOW(NVHOST_IOCTL_MAGIC, 2, struct nvhost_ctrl_syncpt_incr_args) | ||
| 457 | #define NVHOST_IOCTL_CTRL_SYNCPT_WAIT \ | ||
| 458 | _IOW(NVHOST_IOCTL_MAGIC, 3, struct nvhost_ctrl_syncpt_wait_args) | ||
| 459 | |||
| 460 | #define NVHOST_IOCTL_CTRL_MODULE_MUTEX \ | ||
| 461 | _IOWR(NVHOST_IOCTL_MAGIC, 4, struct nvhost_ctrl_module_mutex_args) | ||
| 462 | #define NVHOST32_IOCTL_CTRL_MODULE_REGRDWR \ | ||
| 463 | _IOWR(NVHOST_IOCTL_MAGIC, 5, struct nvhost32_ctrl_module_regrdwr_args) | ||
| 464 | |||
| 465 | #define NVHOST_IOCTL_CTRL_SYNCPT_WAITEX \ | ||
| 466 | _IOWR(NVHOST_IOCTL_MAGIC, 6, struct nvhost_ctrl_syncpt_waitex_args) | ||
| 467 | |||
| 468 | #define NVHOST_IOCTL_CTRL_GET_VERSION \ | ||
| 469 | _IOR(NVHOST_IOCTL_MAGIC, 7, struct nvhost_get_param_args) | ||
| 470 | |||
| 471 | #define NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX \ | ||
| 472 | _IOWR(NVHOST_IOCTL_MAGIC, 8, struct nvhost_ctrl_syncpt_read_args) | ||
| 473 | |||
| 474 | #define NVHOST_IOCTL_CTRL_SYNCPT_WAITMEX \ | ||
| 475 | _IOWR(NVHOST_IOCTL_MAGIC, 9, struct nvhost_ctrl_syncpt_waitmex_args) | ||
| 476 | |||
| 477 | #define NVHOST32_IOCTL_CTRL_SYNC_FENCE_CREATE \ | ||
| 478 | _IOWR(NVHOST_IOCTL_MAGIC, 10, struct nvhost32_ctrl_sync_fence_create_args) | ||
| 479 | #define NVHOST_IOCTL_CTRL_SYNC_FENCE_CREATE \ | ||
| 480 | _IOWR(NVHOST_IOCTL_MAGIC, 11, struct nvhost_ctrl_sync_fence_create_args) | ||
| 481 | #define NVHOST_IOCTL_CTRL_MODULE_REGRDWR \ | ||
| 482 | _IOWR(NVHOST_IOCTL_MAGIC, 12, struct nvhost_ctrl_module_regrdwr_args) | ||
| 483 | #define NVHOST_IOCTL_CTRL_SYNC_FENCE_SET_NAME \ | ||
| 484 | _IOWR(NVHOST_IOCTL_MAGIC, 13, struct nvhost_ctrl_sync_fence_name_args) | ||
| 485 | #define NVHOST_IOCTL_CTRL_GET_CHARACTERISTICS \ | ||
| 486 | _IOWR(NVHOST_IOCTL_MAGIC, 14, struct nvhost_ctrl_get_characteristics) | ||
| 487 | #define NVHOST_IOCTL_CTRL_CHECK_MODULE_SUPPORT \ | ||
| 488 | _IOWR(NVHOST_IOCTL_MAGIC, 15, struct nvhost_ctrl_check_module_support_args) | ||
| 489 | #define NVHOST_IOCTL_CTRL_POLL_FD_CREATE \ | ||
| 490 | _IOR(NVHOST_IOCTL_MAGIC, 16, struct nvhost_ctrl_poll_fd_create_args) | ||
| 491 | #define NVHOST_IOCTL_CTRL_POLL_FD_TRIGGER_EVENT \ | ||
| 492 | _IOW(NVHOST_IOCTL_MAGIC, 17, struct nvhost_ctrl_poll_fd_trigger_event_args) | ||
| 493 | |||
| 494 | #define NVHOST_IOCTL_CTRL_LAST \ | ||
| 495 | _IOC_NR(NVHOST_IOCTL_CTRL_POLL_FD_TRIGGER_EVENT) | ||
| 496 | #define NVHOST_IOCTL_CTRL_MAX_ARG_SIZE \ | ||
| 497 | sizeof(struct nvhost_ctrl_syncpt_waitmex_args) | ||
| 498 | |||
| 499 | #endif | ||
diff --git a/include/linux/nvhost_isp_ioctl.h b/include/linux/nvhost_isp_ioctl.h deleted file mode 100644 index 09652b489..000000000 --- a/include/linux/nvhost_isp_ioctl.h +++ /dev/null | |||
| @@ -1,65 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nvhost_isp_ioctl.h | ||
| 3 | * | ||
| 4 | * Tegra ISP Driver | ||
| 5 | * | ||
| 6 | * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms and conditions of the GNU General Public License, | ||
| 10 | * version 2, as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along with | ||
| 18 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef __LINUX_NVHOST_ISP_IOCTL_H | ||
| 23 | #define __LINUX_NVHOST_ISP_IOCTL_H | ||
| 24 | |||
| 25 | #include <linux/ioctl.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 28 | #define ISP_SOFT_ISO_CLIENT 0 | ||
| 29 | #define ISP_HARD_ISO_CLIENT 1 | ||
| 30 | |||
| 31 | #if !defined(__KERNEL__) | ||
| 32 | #define __user | ||
| 33 | #endif | ||
| 34 | |||
| 35 | struct isp_emc { | ||
| 36 | uint isp_bw; | ||
| 37 | uint isp_clk; | ||
| 38 | uint bpp_input; | ||
| 39 | uint bpp_output; | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct isp_la_bw { | ||
| 43 | /* Total ISP write BW in MBps, either ISO peak BW or non-ISO avg BW */ | ||
| 44 | u32 isp_la_bw; | ||
| 45 | /* is ISO or non-ISO */ | ||
| 46 | bool is_iso; | ||
| 47 | }; | ||
| 48 | |||
| 49 | #define NVHOST_ISP_IOCTL_MAGIC 'I' | ||
| 50 | |||
| 51 | /* | ||
| 52 | * /dev/nvhost-ctrl-isp devices | ||
| 53 | * | ||
| 54 | * Opening a '/dev/nvhost-ctrl-isp' device node creates a way to send | ||
| 55 | * ctrl ioctl to isp driver. | ||
| 56 | * | ||
| 57 | * /dev/nvhost-isp is for channel (context specific) operations. We use | ||
| 58 | * /dev/nvhost-ctrl-isp for global (context independent) operations on | ||
| 59 | * isp device. | ||
| 60 | */ | ||
| 61 | |||
| 62 | #define NVHOST_ISP_IOCTL_SET_ISP_LA_BW \ | ||
| 63 | _IOW(NVHOST_ISP_IOCTL_MAGIC, 4, struct isp_la_bw) | ||
| 64 | #endif | ||
| 65 | |||
diff --git a/include/linux/nvhost_nvcsi_ioctl.h b/include/linux/nvhost_nvcsi_ioctl.h deleted file mode 100644 index b621a453d..000000000 --- a/include/linux/nvhost_nvcsi_ioctl.h +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nvhost_nvcsi_ioctl.h | ||
| 3 | * | ||
| 4 | * Tegra NVCSI Driver | ||
| 5 | * | ||
| 6 | * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms and conditions of the GNU General Public License, | ||
| 10 | * version 2, as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along with | ||
| 18 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef __LINUX_NVHOST_NVCSI_IOCTL_H | ||
| 23 | #define __LINUX_NVHOST_NVCSI_IOCTL_H | ||
| 24 | |||
| 25 | #include <linux/ioctl.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 28 | #if !defined(__KERNEL__) | ||
| 29 | #define __user | ||
| 30 | #endif | ||
| 31 | |||
| 32 | /* Bitmap | ||
| 33 | * | ||
| 34 | * | PHY_2 | PHY_1 | PHY_0 | | ||
| 35 | * | 11 10 | 9 8 | 7 6 | 5 4 | 3 2 | 1 0 | | ||
| 36 | * | CILB | CILA | CILB | CILA | CILB | CILA | | ||
| 37 | */ | ||
| 38 | #define PHY_0_CIL_A_IO0 0 | ||
| 39 | #define PHY_0_CIL_A_IO1 1 | ||
| 40 | #define PHY_0_CIL_B_IO0 2 | ||
| 41 | #define PHY_0_CIL_B_IO1 3 | ||
| 42 | |||
| 43 | #define PHY_1_CIL_A_IO0 4 | ||
| 44 | #define PHY_1_CIL_A_IO1 5 | ||
| 45 | #define PHY_1_CIL_B_IO0 6 | ||
| 46 | #define PHY_1_CIL_B_IO1 7 | ||
| 47 | |||
| 48 | #define PHY_2_CIL_A_IO0 8 | ||
| 49 | #define PHY_2_CIL_A_IO1 9 | ||
| 50 | #define PHY_2_CIL_B_IO0 10 | ||
| 51 | #define PHY_2_CIL_B_IO1 11 | ||
| 52 | |||
| 53 | #define PHY_3_CIL_A_IO0 12 | ||
| 54 | #define PHY_3_CIL_A_IO1 13 | ||
| 55 | #define PHY_3_CIL_B_IO0 14 | ||
| 56 | #define PHY_3_CIL_B_IO1 15 | ||
| 57 | #define NVCSI_PHY_CIL_NUM_LANE 16 | ||
| 58 | |||
| 59 | #define PHY_DPHY_MODE 0 | ||
| 60 | #define PHY_CPHY_MODE 1 | ||
| 61 | |||
| 62 | #define NVCSI_PHY_0_NVCSI_CIL_A_IO0 (0x1 << PHY_0_CIL_A_IO0) | ||
| 63 | #define NVCSI_PHY_0_NVCSI_CIL_A_IO1 (0x1 << PHY_0_CIL_A_IO1) | ||
| 64 | #define NVCSI_PHY_0_NVCSI_CIL_B_IO0 (0x1 << PHY_0_CIL_B_IO0) | ||
| 65 | #define NVCSI_PHY_0_NVCSI_CIL_B_IO1 (0x1 << PHY_0_CIL_B_IO1) | ||
| 66 | |||
| 67 | #define NVCSI_PHY_1_NVCSI_CIL_A_IO0 (0x1 << PHY_1_CIL_A_IO0) | ||
| 68 | #define NVCSI_PHY_1_NVCSI_CIL_A_IO1 (0x1 << PHY_1_CIL_A_IO1) | ||
| 69 | #define NVCSI_PHY_1_NVCSI_CIL_B_IO0 (0x1 << PHY_1_CIL_B_IO0) | ||
| 70 | #define NVCSI_PHY_1_NVCSI_CIL_B_IO1 (0x1 << PHY_1_CIL_B_IO1) | ||
| 71 | |||
| 72 | #define NVCSI_PHY_2_NVCSI_CIL_A_IO0 (0x1 << PHY_2_CIL_A_IO0) | ||
| 73 | #define NVCSI_PHY_2_NVCSI_CIL_A_IO1 (0x1 << PHY_2_CIL_A_IO1) | ||
| 74 | #define NVCSI_PHY_2_NVCSI_CIL_B_IO0 (0x1 << PHY_2_CIL_B_IO0) | ||
| 75 | #define NVCSI_PHY_2_NVCSI_CIL_B_IO1 (0x1 << PHY_2_CIL_B_IO1) | ||
| 76 | |||
| 77 | #define NVCSI_PHY_3_NVCSI_CIL_A_IO0 (0x1 << PHY_3_CIL_A_IO0) | ||
| 78 | #define NVCSI_PHY_3_NVCSI_CIL_A_IO1 (0x1 << PHY_3_CIL_A_IO1) | ||
| 79 | #define NVCSI_PHY_3_NVCSI_CIL_B_IO0 (0x1 << PHY_3_CIL_B_IO0) | ||
| 80 | #define NVCSI_PHY_3_NVCSI_CIL_B_IO1 (0x1 << PHY_3_CIL_B_IO1) | ||
| 81 | |||
| 82 | #define NVCSI_PHY_NUM_BRICKS 4 | ||
| 83 | #define NVHOST_NVCSI_IOCTL_MAGIC 'N' | ||
| 84 | |||
| 85 | #define NVHOST_NVCSI_IOCTL_DESKEW_SETUP _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 1, long) | ||
| 86 | #define NVHOST_NVCSI_IOCTL_DESKEW_APPLY _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 2, long) | ||
| 87 | #define NVHOST_NVCSI_IOCTL_PROD_APPLY _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 3, long) | ||
| 88 | |||
| 89 | #endif | ||
diff --git a/include/linux/nvhost_nvdec_ioctl.h b/include/linux/nvhost_nvdec_ioctl.h deleted file mode 100644 index d59e18d5e..000000000 --- a/include/linux/nvhost_nvdec_ioctl.h +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nvhost_ioctl_ioctl.h | ||
| 3 | * | ||
| 4 | * Tegra IOCTL Driver | ||
| 5 | * | ||
| 6 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms and conditions of the GNU General Public License, | ||
| 10 | * version 2, as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along with | ||
| 18 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef __LINUX_NVHOST_IOCTL_IOCTL_H | ||
| 23 | #define __LINUX_NVHOST_IOCTL_IOCTL_H | ||
| 24 | |||
| 25 | #include <linux/ioctl.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 28 | #if !defined(__KERNEL__) | ||
| 29 | #define __user | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #define NVHOST_NVDEC_IOCTL_MAGIC 'N' | ||
| 33 | |||
| 34 | /* | ||
| 35 | * /dev/nvhost-ctrl-nvdec devices | ||
| 36 | * | ||
| 37 | * Opening a '/dev/nvhost-ctrl-nvdec' device node creates a way to send | ||
| 38 | * ctrl ioctl to nvdec driver. | ||
| 39 | * | ||
| 40 | * /dev/nvhost-nvdec is for channel (context specific) operations. We use | ||
| 41 | * /dev/nvhost-ctrl-nvdec for global (context independent) operations on | ||
| 42 | * nvdec device. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define NVHOST_NVDEC_IOCTL_POWERON _IOW(NVHOST_NVDEC_IOCTL_MAGIC, 1, uint) | ||
| 46 | #define NVHOST_NVDEC_IOCTL_POWEROFF _IOW(NVHOST_NVDEC_IOCTL_MAGIC, 2, uint) | ||
| 47 | |||
| 48 | #endif | ||
diff --git a/include/linux/nvhost_nvdla_ioctl.h b/include/linux/nvhost_nvdla_ioctl.h deleted file mode 100644 index 10c1fcfa5..000000000 --- a/include/linux/nvhost_nvdla_ioctl.h +++ /dev/null | |||
| @@ -1,233 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nvhost_nvdla_ioctl.h | ||
| 3 | * | ||
| 4 | * Tegra NvDLA Driver | ||
| 5 | * | ||
| 6 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms and conditions of the GNU General Public License, | ||
| 10 | * version 2, as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along with | ||
| 18 | * this program; if not, see <http://www.gnu.org/licenses/>. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __LINUX_NVHOST_NVDLA_IOCTL_H | ||
| 22 | #define __LINUX_NVHOST_NVDLA_IOCTL_H | ||
| 23 | |||
| 24 | #include <linux/ioctl.h> | ||
| 25 | #include <linux/types.h> | ||
| 26 | |||
| 27 | #if !defined(__KERNEL__) | ||
| 28 | #define __user | ||
| 29 | #endif | ||
| 30 | |||
| 31 | /** | ||
| 32 | * struct nvdla_queue_stat_args strcture | ||
| 33 | * | ||
| 34 | * @status queue status flags | ||
| 35 | * | ||
| 36 | */ | ||
| 37 | struct nvdla_queue_status_args { | ||
| 38 | #define NVDLA_QUEUE_FLAGS_SUSPEND (1 << 0) | ||
| 39 | #define NVDLA_QUEUE_FLAGS_RESUME (1 << 1) | ||
| 40 | __u64 status; | ||
| 41 | }; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * struct nvdla_ping_args structure for ping data | ||
| 45 | * | ||
| 46 | * @in_challenge challenge data to be sent | ||
| 47 | * @out_response response/CRC on challenge data from engine | ||
| 48 | * | ||
| 49 | */ | ||
| 50 | struct nvdla_ping_args { | ||
| 51 | __u32 in_challenge; | ||
| 52 | __u32 out_response; | ||
| 53 | }; | ||
| 54 | |||
| 55 | |||
| 56 | /** | ||
| 57 | * struct nvdla_pin_unpin_args strcture args for buffer pin/unpin | ||
| 58 | * | ||
| 59 | * @buffers list of buffers to pin/unpin'ed | ||
| 60 | * @num_buffers number of buffers count | ||
| 61 | * @reserved reserved for future use | ||
| 62 | * | ||
| 63 | */ | ||
| 64 | struct nvdla_pin_unpin_args { | ||
| 65 | __u64 buffers; | ||
| 66 | __u32 num_buffers; | ||
| 67 | __u32 reserved; | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * struct nvdla_submit_args structure for task submit | ||
| 72 | * | ||
| 73 | * @tasks pointer to task list | ||
| 74 | * @num_tasks number of tasks count | ||
| 75 | * @flags flags for task submit, like atomic | ||
| 76 | * @version version of task structure | ||
| 77 | * | ||
| 78 | */ | ||
| 79 | struct nvdla_submit_args { | ||
| 80 | __u64 tasks; | ||
| 81 | __u16 num_tasks; | ||
| 82 | #define MAX_TASKS_PER_SUBMIT 24 | ||
| 83 | #define NVDLA_SUBMIT_FLAGS_ATOMIC (1 << 0) | ||
| 84 | __u16 flags; | ||
| 85 | __u32 version; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /** | ||
| 89 | * struct nvdla_get_fw_ver_args strcture | ||
| 90 | * | ||
| 91 | * @version Firmware version | ||
| 92 | * | ||
| 93 | */ | ||
| 94 | struct nvdla_get_fw_ver_args { | ||
| 95 | __u32 version; | ||
| 96 | }; | ||
| 97 | |||
| 98 | /** | ||
| 99 | * struct nvdla_get_q_status_args strcture | ||
| 100 | * | ||
| 101 | * @id queue id | ||
| 102 | * @fence fence assigned to queue | ||
| 103 | * | ||
| 104 | */ | ||
| 105 | struct nvdla_get_q_status_args { | ||
| 106 | __u32 id; | ||
| 107 | __u64 fence; | ||
| 108 | }; | ||
| 109 | |||
| 110 | /** | ||
| 111 | * struct nvdla_mem_handle structure for memory handles | ||
| 112 | * | ||
| 113 | * @handle handle to buffer allocated in userspace | ||
| 114 | * @offset offset in buffer | ||
| 115 | * | ||
| 116 | */ | ||
| 117 | struct nvdla_mem_handle { | ||
| 118 | __u32 handle; | ||
| 119 | __u32 offset; | ||
| 120 | }; | ||
| 121 | |||
| 122 | /** | ||
| 123 | * struct nvdla_ioctl_submit_task structure for single task information | ||
| 124 | * | ||
| 125 | * @num_prefences number of pre-fences in task | ||
| 126 | * @num_postfences number of post-fences in task | ||
| 127 | * @num_input_task_status number of input task status | ||
| 128 | * @num_output_task_status number of output task status | ||
| 129 | * @flags flags for bitwise task info embeddeing | ||
| 130 | * @reserved reserved for future use | ||
| 131 | * @prefences pointer to pre-fence struct table | ||
| 132 | * @postfences pointer to post-fence struct table | ||
| 133 | * @input_task_status pointer to input task status struct table | ||
| 134 | * @output_task_status pointer to output task status struct table | ||
| 135 | * @num_addresses total number of addressed passed in structure | ||
| 136 | * @address_list pointer to address list | ||
| 137 | * @timeout task timeout | ||
| 138 | * | ||
| 139 | */ | ||
| 140 | struct nvdla_ioctl_submit_task { | ||
| 141 | __u8 num_prefences; | ||
| 142 | __u8 num_postfences; | ||
| 143 | __u8 num_input_task_status; | ||
| 144 | __u8 num_output_task_status; | ||
| 145 | #define NVDLA_MAX_BUFFERS_PER_TASK (6144) | ||
| 146 | __u32 num_addresses; | ||
| 147 | __u16 flags; | ||
| 148 | __u16 reserved; | ||
| 149 | |||
| 150 | __u64 prefences; | ||
| 151 | __u64 postfences; | ||
| 152 | |||
| 153 | __u64 input_task_status; | ||
| 154 | __u64 output_task_status; | ||
| 155 | __u64 address_list; | ||
| 156 | __u64 timeout; | ||
| 157 | }; | ||
| 158 | |||
| 159 | /** | ||
| 160 | * struct nvdla_ioctl_emu_submit_task structure for single emulator task | ||
| 161 | * information | ||
| 162 | * | ||
| 163 | * @num_postfences number of post-fences in task | ||
| 164 | * @reserved reserved for padding and future use | ||
| 165 | * @postfences pointer to post-fence struct table | ||
| 166 | * | ||
| 167 | */ | ||
| 168 | struct nvdla_ioctl_emu_submit_task { | ||
| 169 | __u32 num_postfences; | ||
| 170 | __u32 reserved; | ||
| 171 | |||
| 172 | __u64 postfences; | ||
| 173 | }; | ||
| 174 | |||
| 175 | /** | ||
| 176 | * struct nvdla_fence structure for passing fence information | ||
| 177 | * | ||
| 178 | * NOTE: this will be removed soon, please use generic fence type | ||
| 179 | * from nvdev_fence.h | ||
| 180 | */ | ||
| 181 | struct nvdla_fence { | ||
| 182 | __u32 type; | ||
| 183 | #define NVDLA_FENCE_TYPE_SYNCPT 0 | ||
| 184 | #define NVDLA_FENCE_TYPE_SYNC_FD 1 | ||
| 185 | #define NVDLA_FENCE_TYPE_SEMAPHORE 2 | ||
| 186 | #define NVDLA_FENCE_TYPE_TS_SEMAPHORE 3 | ||
| 187 | __u32 syncpoint_index; | ||
| 188 | __u32 syncpoint_value; | ||
| 189 | __u32 sync_fd; | ||
| 190 | __u32 sem_handle; | ||
| 191 | __u32 sem_offset; | ||
| 192 | __u32 sem_val; | ||
| 193 | }; | ||
| 194 | |||
| 195 | /** | ||
| 196 | * struct nvdla_status_notify structure for passing status notify information | ||
| 197 | * | ||
| 198 | * @handle handle to buffer allocated in userspace | ||
| 199 | * @offset offset in buffer | ||
| 200 | * @status status | ||
| 201 | * | ||
| 202 | */ | ||
| 203 | struct nvdla_status_notify { | ||
| 204 | __u32 handle; | ||
| 205 | __u32 offset; | ||
| 206 | __u32 status; | ||
| 207 | }; | ||
| 208 | |||
| 209 | #define NVHOST_NVDLA_IOCTL_MAGIC 'D' | ||
| 210 | |||
| 211 | #define NVDLA_IOCTL_PING \ | ||
| 212 | _IOWR(NVHOST_NVDLA_IOCTL_MAGIC, 1, struct nvdla_ping_args) | ||
| 213 | #define NVDLA_IOCTL_PIN \ | ||
| 214 | _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 2, struct nvdla_pin_unpin_args) | ||
| 215 | #define NVDLA_IOCTL_UNPIN \ | ||
| 216 | _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 3, struct nvdla_pin_unpin_args) | ||
| 217 | #define NVDLA_IOCTL_SUBMIT \ | ||
| 218 | _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 4, struct nvdla_submit_args) | ||
| 219 | #define NVDLA_IOCTL_SET_QUEUE_STATUS \ | ||
| 220 | _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 5, struct nvdla_queue_status_args) | ||
| 221 | #define NVDLA_IOCTL_GET_FIRMWARE_VERSION \ | ||
| 222 | _IOWR(NVHOST_NVDLA_IOCTL_MAGIC, 6, struct nvdla_get_fw_ver_args) | ||
| 223 | #define NVDLA_IOCTL_GET_QUEUE_STATUS \ | ||
| 224 | _IOWR(NVHOST_NVDLA_IOCTL_MAGIC, 7, struct nvdla_get_q_status_args) | ||
| 225 | #define NVDLA_IOCTL_EMU_TASK_SUBMIT \ | ||
| 226 | _IOWR(NVHOST_NVDLA_IOCTL_MAGIC, 8, struct nvdla_submit_args) | ||
| 227 | #define NVDLA_IOCTL_LAST \ | ||
| 228 | _IOC_NR(NVDLA_IOCTL_EMU_TASK_SUBMIT) | ||
| 229 | |||
| 230 | #define NVDLA_IOCTL_MAX_ARG_SIZE \ | ||
| 231 | sizeof(struct nvdla_pin_unpin_args) | ||
| 232 | |||
| 233 | #endif /* __LINUX_NVHOST_NVDLA_IOCTL_H */ | ||
diff --git a/include/linux/nvhost_vi_ioctl.h b/include/linux/nvhost_vi_ioctl.h deleted file mode 100644 index 277856e84..000000000 --- a/include/linux/nvhost_vi_ioctl.h +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/nvhost_vi_ioctl.h | ||
| 3 | * | ||
| 4 | * Tegra VI Driver | ||
| 5 | * | ||
| 6 | * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms and conditions of the GNU General Public License, | ||
| 10 | * version 2, as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along with | ||
| 18 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef __LINUX_NVHOST_VI_IOCTL_H | ||
| 23 | #define __LINUX_NVHOST_VI_IOCTL_H | ||
| 24 | |||
| 25 | #include <linux/ioctl.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 28 | #if !defined(__KERNEL__) | ||
| 29 | #define __user | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #define NVHOST_VI_IOCTL_MAGIC 'V' | ||
| 33 | |||
| 34 | /* | ||
| 35 | * /dev/nvhost-ctrl-vi devices | ||
| 36 | * | ||
| 37 | * Opening a '/dev/nvhost-ctrl-vi' device node creates a way to send | ||
| 38 | * ctrl ioctl to vi driver. | ||
| 39 | * | ||
| 40 | * /dev/nvhost-vi is for channel (context specific) operations. We use | ||
| 41 | * /dev/nvhost-ctrl-vi for global (context independent) operations on | ||
| 42 | * vi device. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define NVHOST_VI_IOCTL_ENABLE_TPG _IOW(NVHOST_VI_IOCTL_MAGIC, 1, uint) | ||
| 46 | |||
| 47 | #endif | ||
