media: ov5640: Adjust vblank with s_frame_interval
authorHugues Fruchet <hugues.fruchet@st.com>
Fri, 13 May 2022 14:14:05 +0000 (15:14 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 14:29:02 +0000 (15:29 +0100)
commit19f2e3e63d3aa2fa1093bf89b1ab1d7fc2f8007b
tree5993e72b66319bfb9b837833be05e19570ed0146
parentbce93b827de641d7d2e000c9b9d4d30298aa42b6
media: ov5640: Adjust vblank with s_frame_interval

Adjust the vertical blanking when s_frame_interval is used.

s_frame_interval allows to set a fixed frame rate, which gets stored as
the sensor's current one. When a new mode is applied, the current frame
rate is reset to the mode's default one. In order to correctly report
the currently configured vertical blanking for s_frame_interval users,
verify that the desired frame rate has not been changed. If that's the
case, compute the correct blanking value and reflect it through the
corresponding v4l2 control.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5640.c