[media] v4l2-dv-timings: fix CVT calculation
authorMartin Bugge <marbugge@cisco.com>
Wed, 14 Aug 2013 07:58:38 +0000 (04:58 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 24 Aug 2013 07:19:08 +0000 (04:19 -0300)
commitc3e75c7d5e203b6d1d16519bef8571b5d228b7fe
tree66b42a19890ad31ad6ca612b3f465ed654048ba8
parent1056e4388b0454917a512618c8416a98628fc9ce
[media] v4l2-dv-timings: fix CVT calculation

This patch fixes two errors that caused incorrect format detections:
The first bug is in the calculation of the vertical backporch: the combined
period of vsync and backporch must *exceed* a certain minimum value, and not
be equal to it.
The second bug is a rounding error in the reduced blanking calculation:
expand the ideal_duty_cylce to be in parts per ten thousand to avoid
rounding errors.

Signed-off-by: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/v4l2-dv-timings.c