Merge "msm: vidc: Update input buffer counts in set format"

This commit is contained in:
qctecmdr 2019-12-19 16:13:39 -08:00 committed by Gerrit - the friendly Code Review server
commit 64f370825e
2 changed files with 21 additions and 0 deletions

View File

@ -649,6 +649,19 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
mplane->plane_fmt[0].sizeimage =
msm_vidc_calculate_dec_input_frame_size(inst);
/* Driver can recalculate buffer count only for
* only for bitstream port. Decoder YUV port reconfig
* should not overwrite the FW calculated buffer
* count.
*/
rc = msm_vidc_calculate_buffer_counts(inst);
if (rc) {
s_vpr_e(inst->sid,
"%s failed to calculate buffer count\n",
__func__);
return rc;
}
rc = msm_vidc_check_session_supported(inst);
if (rc) {
s_vpr_e(inst->sid,

View File

@ -1376,6 +1376,14 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
inst->bit_depth = MSM_VIDC_BIT_DEPTH_10;
}
rc = msm_vidc_calculate_buffer_counts(inst);
if (rc) {
s_vpr_e(inst->sid,
"%s failed to calculate buffer count\n",
__func__);
return rc;
}
rc = msm_vidc_check_session_supported(inst);
if (rc) {
s_vpr_e(inst->sid,