diff options
Diffstat (limited to 'include/linux/tegra_mediaserver.h')
-rw-r--r-- | include/linux/tegra_mediaserver.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/include/linux/tegra_mediaserver.h b/include/linux/tegra_mediaserver.h new file mode 100644 index 00000000000..f28473baf63 --- /dev/null +++ b/include/linux/tegra_mediaserver.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /* include/linux/tegra_mediaserver.h | ||
2 | * | ||
3 | * Media Server driver for NVIDIA Tegra SoCs | ||
4 | * | ||
5 | * Copyright (c) 2011, NVIDIA Corporation. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that 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 | ||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | |||
23 | #ifndef _TEGRA_MEDIASERVER_H | ||
24 | #define _TEGRA_MEDIASERVER_H | ||
25 | |||
26 | #include <linux/ioctl.h> | ||
27 | |||
28 | #define TEGRA_MEDIASERVER_MAGIC 'm' | ||
29 | #define TEGRA_MEDIASERVER_IOCTL_ALLOC \ | ||
30 | _IOWR(TEGRA_MEDIASERVER_MAGIC, 0x40, \ | ||
31 | union tegra_mediaserver_alloc_info) | ||
32 | |||
33 | enum tegra_mediaserver_resource_type { | ||
34 | TEGRA_MEDIASERVER_RESOURCE_BLOCK = 0, | ||
35 | TEGRA_MEDIASERVER_RESOURCE_IRAM, | ||
36 | }; | ||
37 | |||
38 | enum tegra_mediaserver_block_type { | ||
39 | TEGRA_MEDIASERVER_BLOCK_AUDDEC = 0, | ||
40 | TEGRA_MEDIASERVER_BLOCK_VIDDEC, | ||
41 | }; | ||
42 | |||
43 | enum tegra_mediaserver_iram_type { | ||
44 | TEGRA_MEDIASERVER_IRAM_SCRATCH = 0, | ||
45 | TEGRA_MEDIASERVER_IRAM_SHARED, | ||
46 | }; | ||
47 | |||
48 | |||
49 | struct tegra_mediaserver_block_info { | ||
50 | int nvmm_block_handle; | ||
51 | int avp_block_handle; | ||
52 | int avp_block_library_handle; | ||
53 | int service_handle; | ||
54 | int service_library_handle; | ||
55 | }; | ||
56 | |||
57 | struct tegra_mediaserver_iram_info { | ||
58 | unsigned long rm_handle; | ||
59 | int physical_address; | ||
60 | }; | ||
61 | |||
62 | union tegra_mediaserver_alloc_info { | ||
63 | struct { | ||
64 | int tegra_mediaserver_resource_type; | ||
65 | |||
66 | union { | ||
67 | struct tegra_mediaserver_block_info block; | ||
68 | |||
69 | struct { | ||
70 | int tegra_mediaserver_iram_type; | ||
71 | int alignment; | ||
72 | size_t size; | ||
73 | } iram; | ||
74 | } u; | ||
75 | } in; | ||
76 | |||
77 | struct { | ||
78 | union { | ||
79 | struct { | ||
80 | int count; | ||
81 | } block; | ||
82 | |||
83 | struct tegra_mediaserver_iram_info iram; | ||
84 | } u; | ||
85 | } out; | ||
86 | }; | ||
87 | |||
88 | |||
89 | #define TEGRA_MEDIASERVER_IOCTL_FREE \ | ||
90 | _IOR(TEGRA_MEDIASERVER_MAGIC, 0x41, union tegra_mediaserver_free_info) | ||
91 | |||
92 | union tegra_mediaserver_free_info { | ||
93 | struct { | ||
94 | int tegra_mediaserver_resource_type; | ||
95 | |||
96 | union { | ||
97 | int nvmm_block_handle; | ||
98 | int iram_rm_handle; | ||
99 | } u; | ||
100 | } in; | ||
101 | }; | ||
102 | |||
103 | |||
104 | #define TEGRA_MEDIASERVER_IOCTL_UPDATE_BLOCK_INFO \ | ||
105 | _IOR(TEGRA_MEDIASERVER_MAGIC, 0x45, \ | ||
106 | union tegra_mediaserver_update_block_info) | ||
107 | |||
108 | union tegra_mediaserver_update_block_info { | ||
109 | struct tegra_mediaserver_block_info in; | ||
110 | }; | ||
111 | #endif | ||
112 | |||