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

Commit e14e9f4c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Update clock calculations for a video session"

parents 5e994e14 7b39e847
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -570,6 +570,9 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst,
			inst->clk_data.entry->vpp_cycles;

		vpp_cycles = mbs_per_second * vpp_cycles_per_mb;
		/* 21 / 20 is overhead factor */
		vpp_cycles = (vpp_cycles * 21)/
				(inst->clk_data.work_route * 20);

		vsp_cycles = mbs_per_second * inst->clk_data.entry->vsp_cycles;

@@ -577,8 +580,12 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst,
		vsp_cycles += (inst->clk_data.bitrate * 10) / 7;
	} else if (inst->session_type == MSM_VIDC_DECODER) {
		vpp_cycles = mbs_per_second * inst->clk_data.entry->vpp_cycles;
		/* 21 / 20 is overhead factor */
		vpp_cycles = (vpp_cycles * 21)/
				(inst->clk_data.work_route * 20);

		vsp_cycles = mbs_per_second * inst->clk_data.entry->vsp_cycles;

		/* 10 / 7 is overhead factor */
		vsp_cycles += ((inst->prop.fps * filled_len * 8) * 10) / 7;