msm: vidc: Decide DCVS after session configuration
DCVS feature depends on multiple client configurations. Low latency, thumbnail mode, etc are few among them. DCVS is now decided before the session starts streaming i.e after all configuration are inplace. CRs-Fixed: 2457035 Change-Id: I4a42ae6bafdc852e81794b69d117f5821af4841f Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org> Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
This commit is contained in:
parent
7c7796087e
commit
967b2f6bcb
@ -848,7 +848,6 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
||||
if (ctrl->val)
|
||||
inst->flags |= VIDC_THUMBNAIL;
|
||||
|
||||
msm_dcvs_try_enable(inst);
|
||||
rc = msm_vidc_set_buffer_count_for_thumbnail(inst);
|
||||
if (rc) {
|
||||
dprintk(VIDC_ERR, "Failed to set buffer count\n");
|
||||
|
@ -918,6 +918,8 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
|
||||
__func__, inst->batch.enable ? "enabled" : "disabled",
|
||||
inst, hash32_ptr(inst->session));
|
||||
|
||||
msm_dcvs_try_enable(inst);
|
||||
|
||||
/*
|
||||
* For seq_changed_insufficient, driver should set session_continue
|
||||
* to firmware after the following sequence
|
||||
@ -1570,7 +1572,6 @@ void *msm_vidc_open(int core_id, int session_type)
|
||||
goto fail_init;
|
||||
}
|
||||
|
||||
msm_dcvs_try_enable(inst);
|
||||
if (msm_comm_check_for_inst_overload(core)) {
|
||||
dprintk(VIDC_ERR,
|
||||
"Instance count reached Max limit, rejecting session");
|
||||
|
@ -1030,15 +1030,18 @@ int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst)
|
||||
|
||||
int msm_dcvs_try_enable(struct msm_vidc_inst *inst)
|
||||
{
|
||||
if (!inst) {
|
||||
if (!inst || !inst->core) {
|
||||
dprintk(VIDC_ERR, "%s: Invalid args: %p\n", __func__, inst);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (msm_vidc_clock_voting ||
|
||||
!inst->core->resources.dcvs ||
|
||||
inst->flags & VIDC_THUMBNAIL ||
|
||||
inst->clk_data.low_latency_mode ||
|
||||
inst->batch.enable) {
|
||||
inst->batch.enable ||
|
||||
inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ ||
|
||||
inst->grid_enable) {
|
||||
dprintk(VIDC_PROF, "DCVS disabled: %pK\n", inst);
|
||||
inst->clk_data.dcvs_mode = false;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user