Merge "msm: vidc: Update input buffer counts in set format"
This commit is contained in:
commit
64f370825e
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user