media: ov5640: fix vblank unchange issue when work at dvp mode
authorGuoniu.zhou <guoniu.zhou@nxp.com>
Wed, 19 Jul 2023 07:30:12 +0000 (15:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:31 +0000 (11:59 +0100)
commitcd567e637f7bd4070c4f56c092a438f9fc73845e
tree7d3d474f524f55bf614636a1661ba4f534f4c704
parentadf4abf768389888064b9d23ba3b8cb6816b6294
media: ov5640: fix vblank unchange issue when work at dvp mode

[ Upstream commit 8fc29e3c9f682d4ad9b0764d44ecc6c19b000051 ]

The value of V4L2_CID_VBLANK control is initialized to default vblank
value of 640x480 when driver probe. When OV5640 work at DVP mode, the
control value won't update and lead to sensor can't output data if the
resolution remain the same as last time since incorrect total vertical
size. So update it when there is a new value applied.

Fixes: bce93b827de6 ("media: ov5640: Add VBLANK control")
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/ov5640.c