Skip to content

Commit 9c3df2b

Browse files
Taniya Dasbebarino
authored andcommitted
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 <[email protected]> Reported-by: Evan Green <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: 1726956 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") Fixes: 06391ed ("clk: qcom: Add Global Clock controller (GCC) driver for SDM845") [[email protected]: Fill out commit text more] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 5ce728f commit 9c3df2b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/clk/qcom/gcc-sc7180.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ static struct clk_branch gcc_disp_gpll0_clk_src = {
10611061
.hw = &gpll0.clkr.hw,
10621062
},
10631063
.num_parents = 1,
1064-
.ops = &clk_branch2_ops,
1064+
.ops = &clk_branch2_aon_ops,
10651065
},
10661066
},
10671067
};

drivers/clk/qcom/gcc-sdm845.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/*
3-
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
3+
* Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved.
44
*/
55

66
#include <linux/kernel.h>
@@ -1344,7 +1344,7 @@ static struct clk_branch gcc_disp_gpll0_clk_src = {
13441344
"gpll0",
13451345
},
13461346
.num_parents = 1,
1347-
.ops = &clk_branch2_ops,
1347+
.ops = &clk_branch2_aon_ops,
13481348
},
13491349
},
13501350
};

0 commit comments

Comments
 (0)