video: driver: update sizeimage during set ctrl

update input port sizeimage for a decode session
during set control of bitsream size overwrite
control.

Change-Id: I4cb7d6c8d416f187e1ac557d3b423acfdbcb7a60
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
Darshana Patil
2021-03-04 11:18:14 -08:00
parent 596ca194de
commit 3f9d032aa1
3 changed files with 31 additions and 3 deletions

View File

@@ -3298,6 +3298,26 @@ void inst_unlock(struct msm_vidc_inst *inst, const char *function)
mutex_unlock(&inst->lock);
}
int msm_vidc_update_bitstream_buffer_size(struct msm_vidc_inst *inst)
{
struct msm_vidc_core *core;
struct v4l2_format *fmt;
if (!inst || !inst->core) {
d_vpr_e("%s: invalid params\n", __func__);
return -EINVAL;
}
core = inst->core;
if (is_decode_session(inst)) {
fmt = &inst->fmts[INPUT_PORT];
fmt->fmt.pix_mp.plane_fmt[0].sizeimage = call_session_op(core,
buffer_size, inst, MSM_VIDC_BUF_INPUT);
}
return 0;
}
int msm_vidc_update_meta_port_settings(struct msm_vidc_inst *inst)
{
struct msm_vidc_core *core;