OSDN Git Service

media: ov5670: Fix incorrect frame timing reported to user
authorChiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Wed, 9 Aug 2017 21:59:48 +0000 (17:59 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:31:41 +0000 (08:31 -0400)
commitf14253818a7aa096f1f3a650b2d5b73612fbd46f
treea499c20daf25720d0a8398c1ffdd3c94f24702a3
parent52471f6705b92054e73ee547a871797db076e716
media: ov5670: Fix incorrect frame timing reported to user

Previously, pixel-rate/(pixels-per-line * lines-per-frame) was
yielding incorrect frame timing for the user.

OV sensor is using internal timing and this requires
conversion (internal timing -> PPL) for correct HBLANK calculation.

Now, change pixels-per-line domain from internal sensor clock to
pixels domain. Set HBLANK read-only because fixed PPL is used for all
resolutions. And, use more accurate link-frequency 422.4MHz instead of
rounding down to 420MHz.

Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ov5670.c