diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2020-09-28 19:44:29 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-12 20:27:04 +0300 |
commit | acf8a57d8caf5ceabbe50774953fe04745ad1a50 (patch) | |
tree | e41851f96884d412da42a24353b2ef4cda5801e3 /drivers/media/platform/qcom/venus/helpers.c | |
parent | cc82fd691a3a7e8b46bd94fe7cacb2835015df22 (diff) | |
download | linux-acf8a57d8caf5ceabbe50774953fe04745ad1a50.tar.xz |
media: venus: vdec: Fix non reliable setting of LAST flag
In real use of dynamic-resolution-change it is observed that the
LAST buffer flag (which marks the last decoded buffer with the
resolution before the resolution-change event) is not reliably set.
Fix this by set the LAST buffer flag on next queued capture buffer
after the resolution-change event.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/helpers.c')
-rw-r--r-- | drivers/media/platform/qcom/venus/helpers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 859d260f002b..c25eecb12658 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -1342,6 +1342,12 @@ void venus_helper_vb2_buf_queue(struct vb2_buffer *vb) v4l2_m2m_buf_queue(m2m_ctx, vbuf); + /* Skip processing queued capture buffers after LAST flag */ + if (inst->session_type == VIDC_SESSION_TYPE_DEC && + V4L2_TYPE_IS_CAPTURE(vb->vb2_queue->type) && + inst->codec_state == VENUS_DEC_STATE_DRC) + goto unlock; + cache_payload(inst, vb); if (inst->session_type == VIDC_SESSION_TYPE_ENC && |