linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm
@ 2019-11-15 12:39 Brian Masney
  2019-11-16 16:51 ` Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Brian Masney @ 2019-11-15 12:39 UTC (permalink / raw)
  To: sboyd
  Cc: mturquette, agross, linux-arm-msm, linux-clk, linux-kernel,
	bjorn.andersson, jonathan

gfx3d_clk_src for msm8974 was introduced into the MMCC by
commit d8b212014e69 ("clk: qcom: Add support for MSM8974's multimedia
clock controller (MMCC)") to ensure that all of the clocks for
this platform are documented upstream. This clock actually belongs
on the RPM. Since then, commit 685dc94b7d8f ("clk: qcom: smd-rpmcc:
Add msm8974 clocks") was introduced, which contains the proper
definition for gfx3d_clk_src. Let's drop the definition from the
mmcc and register the clock with the rpm instead.

This change was tested on a Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
 drivers/clk/qcom/clk-smd-rpm.c  |  2 ++
 drivers/clk/qcom/mmcc-msm8974.c | 13 -------------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
index 60aae7543608..2db31dbe47e9 100644
--- a/drivers/clk/qcom/clk-smd-rpm.c
+++ b/drivers/clk/qcom/clk-smd-rpm.c
@@ -486,6 +486,8 @@ static struct clk_smd_rpm *msm8974_clks[] = {
 	[RPM_SMD_MMSSNOC_AHB_CLK]	= &msm8974_mmssnoc_ahb_clk,
 	[RPM_SMD_MMSSNOC_AHB_A_CLK]	= &msm8974_mmssnoc_ahb_a_clk,
 	[RPM_SMD_BIMC_CLK]		= &msm8974_bimc_clk,
+	[RPM_SMD_GFX3D_CLK_SRC]		= &msm8974_gfx3d_clk_src,
+	[RPM_SMD_GFX3D_A_CLK_SRC]	= &msm8974_gfx3d_a_clk_src,
 	[RPM_SMD_BIMC_A_CLK]		= &msm8974_bimc_a_clk,
 	[RPM_SMD_OCMEMGX_CLK]		= &msm8974_ocmemgx_clk,
 	[RPM_SMD_OCMEMGX_A_CLK]		= &msm8974_ocmemgx_a_clk,
diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
index bcb0a397ef91..015426262d08 100644
--- a/drivers/clk/qcom/mmcc-msm8974.c
+++ b/drivers/clk/qcom/mmcc-msm8974.c
@@ -452,18 +452,6 @@ static struct clk_rcg2 mdp_clk_src = {
 	},
 };
 
-static struct clk_rcg2 gfx3d_clk_src = {
-	.cmd_rcgr = 0x4000,
-	.hid_width = 5,
-	.parent_map = mmcc_xo_mmpll0_1_2_gpll0_map,
-	.clkr.hw.init = &(struct clk_init_data){
-		.name = "gfx3d_clk_src",
-		.parent_names = mmcc_xo_mmpll0_1_2_gpll0,
-		.num_parents = 5,
-		.ops = &clk_rcg2_ops,
-	},
-};
-
 static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk[] = {
 	F(75000000, P_GPLL0, 8, 0, 0),
 	F(133330000, P_GPLL0, 4.5, 0, 0),
@@ -2411,7 +2399,6 @@ static struct clk_regmap *mmcc_msm8974_clocks[] = {
 	[VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
 	[VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
 	[MDP_CLK_SRC] = &mdp_clk_src.clkr,
-	[GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
 	[JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
 	[JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr,
 	[JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr,
-- 
2.21.0


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

* Re: [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm
  2019-11-15 12:39 [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm Brian Masney
@ 2019-11-16 16:51 ` Bjorn Andersson
  2019-11-16 18:54 ` Brian Masney
  2019-12-19  5:28 ` Stephen Boyd
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2019-11-16 16:51 UTC (permalink / raw)
  To: Brian Masney
  Cc: sboyd, mturquette, agross, linux-arm-msm, linux-clk,
	linux-kernel, jonathan

