]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commitb56dad1c08fcc92b58d08c8e84b98572aac4059d
tree7daa64db9626284e2a353fdd2323131c77c301d5
parentf388c27a068f8e9ca5fcda8d3ba4bbdead6dc3a9
[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