media: coda: mark last capture buffer
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 18 Mar 2020 18:35:35 +0000 (19:35 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 09:55:39 +0000 (11:55 +0200)
commit1e34e446d79cbc85b14e881a7198ee6617909f13
tree221ca5521c1dc8f0fe51e30152049c28744776c7
parentd2f1db8608527bed9478d87e710aa1a8bac8f40a
media: coda: mark last capture buffer

If a JPEG decoding application queues the last capture and output
buffers, issues a decoder stop command after the decoding is already
done, and then dequeues the last capture buffer, it is not marked as
last. Detect this condition in the decoder stop command and mark the
last buffer on the capture done list.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/coda/coda-common.c