[media] v4l2-dv-timings: fix rounding in hblank and hsync calculation
authorPrashant Laddha <prladdha@cisco.com>
Wed, 22 Apr 2015 17:32:35 +0000 (14:32 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:14:37 +0000 (07:14 -0300)
commitd7ed5a3ddaec19d866ffc05ed2733179fbe4da9e
tree7daa64db9626284e2a353fdd2323131c77c301d5
parentf67476589afc9a4a48bc342f1b5f505b508bd1ff
[media] v4l2-dv-timings: fix rounding in hblank and hsync calculation

Changed the rounding calculation for hblank and hsync to match it
to equations in cvt and gtf standards.

In cvt calculation, hsync needs to be rounded down.

In gtf calculations, hblank needs to be rounded to nearest multiple
of twice the cell granularity and hsync needs to be rounded to the
nearest multiple of cell granularity.

Cc: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-dv-timings.c