]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: venus: flush all buffers in output plane streamoff
authorDikshita Agarwal <quic_dikshita@quicinc.com>
Wed, 10 Jan 2024 06:12:14 +0000 (11:42 +0530)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sun, 30 Jun 2024 09:22:44 +0000 (11:22 +0200)
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: 85872f861d4c ("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>
drivers/media/platform/qcom/venus/vdec.c

index 29130a9441e7048b2d3d1c46b0719c27436ee763..0d2ab95bec0f6e1cfcfbaf8f643c357f7675f7b8 100644 (file)
@@ -1255,7 +1255,7 @@ static int vdec_stop_output(struct venus_inst *inst)
                break;
        case VENUS_DEC_STATE_INIT:
        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;
        default:
                break;