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

Commit c17ad2a8 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 mbs per second calculation"

parents 4edc6e28 6ce2d706
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -298,6 +298,11 @@ static int msm_comm_get_mbs_per_sec(struct msm_vidc_inst *inst)
	rc = msm_comm_g_ctrl(inst, &ctrl);
	if (!rc && ctrl.value) {
		fps = (ctrl.value >> 16) ? ctrl.value >> 16 : 1;
		/*
		 * Check if operating rate is less than fps.
		 * If Yes, then use fps to scale clocks
		*/
		fps = fps > inst->prop.fps ? fps : inst->prop.fps;
		return max(output_port_mbs, capture_port_mbs) * fps;
	} else
		return max(output_port_mbs, capture_port_mbs) * inst->prop.fps;