media: imx-jpeg: Remove soft reset between frames encoding
authorMirela Rabulea <mirela.rabulea@nxp.com>
Mon, 27 Sep 2021 18:57:19 +0000 (20:57 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 8 Oct 2021 09:26:13 +0000 (11:26 +0200)
commitae3cab78dc48958f8fc88ea79e57ec73f2070042
tree3deebaad9d6c86e6de55b572d5ede33b1e23bc05
parent34acaf65dc2281400bf97a2f3c894a581ef566e9
media: imx-jpeg: Remove soft reset between frames encoding

Remove soft reset between frames, which was merely a workaround,
actually replace it with something less aggressive: clearing of jpeg stream
buffer pointer, via STM_CTRL[BITBUF_PTR_CLR].
According to the reference manual, the BITBUF_PTR_CLR is performed on
context switch, but, per hardware team recommendation, it is also working
without context switch, which is the case for this driver, for now.

Without soft reset and without BITBUF_PTR_CLR, successive encoding jobs
continue from where the previous left off, basically writing past the
v4l2 buffer.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/imx-jpeg/mxc-jpeg.c