summaryrefslogtreecommitdiffstats
path: root/include/video/imx-ipu-v3.h
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2016-08-17 20:50:17 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-08-29 10:30:23 -0400
commitac4708fab1422905870a1c286e69d784ddc7358c (patch)
tree3fc517d040d264e30de1138fdd6cbb0317e660af /include/video/imx-ipu-v3.h
parent2d2ead4530771de0c5f2f7f0a7924deb045c4cce (diff)
gpu: ipu-v3: Add FSU channel linking support
Adds functions to link and unlink source channels to sink channels in the FSU: int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch); int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch); The channels numbers are usually IDMAC channels, but they can also be channels that do not transfer data to or from memory. The following convenience functions can be used in place of ipu_fsu_link/unlink() when both source and sink channels are IDMAC channels: int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink); int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink); So far the following links are supported: IPUV3_CHANNEL_IC_PRP_ENC_MEM -> IPUV3_CHANNEL_MEM_ROT_ENC PUV3_CHANNEL_IC_PRP_VF_MEM -> IPUV3_CHANNEL_MEM_ROT_VF IPUV3_CHANNEL_IC_PP_MEM -> IPUV3_CHANNEL_MEM_ROT_PP IPUV3_CHANNEL_CSI_DIRECT -> IPUV3_CHANNEL_CSI_VDI_PREV More links can be added to the fsu_link_info[] array. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> 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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 335d42e250a9..1a3f7d4811fc 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -107,6 +107,14 @@ enum ipu_channel_irq {
107#define IPUV3_CHANNEL_CSI2 2 107#define IPUV3_CHANNEL_CSI2 2
108#define IPUV3_CHANNEL_CSI3 3 108#define IPUV3_CHANNEL_CSI3 3
109#define IPUV3_CHANNEL_VDI_MEM_IC_VF 5 109#define IPUV3_CHANNEL_VDI_MEM_IC_VF 5
110/*
111 * NOTE: channels 6,7 are unused in the IPU and are not IDMAC channels,
112 * but the direct CSI->VDI linking is handled the same way as IDMAC
113 * channel linking in the FSU via the IPU_FS_PROC_FLOW registers, so
114 * these channel names are used to support the direct CSI->VDI link.
115 */
116#define IPUV3_CHANNEL_CSI_DIRECT 6
117#define IPUV3_CHANNEL_CSI_VDI_PREV 7
110#define IPUV3_CHANNEL_MEM_VDI_PREV 8 118#define IPUV3_CHANNEL_MEM_VDI_PREV 8
111#define IPUV3_CHANNEL_MEM_VDI_CUR 9 119#define IPUV3_CHANNEL_MEM_VDI_CUR 9
112#define IPUV3_CHANNEL_MEM_VDI_NEXT 10 120#define IPUV3_CHANNEL_MEM_VDI_NEXT 10
@@ -143,6 +151,7 @@ enum ipu_channel_irq {
143#define IPUV3_CHANNEL_ROT_PP_MEM 50 151#define IPUV3_CHANNEL_ROT_PP_MEM 50
144#define IPUV3_CHANNEL_MEM_BG_SYNC_ALPHA 51 152#define IPUV3_CHANNEL_MEM_BG_SYNC_ALPHA 51
145#define IPUV3_CHANNEL_MEM_BG_ASYNC_ALPHA 52 153#define IPUV3_CHANNEL_MEM_BG_ASYNC_ALPHA 52
154#define IPUV3_NUM_CHANNELS 64
146 155
147int ipu_map_irq(struct ipu_soc *ipu, int irq); 156int ipu_map_irq(struct ipu_soc *ipu, int irq);
148int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel, 157int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
@@ -186,6 +195,10 @@ int ipu_idmac_get_current_buffer(struct ipuv3_channel *channel);
186bool ipu_idmac_buffer_is_ready(struct ipuv3_channel *channel, u32 buf_num); 195bool ipu_idmac_buffer_is_ready(struct ipuv3_channel *channel, u32 buf_num);
187void ipu_idmac_select_buffer(struct ipuv3_channel *channel, u32 buf_num); 196void ipu_idmac_select_buffer(struct ipuv3_channel *channel, u32 buf_num);
188void ipu_idmac_clear_buffer(struct ipuv3_channel *channel, u32 buf_num); 197void ipu_idmac_clear_buffer(struct ipuv3_channel *channel, u32 buf_num);
198int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch);
199int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch);
200int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink);
201int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink);
189 202
190/* 203/*
191 * IPU Channel Parameter Memory (cpmem) functions 204 * IPU Channel Parameter Memory (cpmem) functions