The 'disp_cc_mdss_rot_clk' is parented to 'disp_cc_pll0' and enabled out of boot on sc7180 Trogdor devices. This is a problem because the mdss driver (the driver for compatible node "qcom,sc7180-mdss") turns off 'disp_cc_mdss_mdp_clk' and that clk is also parented to 'disp_cc_pll0'. When the display pll turns off, the rotator clk gets stuck on. We don't really care about this clk being on through boot, so simply disable the clk during driver probe to avoid this issue. Cc: Bjorn Andersson <andersson@xxxxxxxxxx> Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Cc: Douglas Anderson <dianders@xxxxxxxxxxxx> Cc: Taniya Das <quic_tdas@xxxxxxxxxxx> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx> --- drivers/clk/qcom/dispcc-sc7180.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/qcom/dispcc-sc7180.c b/drivers/clk/qcom/dispcc-sc7180.c index 9536bfc72a43..a3356a7758b3 100644 --- a/drivers/clk/qcom/dispcc-sc7180.c +++ b/drivers/clk/qcom/dispcc-sc7180.c @@ -705,6 +705,20 @@ static int disp_cc_sc7180_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); + /* + * Force off 'disp_cc_mdss_rot_clk' so that the driver for the + * "qcom,sc7180-mdss" compatible node can disable + * 'disp_cc_mdss_mdp_clk', which in turn disables 'disp_cc_pll0', + * without making this clk stuck on. When the mdss driver runtime + * suspends, the mdss_gdsc will turn off. If 'disp_cc_mdss_rot_clk' + * isn't off or parked on XO at this time it will wedge the GDSC and + * then 'disp_cc_mdss_mdp_clk' will fail to turn on because the GDSC is + * wedged. + */ + regmap_update_bits(regmap, + disp_cc_mdss_rot_clk.clkr.enable_reg, + disp_cc_mdss_rot_clk.clkr.enable_mask, 0); + /* 1380MHz configuration */ disp_cc_pll_config.l = 0x47; disp_cc_pll_config.alpha = 0xe000; -- https://chromeos.dev