]> git.baikalelectronics.ru Git - kernel.git/commit
media: s5p-mfc: Fix to handle reference queue during finishing
authorSmitha T Murthy <smitha.t@samsung.com>
Wed, 7 Sep 2022 10:32:27 +0000 (16:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:53 +0000 (11:41 +0100)
commit85331a134aef1e7d5daaeeb2aec1f9a40ea769ab
treed04e413f089108483765c5c237a5a910ab419fd4
parent80f3ca03b46a8873c53c0ab6e7a7a14fee15fe3d
media: s5p-mfc: Fix to handle reference queue during finishing

[ Upstream commit d8a46bc4e1e0446459daa77c4ce14218d32dacf9 ]

On receiving last buffer driver puts MFC to MFCINST_FINISHING state which
in turn skips transferring of frame from SRC to REF queue. This causes
driver to stop MFC encoding and last frame is lost.

This patch guarantees safe handling of frames during MFCINST_FINISHING and
correct clearing of workbit to avoid early stopping of encoding.

Fixes: d64515dfd228 ("[media] MFC: Add MFC 5.1 V4L2 driver")
Cc: stable@vger.kernel.org
Cc: linux-fsd@tesla.com
Signed-off-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c