summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2017-06-07 21:34:06 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-20 13:43:41 +0300
commit6f303592392967a27bb2b0d7e744f4348f0d4647 (patch)
treeb38dc91bf383f75a0132eee6900741bcc183ecac /drivers
parentc8da8c03d2e45aa4f0d1b48e3ab8990ef3349179 (diff)
downloadlinux-6f303592392967a27bb2b0d7e744f4348f0d4647.tar.xz
[media] media: imx: csi: increase burst size for YUV formats
The IDMAC supports burst sizes of up to 32 pixels for interleaved YUV formats and up to 64 pixels for planar YUV formats. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/imx/imx-media-csi.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index b589fa244abc..ec4f9f88712c 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -333,6 +333,23 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
passthrough = true;
passthrough_bits = 16;
break;
+ case V4L2_PIX_FMT_YUV420:
+ case V4L2_PIX_FMT_NV12:
+ burst_size = (image.pix.width & 0x3f) ?
+ ((image.pix.width & 0x1f) ?
+ ((image.pix.width & 0xf) ? 8 : 16) : 32) : 64;
+ passthrough = (sensor_ep->bus_type != V4L2_MBUS_CSI2 &&
+ sensor_ep->bus.parallel.bus_width >= 16);
+ passthrough_bits = 16;
+ break;
+ case V4L2_PIX_FMT_YUYV:
+ case V4L2_PIX_FMT_UYVY:
+ burst_size = (image.pix.width & 0x1f) ?
+ ((image.pix.width & 0xf) ? 8 : 16) : 32;
+ passthrough = (sensor_ep->bus_type != V4L2_MBUS_CSI2 &&
+ sensor_ep->bus.parallel.bus_width >= 16);
+ passthrough_bits = 16;
+ break;
default:
burst_size = (image.pix.width & 0xf) ? 8 : 16;
passthrough = (sensor_ep->bus_type != V4L2_MBUS_CSI2 &&