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

Commit c63e97f2 authored by Vikas Reddy Pachika's avatar Vikas Reddy Pachika Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Use inbuilt math function for doing division operation



Division of 64bit dividend is causing compilation failure
for 32bit kernel. Using math function to support division for
both 64 and 32-bit kernels.

Change-Id: Ia12d55c49e7c2448a9125154a56a2d36159b8857
Signed-off-by: default avatarVikas Reddy Pachika <vpachi@codeaurora.org>
parent 060c807f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -643,8 +643,8 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst,
			vsp_factor_num = vsp_factor_num * 13 / 10;
			vsp_factor_den *= 2;
		}
		vsp_cycles += ((u64)inst->clk_data.bitrate * vsp_factor_num) /
				vsp_factor_den;
		vsp_cycles += div_u64((u64)inst->clk_data.bitrate *
				vsp_factor_num, vsp_factor_den);
	} else if (inst->session_type == MSM_VIDC_DECODER) {
		vpp_cycles = mbs_per_second * inst->clk_data.entry->vpp_cycles;