video: driver: Always Set COMV bufcount to FW

Always set COMV bufcount to FW, even if COMV buffer can be
reused. Otherwise, there may be a mismatch in COM bufcount
between host and firmware.

Change-Id: I10d54818a4478e8b0a9e9577c6c8684ad52f5de8
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
This commit is contained in:
Mihir Ganu
2022-09-16 10:35:09 -07:00
committed by Gerrit - the friendly Code Review server
parent 08b36416ce
commit 7dd8b6d186

View File

@@ -3990,6 +3990,16 @@ int msm_vidc_queue_internal_buffers(struct msm_vidc_inst *inst,
return 0;
}
/*
* Set HFI_PROP_COMV_BUFFER_COUNT to firmware even if COMV buffer
* is reused.
*/
if (is_decode_session(inst) && buffer_type == MSM_VIDC_BUF_COMV) {
rc = msm_vdec_set_num_comv(inst);
if (rc)
return rc;
}
buffers = msm_vidc_get_buffers(inst, buffer_type, __func__);
if (!buffers)
return -EINVAL;
@@ -4000,12 +4010,6 @@ int msm_vidc_queue_internal_buffers(struct msm_vidc_inst *inst,
return 0;
}
if (is_decode_session(inst) && buffer_type == MSM_VIDC_BUF_COMV) {
rc = msm_vdec_set_num_comv(inst);
if (rc)
return rc;
}
list_for_each_entry_safe(buffer, dummy, &buffers->list, list) {
/* do not queue pending release buffers */
if (buffer->flags & MSM_VIDC_ATTR_PENDING_RELEASE)