msm: vidc: disable DCVS for camera encode batching

Disable DCVS for encode usecases if the control
V4L2_CID_MPEG_VIDC_SUPERFRAME is enabled.

Change-Id: I72a4bebbd79c42988867572d69f6833629054cba
This commit is contained in:
Priyanka Gujjula 2020-07-24 12:48:34 +05:30
parent fbc3b10e06
commit 4f287b68ad
2 changed files with 13 additions and 1 deletions

View File

@ -999,7 +999,8 @@ int msm_dcvs_try_enable(struct msm_vidc_inst *inst)
inst->clk_data.low_latency_mode ||
inst->batch.enable ||
is_turbo_session(inst) ||
inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ);
inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ ||
is_encode_batching(inst));
s_vpr_hp(inst->sid, "DCVS %s: %pK\n",
inst->clk_data.dcvs_mode ? "enabled" : "disabled", inst);

View File

@ -153,6 +153,17 @@ static inline bool is_encode_session(struct msm_vidc_inst *inst)
return inst->session_type == MSM_VIDC_ENCODER;
}
static inline bool is_encode_batching(struct msm_vidc_inst *inst)
{
struct v4l2_ctrl *ctrl;
if (inst->session_type != MSM_VIDC_ENCODER)
return false;
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_SUPERFRAME);
return !!ctrl->val;
}
static inline bool is_primary_output_mode(struct msm_vidc_inst *inst)
{
return inst->stream_output_mode == HAL_VIDEO_DECODER_PRIMARY;