]> www.infradead.org Git - users/dwmw2/linux.git/commit
media: venus: dec: Fix handling of the start cmd
authorMichał Krawczyk <mk@semihalf.com>
Mon, 30 Jan 2023 13:54:18 +0000 (13:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:15 +0000 (23:03 +0900)
commit1e229899e3ea9bf0e0cc2524e7f484f29968723e
tree0d77da30e5b3b8b7a3b22fc6b12c66848e10db87
parentb21a9a57c74e75de539dd23d0c702fd0408a0aa8
media: venus: dec: Fix handling of the start cmd

[ Upstream commit 50248ad9f190d527cbd578190ca769729518b703 ]

The decoder driver should clear the last_buffer_dequeued flag of the
capture queue upon receiving V4L2_DEC_CMD_START.

The last_buffer_dequeued flag is set upon receiving EOS (which always
happens upon receiving V4L2_DEC_CMD_STOP).

Without this patch, after issuing the V4L2_DEC_CMD_STOP and
V4L2_DEC_CMD_START, the vb2_dqbuf() function will always fail, even if
the buffers are completed by the hardware.

Fixes: beac82904a87 ("media: venus: make decoder compliant with stateful codec API")
Signed-off-by: Michał Krawczyk <mk@semihalf.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/qcom/venus/vdec.c