MLK-22066: media: ISI: fix tearing issue for IMX8MN platform
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Wed, 10 Jul 2019 01:39:34 +0000 (09:39 +0800)
committerGuoniu.Zhou <guoniu.zhou@nxp.com>
Wed, 7 Aug 2019 06:29:03 +0000 (14:29 +0800)
commited7309a8b79b4141ebeddc22ae01109c1e8237f2
tree211d6c5aa7f49beee3dc37578c3f31e662edbd1d
parentfa835d12f5bf8584a105aa919c649ed560571b6a
MLK-22066: media: ISI: fix tearing issue for IMX8MN platform

ISI use ping-pong buffer to write image data to memory. Theoretically,
BUF1 will first work and then BUF2, but sometimes ISI of IMX8MN do not
follow this rule. But in our driver, we use list to manage buffers. It
means that we must follow 1-2-1... sequence. So just skip the frame for
this specail case.

Because we can not guarantee the interrupt sequence of BUF1 and BUF2,
and not sure which buffer is free, so change the buffer switching by
buffer status, not frame sequence.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
drivers/media/platform/imx8/mxc-isi-cap.c
drivers/media/platform/imx8/mxc-isi-core.c
drivers/media/platform/imx8/mxc-isi-core.h
drivers/media/platform/imx8/mxc-isi-hw.c