diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2014-08-11 07:04:50 -0400 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2014-09-02 08:55:43 -0400 |
commit | 1aa8ea0d2bd5d4ba7b5d2b132a02157bc1fb9793 (patch) | |
tree | 60ae9f3c40e6dfb3e12ae523630ce82da2fd96da /include/video/imx-ipu-v3.h | |
parent | 2ffd48f2e7ae06c3d7b2bcde9a0cb211d1a32468 (diff) |
gpu: ipu-v3: Add Image Converter unit
Adds the Image Converter (IC) unit.
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Condensed the three CSC setup functions into a single one that
uses static tables to set up the CSC task parameters.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'include/video/imx-ipu-v3.h')
-rw-r--r-- | include/video/imx-ipu-v3.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 6d254275192b..a477814a03af 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
@@ -71,6 +71,20 @@ enum ipu_csi_dest { | |||
71 | IPU_CSI_DEST_VDIC, /* to VDIC */ | 71 | IPU_CSI_DEST_VDIC, /* to VDIC */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | /* | ||
75 | * Enumeration of IPU rotation modes | ||
76 | */ | ||
77 | enum ipu_rotate_mode { | ||
78 | IPU_ROTATE_NONE = 0, | ||
79 | IPU_ROTATE_VERT_FLIP, | ||
80 | IPU_ROTATE_HORIZ_FLIP, | ||
81 | IPU_ROTATE_180, | ||
82 | IPU_ROTATE_90_RIGHT, | ||
83 | IPU_ROTATE_90_RIGHT_VFLIP, | ||
84 | IPU_ROTATE_90_RIGHT_HFLIP, | ||
85 | IPU_ROTATE_90_LEFT, | ||
86 | }; | ||
87 | |||
74 | enum ipu_color_space { | 88 | enum ipu_color_space { |
75 | IPUV3_COLORSPACE_RGB, | 89 | IPUV3_COLORSPACE_RGB, |
76 | IPUV3_COLORSPACE_YUV, | 90 | IPUV3_COLORSPACE_YUV, |
@@ -243,6 +257,37 @@ void ipu_csi_put(struct ipu_csi *csi); | |||
243 | void ipu_csi_dump(struct ipu_csi *csi); | 257 | void ipu_csi_dump(struct ipu_csi *csi); |
244 | 258 | ||
245 | /* | 259 | /* |
260 | * IPU Image Converter (ic) functions | ||
261 | */ | ||
262 | enum ipu_ic_task { | ||
263 | IC_TASK_ENCODER, | ||
264 | IC_TASK_VIEWFINDER, | ||
265 | IC_TASK_POST_PROCESSOR, | ||
266 | IC_NUM_TASKS, | ||
267 | }; | ||
268 | |||
269 | struct ipu_ic; | ||
270 | int ipu_ic_task_init(struct ipu_ic *ic, | ||
271 | int in_width, int in_height, | ||
272 | int out_width, int out_height, | ||
273 | enum ipu_color_space in_cs, | ||
274 | enum ipu_color_space out_cs); | ||
275 | int ipu_ic_task_graphics_init(struct ipu_ic *ic, | ||
276 | enum ipu_color_space in_g_cs, | ||
277 | bool galpha_en, u32 galpha, | ||
278 | bool colorkey_en, u32 colorkey); | ||
279 | void ipu_ic_task_enable(struct ipu_ic *ic); | ||
280 | void ipu_ic_task_disable(struct ipu_ic *ic); | ||
281 | int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel, | ||
282 | u32 width, u32 height, int burst_size, | ||
283 | enum ipu_rotate_mode rot); | ||
284 | int ipu_ic_enable(struct ipu_ic *ic); | ||
285 | int ipu_ic_disable(struct ipu_ic *ic); | ||
286 | struct ipu_ic *ipu_ic_get(struct ipu_soc *ipu, enum ipu_ic_task task); | ||
287 | void ipu_ic_put(struct ipu_ic *ic); | ||
288 | void ipu_ic_dump(struct ipu_ic *ic); | ||
289 | |||
290 | /* | ||
246 | * IPU Sensor Multiple FIFO Controller (SMFC) functions | 291 | * IPU Sensor Multiple FIFO Controller (SMFC) functions |
247 | */ | 292 | */ |
248 | int ipu_smfc_enable(struct ipu_soc *ipu); | 293 | int ipu_smfc_enable(struct ipu_soc *ipu); |