OSDN Git Service

drm/msm/dsi_pll_10nm: Fix dividing the same numbers twice
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Sat, 9 Jan 2021 13:51:08 +0000 (14:51 +0100)
committerRob Clark <robdclark@chromium.org>
Mon, 1 Feb 2021 16:30:14 +0000 (08:30 -0800)
commit5c191fef4ce2fc4310d8174bd3861474919201e4
tree5bb5b7b573c1590412d668cb1359a78fd942f012
parentc703d5789590935c573bbd080a2166b72d51a017
drm/msm/dsi_pll_10nm: Fix dividing the same numbers twice

In function dsi_pll_calc_dec_frac we are calculating the decimal
div start parameter by dividing the decimal multiple by the
fractional multiplier: the remainder of that operation is stored
to then get programmed to the fractional divider registers of
the PLL.

It's useless to call div_u64_rem to get the remainder and *then*
call div_u64 to get the division result, as the first is already
giving that result: let's fix it by just caring about the result
of div_u64_rem.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c