summaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2014-08-11 13:04:50 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2014-09-02 14:55:43 +0200
commit1aa8ea0d2bd5d4ba7b5d2b132a02157bc1fb9793 (patch)
tree60ae9f3c40e6dfb3e12ae523630ce82da2fd96da /include/video
parent2ffd48f2e7ae06c3d7b2bcde9a0cb211d1a32468 (diff)
downloadblackbird-op-linux-1aa8ea0d2bd5d4ba7b5d2b132a02157bc1fb9793.tar.gz
blackbird-op-linux-1aa8ea0d2bd5d4ba7b5d2b132a02157bc1fb9793.zip
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')
-rw-r--r--include/video/imx-ipu-v3.h45
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 {
IPU_CSI_DEST_VDIC, /* to VDIC */
};
+/*
+ * Enumeration of IPU rotation modes
+ */
+enum ipu_rotate_mode {
+ IPU_ROTATE_NONE = 0,
+ IPU_ROTATE_VERT_FLIP,
+ IPU_ROTATE_HORIZ_FLIP,
+ IPU_ROTATE_180,
+ IPU_ROTATE_90_RIGHT,
+ IPU_ROTATE_90_RIGHT_VFLIP,
+ IPU_ROTATE_90_RIGHT_HFLIP,
+ IPU_ROTATE_90_LEFT,
+};
+
enum ipu_color_space {
IPUV3_COLORSPACE_RGB,
IPUV3_COLORSPACE_YUV,
@@ -243,6 +257,37 @@ void ipu_csi_put(struct ipu_csi *csi);
void ipu_csi_dump(struct ipu_csi *csi);
/*
+ * IPU Image Converter (ic) functions
+ */
+enum ipu_ic_task {
+ IC_TASK_ENCODER,
+ IC_TASK_VIEWFINDER,
+ IC_TASK_POST_PROCESSOR,
+ IC_NUM_TASKS,
+};
+
+struct ipu_ic;
+int ipu_ic_task_init(struct ipu_ic *ic,
+ int in_width, int in_height,
+ int out_width, int out_height,
+ enum ipu_color_space in_cs,
+ enum ipu_color_space out_cs);
+int ipu_ic_task_graphics_init(struct ipu_ic *ic,
+ enum ipu_color_space in_g_cs,
+ bool galpha_en, u32 galpha,
+ bool colorkey_en, u32 colorkey);
+void ipu_ic_task_enable(struct ipu_ic *ic);
+void ipu_ic_task_disable(struct ipu_ic *ic);
+int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel,
+ u32 width, u32 height, int burst_size,
+ enum ipu_rotate_mode rot);
+int ipu_ic_enable(struct ipu_ic *ic);
+int ipu_ic_disable(struct ipu_ic *ic);
+struct ipu_ic *ipu_ic_get(struct ipu_soc *ipu, enum ipu_ic_task task);
+void ipu_ic_put(struct ipu_ic *ic);
+void ipu_ic_dump(struct ipu_ic *ic);
+
+/*
* IPU Sensor Multiple FIFO Controller (SMFC) functions
*/
int ipu_smfc_enable(struct ipu_soc *ipu);
OpenPOWER on IntegriCloud