phy/rockchip: inno-hdmi: round fractal pixclock in rk3328 recalc_rate
authorZheng Yang <zhengyang@rock-chips.com>
Thu, 15 Jun 2023 17:10:19 +0000 (17:10 +0000)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Jul 2023 16:57:43 +0000 (22:27 +0530)
commitd5ef343c1d62bc4c4c2c393af654a41cb34b449f
treeed5d3ad1fc8936284c6be162c9d9ecfadd3ae418
parent644c06dfbd0da713f772abf0a8f8581ac78e6264
phy/rockchip: inno-hdmi: round fractal pixclock in rk3328 recalc_rate

inno_hdmi_phy_rk3328_clk_recalc_rate() is returning a rate not found
in the pre pll config table when the fractal divider is used.
This can prevent proper power_on because a tmdsclock for the new rate
is not found in the pre pll config table.

Fix this by saving and returning a rounded pixel rate that exist
in the pre pll config table.

Fixes: 53706a116863 ("phy: add Rockchip Innosilicon hdmi phy")
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20230615171005.2251032-3-jonas@kwiboo.se
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c