Commit e750a4b1 authored by Dikshita Agarwal's avatar Dikshita Agarwal Committed by Hans Verkuil

media: venus: flush all buffers in output plane streamoff

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: 85872f86 ("media: venus: Mark last capture buffer")
Signed-off-by: default avatarDikshita Agarwal <quic_dikshita@quicinc.com>
Tested-by: default avatarNathan Hebert <nhebert@chromium.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarStanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 8e04a24b
...@@ -1255,7 +1255,7 @@ static int vdec_stop_output(struct venus_inst *inst) ...@@ -1255,7 +1255,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment