summaryrefslogtreecommitdiffstats
path: root/drivers/phy/mediatek
diff options
context:
space:
mode:
authorGuillaume Ranquet <granquet@baylibre.com>2023-05-30 10:43:07 +0200
committerVinod Koul <vkoul@kernel.org>2023-07-12 22:27:02 +0530
commit95bd315f0a5ed7d7afe771776272c5b3cdb29bc8 (patch)
treedadce110f7e6daeba6b3cdb751af30e8aa2d26fc /drivers/phy/mediatek
parent5782017cc4d0c8f3425d55b893675bb8a20c33e9 (diff)
downloadlinux-95bd315f0a5ed7d7afe771776272c5b3cdb29bc8.tar.gz
linux-95bd315f0a5ed7d7afe771776272c5b3cdb29bc8.tar.bz2
linux-95bd315f0a5ed7d7afe771776272c5b3cdb29bc8.zip
phy: mediatek: hdmi: mt8195: fix prediv bad upper limit test
The pll prediv calculus searchs for the smallest prediv that gets the ns_hdmipll_ck in the range of 5 GHz to 12 GHz. A typo in the upper bound test was testing for 5Ghz to 1Ghz Fixes: 45810d486bb44 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195") Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230529-hdmi_phy_fix-v1-1-bf65f53af533@baylibre.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/mediatek')
-rw-r--r--drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
index 8aa7251de4a9..bbfe11d6a69d 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
@@ -253,7 +253,7 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw,
for (i = 0; i < ARRAY_SIZE(txpredivs); i++) {
ns_hdmipll_ck = 5 * tmds_clk * txposdiv * txpredivs[i];
if (ns_hdmipll_ck >= 5 * GIGA &&
- ns_hdmipll_ck <= 1 * GIGA)
+ ns_hdmipll_ck <= 12 * GIGA)
break;
}
if (i == (ARRAY_SIZE(txpredivs) - 1) &&