media: venus: flush all buffers in output plane streamoff

[ Upstream commit e750a4b1224142bd8dd057b0d5adf8a5608b7e77 ]

For scenarios, when source change is followed by VIDIOC_STREAMOFF
on output plane, driver should discard any queued OUTPUT
buffers, which are not decoded or dequeued.
Flush with HFI_FLUSH_INPUT does not have any actual impact.
So, fix it, by invoking HFI_FLUSH_ALL, which will flush all
queued buffers.

Fixes: 85872f861d ("media: venus: Mark last capture buffer")
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Tested-by: Nathan Hebert <nhebert@chromium.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
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>
This commit is contained in:
Dikshita Agarwal 2024-01-10 11:42:14 +05:30 коммит произвёл Greg Kroah-Hartman
Родитель 0619f7750f
Коммит cd6b8fc9c1
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1165,7 +1165,7 @@ static int vdec_stop_output(struct venus_inst *inst)
break; break;
case VENUS_DEC_STATE_INIT: case VENUS_DEC_STATE_INIT:
case VENUS_DEC_STATE_CAPTURE_SETUP: case VENUS_DEC_STATE_CAPTURE_SETUP:
ret = hfi_session_flush(inst, HFI_FLUSH_INPUT, true); ret = hfi_session_flush(inst, HFI_FLUSH_ALL, true);
break; break;
default: default:
break; break;