]> git.baikalelectronics.ru Git - kernel.git/commit
phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz
authorJonas Karlman <jonas@kwiboo.se>
Mon, 23 Dec 2019 08:49:19 +0000 (08:49 +0000)
committerKishon Vijay Abraham I <kishon@ti.com>
Tue, 31 Dec 2019 10:16:08 +0000 (15:46 +0530)
commit878048871df39ece5a41497e642bcec06c08b140
tree06b9e9f4e1b45c402fb0aadf4db2354ea4ddbc03
parentdcd37a8a58c907575740c5277e8d192e907794d6
phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz

Commit b0f9b25e528e ("drm/rockchip: Round up _before_ giving to the clock framework")
changed what rate clk_round_rate() is called with, an additional 999 Hz
added to the requsted mode clock. This has caused a regression on RK3328
and presumably also on RK3228 because the inno-hdmi-phy clock requires an
exact match of the requested rate in the pre pll config table.

When an exact match is not found the parent clock rate (24MHz) is returned
to the clk_round_rate() caller. This cause wrong pixel clock to be used and
result in no-signal when configuring a mode on RK3328.

Fix this by rounding the rate down to closest 1000 Hz in round_rate func,
this allows an exact match to be found in pre pll config table.

Fixes: b0f9b25e528e ("drm/rockchip: Round up _before_ giving to the clock framework")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c