]> git.baikalelectronics.ru Git - kernel.git/commit
media: venus: Mark last capture buffer
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Fri, 3 Apr 2020 15:56:29 +0000 (17:56 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 5 May 2020 11:07:15 +0000 (13:07 +0200)
commitc6ac136a84993d6c5e6ed3c7ea647f5bf06a1378
tree570c79487778360fa10fd9cc0667d7502bcde6a2
parente513e0a3ca66434f485baa0cd2617d3292307d46
media: venus: Mark last capture buffer

According to stateful Codec API the decoder will process all
remaining buffers from before the source change event in
dynamic-resolution-change state and mark the last buffer with
V4L2_BUF_FLAG_LAST.

In Venus case the firmware doesn't mark that last buffer and
some mechanism have to be created in v4l decoder driver.
Fortunately the firmware interface (HFI) claims that the
decoder output buffers will be returned to v4l decoder
driver before it send the insufficient event.

In order to do that we save last queued in the driver capture
buffer in the event_notify and issue flush on output firmware
buffers queue. Once the saved buffer is returned (as a result of
flush command) we mark it as LAST. For all that possible we
extend HFI flush command with one more argument and one more
flush_done HFI driver callback.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/core.h
drivers/media/platform/qcom/venus/hfi.c
drivers/media/platform/qcom/venus/hfi.h
drivers/media/platform/qcom/venus/hfi_msgs.c
drivers/media/platform/qcom/venus/vdec.c