[media] rcar_vin: Enable VSYNC field toggle mode
authorKoji Matsuoka <koji.matsuoka.xm@renesas.com>
Wed, 22 Oct 2014 04:05:36 +0000 (01:05 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 12 Dec 2014 12:29:20 +0000 (10:29 -0200)
By applying this patch, it sets to VSYNC field toggle mode not only
at the time of progressive mode but at the time of an interlace mode.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/soc_camera/rcar_vin.c

index c71ef2b526a0826b3aa68673284234a3bc22c1bc..1b1d5bc16afe43c9e46074112d41041f6982cfe4 100644 (file)
 #define VNDMR2_VPS             (1 << 30)
 #define VNDMR2_HPS             (1 << 29)
 #define VNDMR2_FTEV            (1 << 17)
+#define VNDMR2_VLV(n)          ((n & 0xf) << 12)
 
 #define VIN_MAX_WIDTH          2048
 #define VIN_MAX_HEIGHT         2048
@@ -1243,7 +1244,7 @@ static int rcar_vin_set_bus_param(struct soc_camera_device *icd)
        if (ret < 0 && ret != -ENOIOCTLCMD)
                return ret;
 
-       val = priv->field == V4L2_FIELD_NONE ? VNDMR2_FTEV : 0;
+       val = VNDMR2_FTEV | VNDMR2_VLV(1);
        if (!(common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW))
                val |= VNDMR2_VPS;
        if (!(common_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW))