diff options
Diffstat (limited to 'include/linux/tegra_nvavp.h')
-rw-r--r-- | include/linux/tegra_nvavp.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/include/linux/tegra_nvavp.h b/include/linux/tegra_nvavp.h new file mode 100644 index 00000000000..32dc4c62b4b --- /dev/null +++ b/include/linux/tegra_nvavp.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * include/linux/tegra_nvavp.h | ||
3 | * | ||
4 | * Copyright (C) 2011 NVIDIA Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __LINUX_TEGRA_NVAVP_H | ||
12 | #define __LINUX_TEGRA_NVAVP_H | ||
13 | |||
14 | #include <linux/ioctl.h> | ||
15 | #include <linux/types.h> | ||
16 | |||
17 | #define NVAVP_MAX_RELOCATION_COUNT 64 | ||
18 | |||
19 | /* avp submit flags */ | ||
20 | #define NVAVP_FLAG_NONE 0x00000000 | ||
21 | #define NVAVP_UCODE_EXT 0x00000001 /*use external ucode provided */ | ||
22 | |||
23 | enum { | ||
24 | NVAVP_MODULE_ID_AVP = 2, | ||
25 | NVAVP_MODULE_ID_VCP = 3, | ||
26 | NVAVP_MODULE_ID_BSEA = 27, | ||
27 | NVAVP_MODULE_ID_VDE = 28, | ||
28 | NVAVP_MODULE_ID_MPE = 29, | ||
29 | NVAVP_MODULE_ID_EMC = 75, | ||
30 | }; | ||
31 | |||
32 | struct nvavp_cmdbuf { | ||
33 | __u32 mem; | ||
34 | __u32 offset; | ||
35 | __u32 words; | ||
36 | }; | ||
37 | |||
38 | struct nvavp_reloc { | ||
39 | __u32 cmdbuf_mem; | ||
40 | __u32 cmdbuf_offset; | ||
41 | __u32 target; | ||
42 | __u32 target_offset; | ||
43 | }; | ||
44 | |||
45 | struct nvavp_syncpt { | ||
46 | __u32 id; | ||
47 | __u32 value; | ||
48 | }; | ||
49 | |||
50 | struct nvavp_pushbuffer_submit_hdr { | ||
51 | struct nvavp_cmdbuf cmdbuf; | ||
52 | struct nvavp_reloc *relocs; | ||
53 | __u32 num_relocs; | ||
54 | struct nvavp_syncpt *syncpt; | ||
55 | __u32 flags; | ||
56 | }; | ||
57 | |||
58 | struct nvavp_set_nvmap_fd_args { | ||
59 | __u32 fd; | ||
60 | }; | ||
61 | |||
62 | struct nvavp_clock_args { | ||
63 | __u32 id; | ||
64 | __u32 rate; | ||
65 | }; | ||
66 | |||
67 | #define NVAVP_IOCTL_MAGIC 'n' | ||
68 | |||
69 | #define NVAVP_IOCTL_SET_NVMAP_FD _IOW(NVAVP_IOCTL_MAGIC, 0x60, \ | ||
70 | struct nvavp_set_nvmap_fd_args) | ||
71 | #define NVAVP_IOCTL_GET_SYNCPOINT_ID _IOR(NVAVP_IOCTL_MAGIC, 0x61, \ | ||
72 | __u32) | ||
73 | #define NVAVP_IOCTL_PUSH_BUFFER_SUBMIT _IOWR(NVAVP_IOCTL_MAGIC, 0x63, \ | ||
74 | struct nvavp_pushbuffer_submit_hdr) | ||
75 | #define NVAVP_IOCTL_SET_CLOCK _IOWR(NVAVP_IOCTL_MAGIC, 0x64, \ | ||
76 | struct nvavp_clock_args) | ||
77 | #define NVAVP_IOCTL_GET_CLOCK _IOR(NVAVP_IOCTL_MAGIC, 0x65, \ | ||
78 | struct nvavp_clock_args) | ||
79 | |||
80 | |||
81 | #define NVAVP_IOCTL_MIN_NR _IOC_NR(NVAVP_IOCTL_SET_NVMAP_FD) | ||
82 | #define NVAVP_IOCTL_MAX_NR _IOC_NR(NVAVP_IOCTL_GET_CLOCK) | ||
83 | |||
84 | #endif /* __LINUX_TEGRA_NVAVP_H */ | ||