Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: gcc: Make disp gpll0 branch aon for sc7180/sdm845

The display gpll0 branch clock inside GCC needs to always be enabled.
Otherwise the AHB clk (disp_cc_mdss_ahb_clk_src) for the display clk
controller (dispcc) will stop clocking while sourcing from gpll0 when
this branch inside GCC is turned off during unused clk disabling. We can
never turn this branch off because the AHB clk for the display subsystem
is needed to read/write any registers inside the display subsystem
including clk related ones. This makes this branch a really easy way to
turn off AHB access to the display subsystem and cause all sorts of
mayhem. Let's just make the clk ops keep the clk enabled forever and
ignore any attempts to disable this clk so that dispcc accesses keep
working.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
Reported-by: Evan Green <evgreen@chromium.org>
Link: https://lore.kernel.org/r/1594796050-14511-1-git-send-email-tdas@codeaurora.org
Fixes: 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180")
Fixes: 06391eddb60a ("clk: qcom: Add Global Clock controller (GCC) driver for SDM845")
[sboyd@kernel.org: Fill out commit text more]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Taniya Das and committed by
Stephen Boyd
9c3df2b1 5ce728fa

+3 -3
+1 -1
drivers/clk/qcom/gcc-sc7180.c
··· 1061 1061 .hw = &gpll0.clkr.hw, 1062 1062 }, 1063 1063 .num_parents = 1, 1064 - .ops = &clk_branch2_ops, 1064 + .ops = &clk_branch2_aon_ops, 1065 1065 }, 1066 1066 }, 1067 1067 };
+2 -2
drivers/clk/qcom/gcc-sdm845.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 - * Copyright (c) 2018, The Linux Foundation. All rights reserved. 3 + * Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved. 4 4 */ 5 5 6 6 #include <linux/kernel.h> ··· 1344 1344 "gpll0", 1345 1345 }, 1346 1346 .num_parents = 1, 1347 - .ops = &clk_branch2_ops, 1347 + .ops = &clk_branch2_aon_ops, 1348 1348 }, 1349 1349 }, 1350 1350 };