video: driver: reduce output buffer count for thumbnail usecase

Update output buffer min & extracount, if thumbnail mode is set
and also tune extracount at input psc sequence.

Change-Id: I77b28198257d127454ee3e9b2a307e1931547e8f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
Govindaraj Rajagopal
2021-04-27 11:07:42 +05:30
parent cf3fd457b3
commit 5a374e3ed4
3 changed files with 13 additions and 4 deletions

View File

@@ -1329,6 +1329,8 @@ static int msm_vdec_read_input_subcr_params(struct msm_vidc_inst *inst)
}
inst->buffers.output.min_count = subsc_params.fw_min_count;
inst->buffers.output.extra_count = call_session_op(core,
extra_count, inst, MSM_VIDC_BUF_OUTPUT);
if (is_thumbnail_session(inst) && inst->codec != MSM_VIDC_VP9) {
if (inst->buffers.output.min_count != 1) {
i_vpr_e(inst, "%s: invalid min count %d in thumbnail case\n",

View File

@@ -696,6 +696,9 @@ int msm_v4l2_op_s_ctrl(struct v4l2_ctrl *ctrl)
rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);
if (rc)
return rc;
rc = msm_vidc_update_buffer_count(inst, OUTPUT_PORT);
if (rc)
return rc;
}
if (is_meta_ctrl(ctrl->id)) {
if (cap_id == META_DPB_TAG_LIST) {

View File

@@ -4461,8 +4461,10 @@ int msm_vidc_update_buffer_count(struct msm_vidc_inst *inst, u32 port)
inst->buffers.input_meta.extra_count = 0;
inst->buffers.input_meta.actual_count = 0;
}
d_vpr_h("update input min buffer to %u\n",
inst->buffers.input.min_count);
i_vpr_h(inst, "%s: type: INPUT, count: min %u, extra %u, actual %u\n", __func__,
inst->buffers.input.min_count,
inst->buffers.input.extra_count,
inst->buffers.input.actual_count);
break;
case OUTPUT_PORT:
if (!inst->vb2q[INPUT_PORT].streaming)
@@ -4489,8 +4491,10 @@ int msm_vidc_update_buffer_count(struct msm_vidc_inst *inst, u32 port)
inst->buffers.output_meta.extra_count = 0;
inst->buffers.output_meta.actual_count = 0;
}
d_vpr_h("update output min buffer to %u\n",
inst->buffers.output.min_count);
i_vpr_h(inst, "%s: type: OUTPUT, count: min %u, extra %u, actual %u\n", __func__,
inst->buffers.output.min_count,
inst->buffers.output.extra_count,
inst->buffers.output.actual_count);
break;
default:
d_vpr_e("%s unknown port %d\n", __func__, port);