OSDN Git Service

gpu: ipu-v3: Add FSU channel linking support
authorSteve Longerbeam <slongerbeam@gmail.com>
Thu, 18 Aug 2016 00:50:17 +0000 (17:50 -0700)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 29 Aug 2016 14:30:23 +0000 (16:30 +0200)
commitac4708fab1422905870a1c286e69d784ddc7358c
tree3fc517d040d264e30de1138fdd6cbb0317e660af
parent2d2ead4530771de0c5f2f7f0a7924deb045c4cce
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>
drivers/gpu/ipu-v3/ipu-common.c
drivers/gpu/ipu-v3/ipu-prv.h
include/video/imx-ipu-v3.h