mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
msm: venc: set operating rate to 1 for HEIC
Set operating rate to 1 by force for HEIC, so as to avoid overloads. Change-Id: If3f980e096c7e30368b9c6a280e78bbe1625e87a Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
This commit is contained in:
parent
2b6da92f88
commit
a0e884a3b0
1 changed files with 10 additions and 4 deletions
|
|
@ -1671,6 +1671,12 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
break;
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE:
|
||||
inst->clk_data.operating_rate = ctrl->val;
|
||||
/* For HEIC image encode, set operating rate to 1 */
|
||||
if (is_grid_session(inst)) {
|
||||
s_vpr_h(sid, "%s: set operating rate to 1 for HEIC\n",
|
||||
__func__);
|
||||
inst->clk_data.operating_rate = 1 << 16;
|
||||
}
|
||||
inst->flags &= ~VIDC_TURBO;
|
||||
if (ctrl->val == INT_MAX)
|
||||
inst->flags |= VIDC_TURBO;
|
||||
|
|
@ -1910,6 +1916,9 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
s_vpr_h(sid, "%s: set fps to 1 for HEIC\n",
|
||||
__func__);
|
||||
inst->clk_data.frame_rate = 1 << 16;
|
||||
s_vpr_h(sid, "%s: set operating rate to 1 for HEIC\n",
|
||||
__func__);
|
||||
inst->clk_data.operating_rate = 1 << 16;
|
||||
}
|
||||
break;
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE:
|
||||
|
|
@ -2191,7 +2200,6 @@ int msm_venc_set_operating_rate(struct msm_vidc_inst *inst)
|
|||
{
|
||||
int rc = 0;
|
||||
struct hfi_device *hdev;
|
||||
struct v4l2_ctrl *ctrl;
|
||||
struct hfi_operating_rate op_rate;
|
||||
|
||||
if (!inst || !inst->core) {
|
||||
|
|
@ -2200,9 +2208,7 @@ int msm_venc_set_operating_rate(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
hdev = inst->core->device;
|
||||
|
||||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE);
|
||||
op_rate.operating_rate = ctrl->val;
|
||||
op_rate.operating_rate = inst->clk_data.operating_rate;
|
||||
|
||||
s_vpr_h(inst->sid, "%s: %d\n", __func__, op_rate.operating_rate >> 16);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
|
|
|
|||
Loading…
Reference in a new issue