]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
clk: rockchip: re-add rational best approximation algorithm to the fractional divider
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Mon, 31 Jan 2022 16:32:24 +0000 (17:32 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:56:26 +0000 (11:56 +0200)
commitc77f65fffd9038036ec98d7420b222177eff8f7a
tree72e3f7bd7e5ec89b98c625d773aa01cc61e7233e
parentac76fd77d65bc07018ae5ea8b2d2ba7bef386bfa
clk: rockchip: re-add rational best approximation algorithm to the fractional divider

BugLink: https://bugs.launchpad.net/bugs/1969110
commit 10b74af310735860510a533433b1d3ab2e05a138 upstream.

In commit 4e7cf74fa3b2 ("clk: fractional-divider: Export approximation
algorithm to the CCF users"), the code handling the rational best
approximation algorithm was replaced by a call to the core
clk_fractional_divider_general_approximation function which did the same
thing back then.

However, in commit 82f53f9ee577 ("clk: fractional-divider: Introduce
POWER_OF_TWO_PS flag"), this common code was made conditional on
CLK_FRAC_DIVIDER_POWER_OF_TWO_PS flag which was not added back to the
rockchip clock driver.

This broke the ltk050h3146w-a2 MIPI DSI display present on a PX30-based
downstream board.

Let's add the flag to the fractional divider flags so that the original
and intended behavior is brought back to the rockchip clock drivers.

Fixes: 82f53f9ee577 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag")
Cc: stable@vger.kernel.org
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220131163224.708002-1-quentin.schulz@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5aa6d84a0b076fbbbe41e9e7d5a7292b58920f11)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/clk/rockchip/clk.c