Browse Source

disp: msm: dp: fix vco rate calcuation for stream clocks

This change fixes the incorrect calculation of VCO rate for
stream clocks. This issue was introduced because of a previous
commit e4e277ad36df ("disp: msm: dp: Convert clock operations to byte2 ops").

Change-Id: I2886f98a95fd7c166edabec3fc023dc9846c201d
Signed-off-by: Sandeep Gangadharaiah <[email protected]>
Sandeep Gangadharaiah 2 years ago
parent
commit
b96376cfd1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      msm/dp/dp_pll_4nm.c

+ 3 - 3
msm/dp/dp_pll_4nm.c

@@ -764,11 +764,11 @@ static long dp_pll_link_clk_round(struct clk_hw *hw, unsigned long rate,
 static unsigned long dp_pll_vco_div_clk_get_rate(struct dp_pll *pll)
 {
 	if (pll->vco_rate == DP_VCO_HSCLK_RATE_8100MHZDIV1000)
-		return (pll->vco_rate / (6 * pll->clk_factor));
+		return ((pll->vco_rate / 6) * pll->clk_factor);
 	else if (pll->vco_rate == DP_VCO_HSCLK_RATE_5400MHZDIV1000)
-		return (pll->vco_rate / (4 * pll->clk_factor));
+		return ((pll->vco_rate / 4) * pll->clk_factor);
 	else
-		return (pll->vco_rate / (2 * pll->clk_factor));
+		return ((pll->vco_rate / 2) * pll->clk_factor);
 }
 
 static unsigned long dp_pll_vco_div_clk_recalc_rate(struct clk_hw *hw,