summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Lavnikevich <d.lavnikevich@sam-solutions.net>2013-05-13 13:19:06 +0300
committerJustin Waters <justin.waters@timesys.com>2013-11-07 12:19:31 -0500
commit24500e2e4bff773d1ca822ca3af2730e5d7f62cb (patch)
treed40c4380412c3dc504326b3910030c886e4106b5
parentd27f81d4395980edc5c45ad2f146a57bd8f9ebf6 (diff)
Enabled deinterlacing for interlaced sensors.
Works through CPMEM of CSI_MEM channels to do deinterlacing. Signed-off-by: Uladzimir Bely <u.bely@sam-solutions.net> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
-rw-r--r--drivers/media/video/mxc_ipu_csi_enc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/mxc_ipu_csi_enc.c b/drivers/media/video/mxc_ipu_csi_enc.c
index e784d1c7a021..b6952468b408 100644
--- a/drivers/media/video/mxc_ipu_csi_enc.c
+++ b/drivers/media/video/mxc_ipu_csi_enc.c
@@ -116,6 +116,14 @@ static int csi_enc_setup(struct mxc_camera_dev *cam)
return -EINVAL;
}
+ /* Special case for interlaced sensors (like tw9910) */
+ struct v4l2_subdev *sd = soc_camera_to_subdev(cam->icd);
+ struct v4l2_mbus_framefmt mf;
+ if (!v4l2_subdev_call(sd, video, g_mbus_fmt, &mf)) {
+ if (mf.field == V4L2_FIELD_INTERLACED_BT)
+ params.csi_mem.interlaced = true;
+ }
+
pixel_fmt = fourcc_to_ipu_pixfmt(host_pixelfmt);
ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_ENC, cam->csi, true, true);