From 061ddda681fea4a06befe1fc8e34ef2e0d14f5dc Mon Sep 17 00:00:00 2001 From: Prashant Laddha Date: Fri, 22 May 2015 02:27:34 -0300 Subject: [media] v4l2-dv-timings: add interlace support in detect cvt/gtf Extend detect_cvt/gtf API to indicate the format type (interlaced or progressive). In case of interlaced, the vertical front and back porch and vsync values for both (odd,even) fields are considered to derive image height. Populated vsync, vertical front, back porch values in bt timing structure for even and odd fields and updated the flags appropriately. Also modified the functions calling the detect_cvt/gtf(). As of now these functions are calling detect_cvt/gtf() with interlaced flag set to false. Cc: Martin Bugge Cc: Mats Randgaard Cc: Laurent Pinchart Signed-off-by: Prashant Laddha Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/adv7604.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/i2c/adv7604.c') diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index daf9386a5031..808360fd6539 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -1331,12 +1331,12 @@ static int stdi2dv_timings(struct v4l2_subdev *sd, if (v4l2_detect_cvt(stdi->lcf + 1, hfreq, stdi->lcvs, (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), - timings)) + false, timings)) return 0; if (v4l2_detect_gtf(stdi->lcf + 1, hfreq, stdi->lcvs, (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), - state->aspect_ratio, timings)) + false, state->aspect_ratio, timings)) return 0; v4l2_dbg(2, debug, sd, -- cgit