media: ov5640: fix restore of last mode set
authorHugues Fruchet <hugues.fruchet@st.com>
Tue, 11 Sep 2018 13:48:21 +0000 (09:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:19:12 +0000 (09:19 +0100)
commitf9de7e61354fff630c9eb5ea87ed727f50dad63a
tree1caa992592c1d16410560f93a0e9afad84ca1b4c
parent6fc72c1b886525ee5b6cb244fd2ee5d86fee070b
media: ov5640: fix restore of last mode set

[ Upstream commit 985cdcb08a0488558d1005139596b64d73bee267 ]

Mode setting depends on last mode set, in particular
because of exposure calculation when downscale mode
change between subsampling and scaling.
At stream on the last mode was wrongly set to current mode,
so no change was detected and exposure calculation
was not made, fix this.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/ov5640.c