mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
msm: vidc: Disable batching for concurrent usecase
Disable decode batching for concurrent decode session. CRs-Fixed: 2457122 Change-Id: I776e9d057ae0f1a9dc0fd565b061ae48b88435e1 Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
This commit is contained in:
parent
967b2f6bcb
commit
31bb5f19a0
4 changed files with 23 additions and 4 deletions
|
|
@ -776,8 +776,26 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
|
|||
|
||||
inst->clk_data.frame_rate = (DEFAULT_FPS << 16);
|
||||
inst->clk_data.operating_rate = (DEFAULT_FPS << 16);
|
||||
if (core->resources.decode_batching)
|
||||
if (core->resources.decode_batching) {
|
||||
struct msm_vidc_inst *temp;
|
||||
|
||||
inst->batch.size = MAX_DEC_BATCH_SIZE;
|
||||
inst->decode_batching = true;
|
||||
|
||||
mutex_lock(&core->lock);
|
||||
list_for_each_entry(temp, &core->instances, list) {
|
||||
if (temp != inst &&
|
||||
temp->state != MSM_VIDC_CORE_INVALID &&
|
||||
is_decode_session(temp) &&
|
||||
!is_thumbnail_session(temp)) {
|
||||
inst->decode_batching = false;
|
||||
dprintk(VIDC_DBG,
|
||||
"Disable decode-batching in multi sessions\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&core->lock);
|
||||
}
|
||||
|
||||
inst->buff_req.buffer[1].buffer_type = HAL_BUFFER_INPUT;
|
||||
inst->buff_req.buffer[1].buffer_count_min_host =
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ int msm_vidc_init_buffer_count(struct msm_vidc_inst *inst)
|
|||
HAL_BUFFER_INPUT);
|
||||
fmt->count_min = input_min_count;
|
||||
/* batching needs minimum batch size count of input buffers */
|
||||
if (inst->core->resources.decode_batching &&
|
||||
if (inst->decode_batching &&
|
||||
is_decode_session(inst) &&
|
||||
fmt->count_min < inst->batch.size)
|
||||
fmt->count_min = inst->batch.size;
|
||||
|
|
@ -711,7 +711,7 @@ int msm_vidc_get_extra_buff_count(struct msm_vidc_inst *inst,
|
|||
* batch size count of extra buffers added on output port
|
||||
*/
|
||||
if (buffer_type == HAL_BUFFER_OUTPUT) {
|
||||
if (inst->core->resources.decode_batching &&
|
||||
if (inst->decode_batching &&
|
||||
is_decode_session(inst) &&
|
||||
count < inst->batch.size)
|
||||
count = inst->batch.size;
|
||||
|
|
|
|||
|
|
@ -2787,7 +2787,7 @@ bool is_batching_allowed(struct msm_vidc_inst *inst)
|
|||
maxmbs = inst->capability.cap[CAP_BATCH_MAX_MB_PER_FRAME].max;
|
||||
maxfps = inst->capability.cap[CAP_BATCH_MAX_FPS].max;
|
||||
|
||||
return (inst->core->resources.decode_batching &&
|
||||
return (inst->decode_batching &&
|
||||
is_decode_session(inst) &&
|
||||
!is_thumbnail_session(inst) &&
|
||||
!inst->clk_data.low_latency_mode &&
|
||||
|
|
|
|||
|
|
@ -514,6 +514,7 @@ struct msm_vidc_inst {
|
|||
struct msm_vidc_codec_data *codec_data;
|
||||
struct hal_hdr10_pq_sei hdr10_sei_params;
|
||||
struct batch_mode batch;
|
||||
bool decode_batching;
|
||||
struct msm_vidc_inst_smem_ops *smem_ops;
|
||||
int (*buffer_size_calculators)(struct msm_vidc_inst *inst);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue