Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 994366e0 authored by Maheshwar Ajja's avatar Maheshwar Ajja Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: use batch enable instead of decode_batching



Use the existing batch enable variable instead of extra
variable decode_batching.

Change-Id: Ic7875caf2b0d2c47d77b0c0c0ce9b5792920cafc
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent c27dd191
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -776,7 +776,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
		struct msm_vidc_inst *temp;

		inst->batch.size = MAX_DEC_BATCH_SIZE;
		inst->decode_batching = true;
		inst->batch.enable = true;

		mutex_lock(&core->lock);
		list_for_each_entry(temp, &core->instances, list) {
@@ -784,7 +784,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
				temp->state != MSM_VIDC_CORE_INVALID &&
				is_decode_session(temp) &&
				!is_thumbnail_session(temp)) {
				inst->decode_batching = false;
				inst->batch.enable = false;
				dprintk(VIDC_HIGH,
				"Disable decode-batching in multi sessions\n");
				break;
+2 −2
Original line number Diff line number Diff line
@@ -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->decode_batching &&
	if (inst->batch.enable &&
		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->decode_batching &&
		if (inst->batch.enable &&
			is_decode_session(inst) &&
			count < inst->batch.size)
			count = inst->batch.size;
+1 −1
Original line number Diff line number Diff line
@@ -2794,7 +2794,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->decode_batching &&
	return (inst->batch.enable &&
		is_decode_session(inst) &&
		!is_thumbnail_session(inst) &&
		!inst->clk_data.low_latency_mode &&
+0 −1
Original line number Diff line number Diff line
@@ -512,7 +512,6 @@ 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);
};