On Fri 15 Nov 04:39 PST 2019, Brian Masney wrote:

> gfx3d_clk_src for msm8974 was introduced into the MMCC by
> commit d8b212014e69 ("clk: qcom: Add support for MSM8974's multimedia
> clock controller (MMCC)") to ensure that all of the clocks for
> this platform are documented upstream. This clock actually belongs
> on the RPM. Since then, commit 685dc94b7d8f ("clk: qcom: smd-rpmcc:
> Add msm8974 clocks") was introduced, which contains the proper
> definition for gfx3d_clk_src. Let's drop the definition from the
> mmcc and register the clock with the rpm instead.
> 
> This change was tested on a Nexus 5 (hammerhead) phone.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/clk/qcom/clk-smd-rpm.c  |  2 ++
>  drivers/clk/qcom/mmcc-msm8974.c | 13 -------------
>  2 files changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
> index 60aae7543608..2db31dbe47e9 100644
> --- a/drivers/clk/qcom/clk-smd-rpm.c
> +++ b/drivers/clk/qcom/clk-smd-rpm.c
> @@ -486,6 +486,8 @@ static struct clk_smd_rpm *msm8974_clks[] = {
>  	[RPM_SMD_MMSSNOC_AHB_CLK]	= &msm8974_mmssnoc_ahb_clk,
>  	[RPM_SMD_MMSSNOC_AHB_A_CLK]	= &msm8974_mmssnoc_ahb_a_clk,
>  	[RPM_SMD_BIMC_CLK]		= &msm8974_bimc_clk,
> +	[RPM_SMD_GFX3D_CLK_SRC]		= &msm8974_gfx3d_clk_src,
> +	[RPM_SMD_GFX3D_A_CLK_SRC]	= &msm8974_gfx3d_a_clk_src,
>  	[RPM_SMD_BIMC_A_CLK]		= &msm8974_bimc_a_clk,
>  	[RPM_SMD_OCMEMGX_CLK]		= &msm8974_ocmemgx_clk,
>  	[RPM_SMD_OCMEMGX_A_CLK]		= &msm8974_ocmemgx_a_clk,
> diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
> index bcb0a397ef91..015426262d08 100644
> --- a/drivers/clk/qcom/mmcc-msm8974.c
> +++ b/drivers/clk/qcom/mmcc-msm8974.c
> @@ -452,18 +452,6 @@ static struct clk_rcg2 mdp_clk_src = {
>  	},
>  };
>  
> -static struct clk_rcg2 gfx3d_clk_src = {
> -	.cmd_rcgr = 0x4000,
> -	.hid_width = 5,
> -	.parent_map = mmcc_xo_mmpll0_1_2_gpll0_map,
> -	.clkr.hw.init = &(struct clk_init_data){
> -		.name = "gfx3d_clk_src",
> -		.parent_names = mmcc_xo_mmpll0_1_2_gpll0,
> -		.num_parents = 5,
> -		.ops = &clk_rcg2_ops,
> -	},
> -};
> -
>  static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk[] = {
>  	F(75000000, P_GPLL0, 8, 0, 0),
>  	F(133330000, P_GPLL0, 4.5, 0, 0),
> @@ -2411,7 +2399,6 @@ static struct clk_regmap *mmcc_msm8974_clocks[] = {
>  	[VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
>  	[VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
>  	[MDP_CLK_SRC] = &mdp_clk_src.clkr,
> -	[GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
>  	[JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
>  	[JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr,
>  	[JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr,
> -- 
> 2.21.0
> 

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

* Re: [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm
  2019-11-15 12:39 [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm Brian Masney
  2019-11-16 16:51 ` Bjorn Andersson
@ 2019-11-16 18:54 ` Brian Masney
  2019-11-17  1:27   ` Stephen Boyd
  2019-12-19  5:28 ` Stephen Boyd
  2 siblings, 1 reply; 6+ messages in thread
From: Brian Masney @ 2019-11-16 18:54 UTC (permalink / raw)
  To: sboyd
  Cc: mturquette, agross, linux-arm-msm, linux-clk, linux-kernel,
	bjorn.andersson, jonathan

On Fri, Nov 15, 2019 at 07:39:31AM -0500, Brian Masney wrote:
> gfx3d_clk_src for msm8974 was introduced into the MMCC by
> commit d8b212014e69 ("clk: qcom: Add support for MSM8974's multimedia
> clock controller (MMCC)") to ensure that all of the clocks for
> this platform are documented upstream. This clock actually belongs
> on the RPM. Since then, commit 685dc94b7d8f ("clk: qcom: smd-rpmcc:
> Add msm8974 clocks") was introduced, which contains the proper
> definition for gfx3d_clk_src. Let's drop the definition from the
> mmcc and register the clock with the rpm instead.
> 
> This change was tested on a Nexus 5 (hammerhead) phone.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> ---
>  drivers/clk/qcom/clk-smd-rpm.c  |  2 ++
>  drivers/clk/qcom/mmcc-msm8974.c | 13 -------------
>  2 files changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
> index 60aae7543608..2db31dbe47e9 100644
> --- a/drivers/clk/qcom/clk-smd-rpm.c
> +++ b/drivers/clk/qcom/clk-smd-rpm.c
> @@ -486,6 +486,8 @@ static struct clk_smd_rpm *msm8974_clks[] = {
>  	[RPM_SMD_MMSSNOC_AHB_CLK]	= &msm8974_mmssnoc_ahb_clk,
>  	[RPM_SMD_MMSSNOC_AHB_A_CLK]	= &msm8974_mmssnoc_ahb_a_clk,
>  	[RPM_SMD_BIMC_CLK]		= &msm8974_bimc_clk,
> +	[RPM_SMD_GFX3D_CLK_SRC]		= &msm8974_gfx3d_clk_src,
> +	[RPM_SMD_GFX3D_A_CLK_SRC]	= &msm8974_gfx3d_a_clk_src,
>  	[RPM_SMD_BIMC_A_CLK]		= &msm8974_bimc_a_clk,
>  	[RPM_SMD_OCMEMGX_CLK]		= &msm8974_ocmemgx_clk,
>  	[RPM_SMD_OCMEMGX_A_CLK]		= &msm8974_ocmemgx_a_clk,
> diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
> index bcb0a397ef91..015426262d08 100644
> --- a/drivers/clk/qcom/mmcc-msm8974.c
> +++ b/drivers/clk/qcom/mmcc-msm8974.c
> @@ -452,18 +452,6 @@ static struct clk_rcg2 mdp_clk_src = {
>  	},
>  };
>  
> -static struct clk_rcg2 gfx3d_clk_src = {
> -	.cmd_rcgr = 0x4000,
> -	.hid_width = 5,
> -	.parent_map = mmcc_xo_mmpll0_1_2_gpll0_map,
> -	.clkr.hw.init = &(struct clk_init_data){
> -		.name = "gfx3d_clk_src",
> -		.parent_names = mmcc_xo_mmpll0_1_2_gpll0,
> -		.num_parents = 5,
> -		.ops = &clk_rcg2_ops,
> -	},
> -};
> -
>  static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk[] = {
>  	F(75000000, P_GPLL0, 8, 0, 0),
>  	F(133330000, P_GPLL0, 4.5, 0, 0),
> @@ -2411,7 +2399,6 @@ static struct clk_regmap *mmcc_msm8974_clocks[] = {
>  	[VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
>  	[VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
>  	[MDP_CLK_SRC] = &mdp_clk_src.clkr,
> -	[GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
>  	[JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
>  	[JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr,
>  	[JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr,

I just realized that I also need to remove the GFX3D_CLK_SRC #define
from include/dt-bindings/clock/qcom,mmcc-msm8974.h. I'll send out a v2
tomorrow evening.

Brian

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

* Re: [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm
  2019-11-16 18:54 ` Brian Masney
@ 2019-11-17  1:27   ` Stephen Boyd
  2019-11-17  1:41     ` Brian Masney
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2019-11-17  1:27 UTC (permalink / raw)
  To: Brian Masney
  Cc: mturquette, agross, linux-arm-msm, linux-clk, linux-kernel,
	bjorn.andersson, jonathan

Quoting Brian Masney (2019-11-16 10:54:57)
> > diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
> > index bcb0a397ef91..015426262d08 100644
> > --- a/drivers/clk/qcom/mmcc-msm8974.c
> > +++ b/drivers/clk/qcom/mmcc-msm8974.c
> > @@ -2411,7 +2399,6 @@ static struct clk_regmap *mmcc_msm8974_clocks[] = {
> >       [VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
> >       [VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
> >       [MDP_CLK_SRC] = &mdp_clk_src.clkr,
> > -     [GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
> >       [JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
> >       [JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr,
> >       [JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr,
> 
> I just realized that I also need to remove the GFX3D_CLK_SRC #define
> from include/dt-bindings/clock/qcom,mmcc-msm8974.h. I'll send out a v2
> tomorrow evening.
> 

Please don't change the binding. In reality the define will never be
used but also in reality the clk exists, so it's fine to leave it in the
binding.


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

* Re: [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm
  2019-11-17  1:27   ` Stephen Boyd
@ 2019-11-17  1:41     ` Brian Masney
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Masney @ 2019-11-17  1:41 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: mturquette, agross, linux-arm-msm, linux-clk, linux-kernel,
	bjorn.andersson, jonathan

On Sat, Nov 16, 2019 at 05:27:36PM -0800, Stephen Boyd wrote:
> Quoting Brian Masney (2019-11-16 10:54:57)
> > > diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
> > > index bcb0a397ef91..015426262d08 100644
> > > --- a/drivers/clk/qcom/mmcc-msm8974.c
> > > +++ b/drivers/clk/qcom/mmcc-msm8974.c
> > > @@ -2411,7 +2399,6 @@ static struct clk_regmap *mmcc_msm8974_clocks[] = {
> > >       [VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
> > >       [VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
> > >       [MDP_CLK_SRC] = &mdp_clk_src.clkr,
> > > -     [GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
> > >       [JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
> > >       [JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr,
> > >       [JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr,
> > 
> > I just realized that I also need to remove the GFX3D_CLK_SRC #define
> > from include/dt-bindings/clock/qcom,mmcc-msm8974.h. I'll send out a v2
> > tomorrow evening.
> > 
> 
> Please don't change the binding. In reality the define will never be
> used but also in reality the clk exists, so it's fine to leave it in the
> binding.

OK, that makes sense. Thanks for your help on this.

Brian

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

* Re: [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm
  2019-11-15 12:39 [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm Brian Masney
  2019-11-16 16:51 ` Bjorn Andersson
  2019-11-16 18:54 ` Brian Masney
@ 2019-12-19  5:28 ` Stephen Boyd
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2019-12-19  5:28 UTC (permalink / raw)
  To: Brian Masney
  Cc: mturquette, agross, linux-arm-msm, linux-clk, linux-kernel,
	bjorn.andersson, jonathan

Quoting Brian Masney (2019-11-15 04:39:31)
> gfx3d_clk_src for msm8974 was introduced into the MMCC by
> commit d8b212014e69 ("clk: qcom: Add support for MSM8974's multimedia
> clock controller (MMCC)") to ensure that all of the clocks for
> this platform are documented upstream. This clock actually belongs
> on the RPM. Since then, commit 685dc94b7d8f ("clk: qcom: smd-rpmcc:
> Add msm8974 clocks") was introduced, which contains the proper
> definition for gfx3d_clk_src. Let's drop the definition from the
> mmcc and register the clock with the rpm instead.
> 
> This change was tested on a Nexus 5 (hammerhead) phone.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> ---

Applied to clk-next


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

end of thread, other threads:[~2019-12-19  5:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 12:39 [PATCH] clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm Brian Masney
2019-11-16 16:51 ` Bjorn Andersson
2019-11-16 18:54 ` Brian Masney
2019-11-17  1:27   ` Stephen Boyd
2019-11-17  1:41     ` Brian Masney
2019-12-19  5:28 ` 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).