]> git.baikalelectronics.ru Git - kernel.git/commit
media: ov5640: Rework timings programming
authorJacopo Mondi <jacopo@jmondi.org>
Fri, 13 May 2022 14:13:56 +0000 (15:13 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 14:21:41 +0000 (15:21 +0100)
commitef537c474fec1f4ccb00caa2c1b3ced6811a18e0
tree3b48c439962cffa31f540d12366976bb1ffe35b2
parent8ad1d9b4c73603724e8114b67a96079a86609c13
media: ov5640: Rework timings programming

The current definition of a sensor mode defines timings as follows:

- hact, vact: Visible width and height
- htot, vtot: Total sizes including blankings

This makes difficult to clearly separate the visible sizes from the
blankings and to make the vertical blanking programmable.

Rework the sensor modes sizes definition to:
- Report the analog crop sizes
- Report the visible crop size
- Report the total pixels per line as HBLANK is fixed
- Report the VBLANK value to make it programmable

Also modify the ov5640_set_timings() function to program all the
windowing registers are remove them from the per-mode register-value
tables.

Do not change the timing values from the ones reported in the register
tables to maintain bisectability.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5640.c