Loading drivers/media/platform/msm/vidc/msm_vdec.c +19 −1 Original line number Diff line number Diff line Loading @@ -816,8 +816,26 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst) inst->bufq[CAPTURE_PORT].num_planes = 1; inst->prop.fps = DEFAULT_FPS; inst->clk_data.operating_rate = 0; 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, "decode-batching disabled in multiple sessions\n"); break; } } mutex_unlock(&core->lock); } /* By default, initialize CAPTURE port to UBWC YUV format */ fmt = msm_comm_get_pixel_fmt_fourcc(vdec_formats, Loading drivers/media/platform/msm/vidc/msm_vidc_clocks.c +1 −2 Original line number Diff line number Diff line Loading @@ -1185,8 +1185,7 @@ int msm_vidc_get_extra_buff_count(struct msm_vidc_inst *inst, * batch size count of extra buffers added on output port */ if (is_output_buffer(inst, buffer_type)) { if (inst->core->resources.decode_batching && is_decode_session(inst) && if (inst->decode_batching && is_decode_session(inst) && count < inst->batch.size) count = inst->batch.size; } Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +2 −3 Original line number Diff line number Diff line Loading @@ -2892,7 +2892,7 @@ bool is_batching_allowed(struct msm_vidc_inst *inst) * - not a thumbnail session * - UBWC color format */ if (inst->core->resources.decode_batching && is_decode_session(inst) && if (inst->decode_batching && is_decode_session(inst) && (inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_H264 || inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_HEVC || inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_VP9) && Loading Loading @@ -3198,8 +3198,7 @@ static int msm_comm_init_buffer_count(struct msm_vidc_inst *inst) HAL_BUFFER_INPUT); bufreq->buffer_count_min = inst->fmts[port].input_min_count; /* batching needs minimum batch size count of input buffers */ if (inst->core->resources.decode_batching && is_decode_session(inst) && if (inst->decode_batching && is_decode_session(inst) && bufreq->buffer_count_min < inst->batch.size) bufreq->buffer_count_min = inst->batch.size; bufreq->buffer_count_min_host = bufreq->buffer_count_actual = Loading drivers/media/platform/msm/vidc/msm_vidc_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -487,6 +487,7 @@ struct msm_vidc_inst { struct batch_mode batch; struct timer_list batch_timer; struct work_struct batch_work; bool decode_batching; }; extern struct msm_vidc_drv *vidc_driver; Loading Loading
drivers/media/platform/msm/vidc/msm_vdec.c +19 −1 Original line number Diff line number Diff line Loading @@ -816,8 +816,26 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst) inst->bufq[CAPTURE_PORT].num_planes = 1; inst->prop.fps = DEFAULT_FPS; inst->clk_data.operating_rate = 0; 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, "decode-batching disabled in multiple sessions\n"); break; } } mutex_unlock(&core->lock); } /* By default, initialize CAPTURE port to UBWC YUV format */ fmt = msm_comm_get_pixel_fmt_fourcc(vdec_formats, Loading
drivers/media/platform/msm/vidc/msm_vidc_clocks.c +1 −2 Original line number Diff line number Diff line Loading @@ -1185,8 +1185,7 @@ int msm_vidc_get_extra_buff_count(struct msm_vidc_inst *inst, * batch size count of extra buffers added on output port */ if (is_output_buffer(inst, buffer_type)) { if (inst->core->resources.decode_batching && is_decode_session(inst) && if (inst->decode_batching && is_decode_session(inst) && count < inst->batch.size) count = inst->batch.size; } Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +2 −3 Original line number Diff line number Diff line Loading @@ -2892,7 +2892,7 @@ bool is_batching_allowed(struct msm_vidc_inst *inst) * - not a thumbnail session * - UBWC color format */ if (inst->core->resources.decode_batching && is_decode_session(inst) && if (inst->decode_batching && is_decode_session(inst) && (inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_H264 || inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_HEVC || inst->fmts[OUTPUT_PORT].fourcc == V4L2_PIX_FMT_VP9) && Loading Loading @@ -3198,8 +3198,7 @@ static int msm_comm_init_buffer_count(struct msm_vidc_inst *inst) HAL_BUFFER_INPUT); bufreq->buffer_count_min = inst->fmts[port].input_min_count; /* batching needs minimum batch size count of input buffers */ if (inst->core->resources.decode_batching && is_decode_session(inst) && if (inst->decode_batching && is_decode_session(inst) && bufreq->buffer_count_min < inst->batch.size) bufreq->buffer_count_min = inst->batch.size; bufreq->buffer_count_min_host = bufreq->buffer_count_actual = Loading
drivers/media/platform/msm/vidc/msm_vidc_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -487,6 +487,7 @@ struct msm_vidc_inst { struct batch_mode batch; struct timer_list batch_timer; struct work_struct batch_work; bool decode_batching; }; extern struct msm_vidc_drv *vidc_driver; Loading