msm: vidc: Fix input tag fetching condition

For sub-frame encode sessions, input buffer done is received only after
all sub-frames have been received. In these sub-frame encode cases,
input tags are not fetched for sub-frame outputs for first input and
buffers are dropped in HAL in absence of apt input tags. Limit buffer
counter check from input tag fetch condition for decode sessions only.

Change-Id: I8c584834369be921d8699da49cfa1fec65fb993d
CRs-Fixed: 2547055
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
This commit is contained in:
Amit Shekhar 2020-01-27 14:31:18 -08:00 • committed by Gerrit - the friendly Code Review server
commit b7ee67c040

View file

@ -483,7 +483,9 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
* fetch tag atleast 1 ETB is successfully processed after flush)
*/
if (b->type == OUTPUT_MPLANE && !inst->in_flush &&
!inst->out_flush && inst->clk_data.buffer_counter) {
!inst->out_flush &&
(inst->session_type == MSM_VIDC_ENCODER ||
inst->clk_data.buffer_counter)) {
rc = msm_comm_fetch_input_tag(&inst->fbd_data, b->index,
&input_tag, &input_tag2, inst->sid);
if (rc) {