hwc: Add properties to control hdcp and color range
[GitHub/LineageOS/android_hardware_samsung_slsi_exynos5.git] / include / exynos_rotator.h
1 /*
2 *
3 * Copyright 2012 Samsung Electronics S.LSI Co. LTD
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*!
19 * \file exynos_rotator.h
20 * \brief header file for exynos_rotator HAL
21 * \author Sunmi Lee (carrotsm.lee@samsung.com)
22 * \date 2012/03/05
23 *
24 * <b>Revision History: </b>
25 * - 2012/03/05 : Sunmi Lee (carrotsm.lee@samsung.com) \n
26 * Create
27 *
28 */
29
30 /*!
31 * \defgroup exynos_rotator
32 * \brief API for rotator
33 * \addtogroup Exynos
34 */
35
36 #ifndef _EXYNOS_ROTATOR_H_
37 #define _EXYNOS_ROTATOR_H_
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 /*!
44 * Create librotator handle
45 *
46 * \ingroup exynos_rotator
47 *
48 * \return
49 * librotator handle
50 */
51 void *exynos_rotator_create(void);
52
53 /*!
54 * Destroy librotator handle
55 *
56 * \ingroup exynos_rotator
57 *
58 * \param handle
59 * librotator handle[in]
60 */
61 void exynos_rotator_destroy(
62 void *handle);
63
64 /*!
65 * Set source format.
66 *
67 * \ingroup exynos_rotator
68 *
69 * \param handle
70 * librotator handle[in]
71 *
72 * \param width
73 * image width[in]
74 *
75 * \param height
76 * image height[in]
77 *
78 * \param crop_left
79 * image left crop size[in]
80 *
81 * \param crop_top
82 * image top crop size[in]
83 *
84 * \param crop_width
85 * cropped image width[in]
86 *
87 * \param crop_height
88 * cropped image height[in]
89 *
90 * \param v4l2_colorformat
91 * color format[in]
92 *
93 * \param cacheable
94 * ccacheable[in]
95 *
96 * \return
97 * error code
98 */
99 int exynos_rotator_set_src_format(
100 void *handle,
101 unsigned int width,
102 unsigned int height,
103 unsigned int crop_left,
104 unsigned int crop_top,
105 unsigned int crop_width,
106 unsigned int crop_height,
107 unsigned int v4l2_colorformat,
108 unsigned int cacheable);
109
110 /*!
111 * Set destination format.
112 *
113 * \ingroup exynos_rotator
114 *
115 * \param handle
116 * librotator handle[in]
117 *
118 * \param width
119 * image width[in]
120 *
121 * \param height
122 * image height[in]
123 *
124 * \param crop_left
125 * image left crop size[in]
126 *
127 * \param crop_top
128 * image top crop size[in]
129 *
130 * \param v4l2_colorformat
131 * color format[in]
132 *
133 * \param cacheable
134 * ccacheable[in]
135 *
136 * \return
137 * error code
138 */
139 int exynos_rotator_set_dst_format(
140 void *handle,
141 unsigned int width,
142 unsigned int height,
143 unsigned int crop_left,
144 unsigned int crop_top,
145 unsigned int v4l2_colorformat,
146 unsigned int cacheable);
147
148 /*!
149 * Set rotation.
150 *
151 * \ingroup exynos_rotator
152 *
153 * \param handle
154 * librotator handle[in]
155 *
156 * \param rotation
157 * image rotation. It should be multiple of 90[in]
158 *
159 * \return
160 * error code
161 */
162 int exynos_rotator_set_rotation(
163 void *handle,
164 int rotation);
165
166 /*!
167 * Set source buffer
168 *
169 * \ingroup exynos_rotator
170 *
171 * \param handle
172 * librotator handle[in]
173 *
174 * \param addr
175 * buffer pointer array[in]
176 *
177 * \return
178 * error code
179 */
180 int exynos_rotator_set_src_addr(
181 void *handle,
182 void *addr[3]);
183
184 /*!
185 * Set destination buffer
186 *
187 * \ingroup exynos_rotator
188 *
189 * \param handle
190 * librotator handle[in]
191 *
192 * \param addr
193 * buffer pointer array[in]
194 *
195 * \return
196 * error code
197 */
198 int exynos_rotator_set_dst_addr(
199 void *handle,
200 void *addr[3]);
201
202 /*!
203 * Convert color space with presetup color format
204 *
205 * \ingroup exynos_rotator
206 *
207 * \param handle
208 * librotator handle[in]
209 *
210 * \return
211 * error code
212 */
213 int exynos_rotator_convert(
214 void *handle);
215
216 /*!
217 * api for local path rotator. Not yet support.
218 *
219 * \ingroup exynos_rotator
220 */
221 int exynos_rotator_connect(
222 void *handle,
223 void *hw);
224
225 /*!
226 * api for local path rotator. Not yet support.
227 *
228 * \ingroup exynos_rotator
229 */
230 int exynos_rotator_disconnect(
231 void *handle,
232 void *hw);
233
234 #ifdef __cplusplus
235 }
236 #endif
237
238 #endif /*EXYNOS_ROTATORALER_H_*/