linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: Make gcc_gpu_cfg_ahb_clk critical
@ 2019-12-17 17:12 Jeffrey Hugo
  2019-12-19  6:00 ` Stephen Boyd
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey Hugo @ 2019-12-17 17:12 UTC (permalink / raw)
  To: mturquette, sboyd
  Cc: agross, bjorn.andersson, linux-arm-msm, linux-clk, linux-kernel,
	Jeffrey Hugo

Mark gcc_gpu_cfg_ahb_clk as critical on msm8998 because gpucc cannot be
accessed without it.

Fixes: b5f5f525c547 ("clk: qcom: Add MSM8998 Global Clock Control (GCC) driver")
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
---
 drivers/clk/qcom/gcc-msm8998.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
index df1d7056436c..26cc1458ce4a 100644
--- a/drivers/clk/qcom/gcc-msm8998.c
+++ b/drivers/clk/qcom/gcc-msm8998.c
@@ -2044,6 +2044,7 @@ static struct clk_branch gcc_gpu_cfg_ahb_clk = {
 		.hw.init = &(struct clk_init_data){
 			.name = "gcc_gpu_cfg_ahb_clk",
 			.ops = &clk_branch2_ops,
+			.flags = CLK_IS_CRITICAL, /* to access gpucc */
 		},
 	},
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: qcom: Make gcc_gpu_cfg_ahb_clk critical
  2019-12-17 17:12 [PATCH] clk: qcom: Make gcc_gpu_cfg_ahb_clk critical Jeffrey Hugo
@ 2019-12-19  6:00 ` Stephen Boyd
  2019-12-19 14:20   ` Jeffrey Hugo
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2019-12-19  6:00 UTC (permalink / raw)
  To: Jeffrey Hugo, mturquette
  Cc: agross, bjorn.andersson, linux-arm-msm, linux-clk, linux-kernel,
	Jeffrey Hugo

Quoting Jeffrey Hugo (2019-12-17 09:12:05)
> diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
> index df1d7056436c..26cc1458ce4a 100644
> --- a/drivers/clk/qcom/gcc-msm8998.c
> +++ b/drivers/clk/qcom/gcc-msm8998.c
> @@ -2044,6 +2044,7 @@ static struct clk_branch gcc_gpu_cfg_ahb_clk = {
>                 .hw.init = &(struct clk_init_data){
>                         .name = "gcc_gpu_cfg_ahb_clk",
>                         .ops = &clk_branch2_ops,
> +                       .flags = CLK_IS_CRITICAL, /* to access gpucc */

Can we not do the thing that Bjorn did to turn on ahb clks with runtime
PM for clk controllers that need them? See 892df0191b29 ("clk: qcom: Add
QCS404 TuringCC").


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: qcom: Make gcc_gpu_cfg_ahb_clk critical
  2019-12-19  6:00 ` Stephen Boyd
@ 2019-12-19 14:20   ` Jeffrey Hugo
  2019-12-24  2:23     ` Stephen Boyd
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey Hugo @ 2019-12-19 14:20 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Michael Turquette, Andy Gross, Bjorn Andersson, MSM, linux-clk, lkml

On Wed, Dec 18, 2019 at 11:00 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Jeffrey Hugo (2019-12-17 09:12:05)
> > diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
> > index df1d7056436c..26cc1458ce4a 100644
> > --- a/drivers/clk/qcom/gcc-msm8998.c
> > +++ b/drivers/clk/qcom/gcc-msm8998.c
> > @@ -2044,6 +2044,7 @@ static struct clk_branch gcc_gpu_cfg_ahb_clk = {
> >                 .hw.init = &(struct clk_init_data){
> >                         .name = "gcc_gpu_cfg_ahb_clk",
> >                         .ops = &clk_branch2_ops,
> > +                       .flags = CLK_IS_CRITICAL, /* to access gpucc */
>
> Can we not do the thing that Bjorn did to turn on ahb clks with runtime
> PM for clk controllers that need them? See 892df0191b29 ("clk: qcom: Add
> QCS404 TuringCC").
>

Interesting.  I didn't think of that solution, nor was I aware of that
change.  Let me have a look.  Thanks for the tip.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: qcom: Make gcc_gpu_cfg_ahb_clk critical
  2019-12-19 14:20   ` Jeffrey Hugo
@ 2019-12-24  2:23     ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2019-12-24  2:23 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: Michael Turquette, Andy Gross, Bjorn Andersson, MSM, linux-clk, lkml

Quoting Jeffrey Hugo (2019-12-19 06:20:23)
> On Wed, Dec 18, 2019 at 11:00 PM Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Jeffrey Hugo (2019-12-17 09:12:05)
> > > diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
> > > index df1d7056436c..26cc1458ce4a 100644
> > > --- a/drivers/clk/qcom/gcc-msm8998.c
> > > +++ b/drivers/clk/qcom/gcc-msm8998.c
> > > @@ -2044,6 +2044,7 @@ static struct clk_branch gcc_gpu_cfg_ahb_clk = {
> > >                 .hw.init = &(struct clk_init_data){
> > >                         .name = "gcc_gpu_cfg_ahb_clk",
> > >                         .ops = &clk_branch2_ops,
> > > +                       .flags = CLK_IS_CRITICAL, /* to access gpucc */
> >
> > Can we not do the thing that Bjorn did to turn on ahb clks with runtime
> > PM for clk controllers that need them? See 892df0191b29 ("clk: qcom: Add
> > QCS404 TuringCC").
> >
> 
> Interesting.  I didn't think of that solution, nor was I aware of that
> change.  Let me have a look.  Thanks for the tip.

The other option is to just always turn the clk on and leave it enabled
forever. I believe Bjorn had to use runtime PM because the clk would
turn off when the subsystem was reset. Maybe in the GPU case that isn't
true so we can just turn on the AHB and not try anything else. If that
works then I'd prefer that so we can save on code/data size.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-24  2:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 17:12 [PATCH] clk: qcom: Make gcc_gpu_cfg_ahb_clk critical Jeffrey Hugo
2019-12-19  6:00 ` Stephen Boyd
2019-12-19 14:20   ` Jeffrey Hugo
2019-12-24  2:23     ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).