During commit 6594988fd625 ("clk: composite: Use rate_ops.determine_rate
when also a mux is available") setting req->best_parent_hw got lost,
so best_parent_hw stays NULL during switch to the same parent. This
results in the (debug) message:
clk_calc_new_rates: lcdif_pixel not gated but wants to reparent
and the following rate change is dropped.
Fixes: 6594988fd625 ("clk: composite: Use rate_ops.determine_rate when also a mux is available")
Signed-off-by: Alexander Stein <[email protected]>
---
This is on linux-next tag 'next-20211101' and platform is a custom
imx8mq board.
drivers/clk/clk-composite.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
index c04ae0e7e4b4..b9c5f904f535 100644
--- a/drivers/clk/clk-composite.c
+++ b/drivers/clk/clk-composite.c
@@ -97,6 +97,7 @@ static int clk_composite_determine_rate(struct clk_hw *hw,
return ret;
req->rate = tmp_req.rate;
+ req->best_parent_hw = tmp_req.best_parent_hw;
req->best_parent_rate = tmp_req.best_parent_rate;
return 0;
--
2.25.1
Hi Alexander,
On Wed, Nov 3, 2021 at 1:24 PM Alexander Stein
<[email protected]> wrote:
>
> During commit 6594988fd625 ("clk: composite: Use rate_ops.determine_rate
> when also a mux is available") setting req->best_parent_hw got lost,
> so best_parent_hw stays NULL during switch to the same parent. This
> results in the (debug) message:
> clk_calc_new_rates: lcdif_pixel not gated but wants to reparent
> and the following rate change is dropped.
Thanks for investigating and fixing this!
note to myself: only clocks with CLK_SET_RATE_NO_REPARENT are affected.
This might be the reason why it wasn't spotted on Rockchip SoCs (yet).
I have Cc'ed Alex and Chen-Yu in case they're investigating breakage
on Rockchip SoCs with linux-next
> Fixes: 6594988fd625 ("clk: composite: Use rate_ops.determine_rate when also a mux is available")
> Signed-off-by: Alexander Stein <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
Best regards,
Martin
Quoting Alexander Stein (2021-11-03 05:24:41)
> During commit 6594988fd625 ("clk: composite: Use rate_ops.determine_rate
> when also a mux is available") setting req->best_parent_hw got lost,
> so best_parent_hw stays NULL during switch to the same parent. This
> results in the (debug) message:
> clk_calc_new_rates: lcdif_pixel not gated but wants to reparent
> and the following rate change is dropped.
>
> Fixes: 6594988fd625 ("clk: composite: Use rate_ops.determine_rate when also a mux is available")
> Signed-off-by: Alexander Stein <[email protected]>
> ---
Applied to clk-next