mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
msm: venc: set perf mode for HEIC buffers
1. Set perf mode for image session buffers so that they will be processed quickly. 2. Set max frequency for any turbo sessions. Change-Id: Icf9b0af5cffcd395356783a9ff7a9421a309f52c Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
This commit is contained in:
parent
923758b884
commit
73fa002b9b
2 changed files with 9 additions and 5 deletions
|
|
@ -370,6 +370,12 @@ int msm_vidc_qbuf(void *instance, struct media_device *mdev,
|
|||
msm_comm_store_input_tag(&inst->etb_data, b->index,
|
||||
client_data->id, 0, inst->sid);
|
||||
}
|
||||
/*
|
||||
* set perf mode for image session buffers so that
|
||||
* they will be processed quickly
|
||||
*/
|
||||
if (is_grid_session(inst) && b->type == INPUT_MPLANE)
|
||||
b->flags |= V4L2_BUF_FLAG_PERF_MODE;
|
||||
|
||||
q = msm_comm_get_vb2q(inst, b->type);
|
||||
if (!q) {
|
||||
|
|
|
|||
|
|
@ -851,11 +851,8 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst)
|
|||
if (temp->vvb.vb2_buf.type == INPUT_MPLANE) {
|
||||
filled_len = max(filled_len,
|
||||
temp->vvb.vb2_buf.planes[0].bytesused);
|
||||
if (inst->session_type == MSM_VIDC_ENCODER &&
|
||||
(temp->vvb.flags &
|
||||
V4L2_BUF_FLAG_PERF_MODE)) {
|
||||
if (temp->vvb.flags & V4L2_BUF_FLAG_PERF_MODE)
|
||||
is_turbo = true;
|
||||
}
|
||||
device_addr = temp->smem[0].device_addr;
|
||||
}
|
||||
}
|
||||
|
|
@ -866,7 +863,8 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (inst->clk_data.buffer_counter < DCVS_FTB_WINDOW || is_turbo) {
|
||||
if (inst->clk_data.buffer_counter < DCVS_FTB_WINDOW || is_turbo ||
|
||||
is_turbo_session(inst)) {
|
||||
inst->clk_data.min_freq =
|
||||
msm_vidc_max_freq(inst->core, inst->sid);
|
||||
inst->clk_data.dcvs_flags = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue