media: ov5640: Set JPEG output timings when outputting JPEG data
authorChen-Yu Tsai <wens@csie.org>
Fri, 18 Jan 2019 08:52:05 +0000 (03:52 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 18 Feb 2019 16:29:56 +0000 (11:29 -0500)
commit7cb013b1049a2a599c1fc344644528eb8bf985b8
tree7de24594fe28d9bbe91aa7a04d2c023ce42200d1
parentbddc5cdfc82d11cc9bd80c11ef681afbae11c1db
media: ov5640: Set JPEG output timings when outputting JPEG data

When compression is turned on, the on-bus data is framed according to
the compression mode, and the height and width set in VFIFO_VSIZE and
VFIFO_HSIZE. If these are not updated correctly, the sensor will send
data framed in a manner unexpected by the capture interface, such as
having more bytes per line than expected, and having the extra data
dropped. This ultimately results in corrupted data.

Set the two values when the media bus is configured for JPEG data,
meaning the sensor would be in JPEG mode.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov5640.c