Merge "msm: vidc: disable DCVS for camera encode batching"

This commit is contained in:
qctecmdr 2020-07-26 12:20:18 -07:00 committed by Gerrit - the friendly Code Review server
commit 7fc1d99c4b
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;