summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Nie <rex.nie@jaguarmicro.com>2024-11-12 15:41:00 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-08 09:56:55 +0100
commitae7d4873471cebadf46087b097bdd62c2d5e8b12 (patch)
tree56678f8b2c7afc79ca4668991a921829c3f99b1a
parent99a877d607b489bc75db87b09c120db7fea45aba (diff)
drm/msm/hdmi: simplify code in pll_get_integloop_gain
[ Upstream commit c1beb6f75d5e60e4e57a837c665a52eb79eb19ba ] In pll_get_integloop_gain(), digclk_divsel=1 or 2, base=63 or 196ULL, so the base may be 63, 126, 196, 392. The condition base <= 2046 always true. Fixes: caedbf17c48d ("drm/msm: add msm8998 hdmi phy/pll support") Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/624153/ Link: https://lore.kernel.org/r/20241112074101.2206-1-rex.nie@jaguarmicro.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
index e6ffaf92d26d..1c4211cfa2a4 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
@@ -137,7 +137,7 @@ static inline u32 pll_get_integloop_gain(u64 frac_start, u64 bclk, u32 ref_clk,
base <<= (digclk_divsel == 2 ? 1 : 0);
- return (base <= 2046 ? base : 2046);
+ return base;
}
static inline u32 pll_get_pll_cmp(u64 fdata, unsigned long ref_clk)