Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459039 > unrolled thread

[v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical

Started byChris Zhong <zyw@rock-chips.com>
First post2016-08-09 20:10 +0200
Last post2016-08-12 02:40 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical Chris Zhong <zyw@rock-chips.com> - 2016-08-09 20:10 +0200
    Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical Guenter Roeck <groeck@google.com> - 2016-08-11 00:20 +0200
      Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as  critical Xing Zheng <zhengxing@rock-chips.com> - 2016-08-11 04:50 +0200
      Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical Heiko Stübner <heiko@sntech.de> - 2016-08-11 09:10 +0200
    Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical Heiko Stübner <heiko@sntech.de> - 2016-08-12 00:20 +0200
      Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as  critical Chris Zhong <zyw@rock-chips.com> - 2016-08-12 02:40 +0200

#1459039 — [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical

FromChris Zhong <zyw@rock-chips.com>
Date2016-08-09 20:10 +0200
Subject[v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical
Message-ID<s4jDs-2Cu-11@gated-at.bofh.it>
Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10. With
this modification, the aclk_vio_noc should be put into critical list,
since it is required by VOP.
And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc,
pclk_hdcp_noc. Mark them as critical to avoid someone close them.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---

 drivers/clk/rockchip/clk-rk3399.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
index b173711a..676b017 100644
--- a/drivers/clk/rockchip/clk-rk3399.c
+++ b/drivers/clk/rockchip/clk-rk3399.c
@@ -1073,7 +1073,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {
 	/* vio */
 	COMPOSITE(ACLK_VIO, "aclk_vio", mux_pll_src_cpll_gpll_ppll_p, CLK_IGNORE_UNUSED,
 			RK3399_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
-			RK3399_CLKGATE_CON(11), 10, GFLAGS),
+			RK3399_CLKGATE_CON(11), 0, GFLAGS),
 	COMPOSITE_NOMUX(PCLK_VIO, "pclk_vio", "aclk_vio", 0,
 			RK3399_CLKSEL_CON(43), 0, 5, DFLAGS,
 			RK3399_CLKGATE_CON(11), 1, GFLAGS),
@@ -1470,6 +1470,9 @@ static const char *const rk3399_cru_critical_clocks[] __initconst = {
 	"aclk_cci_pre",
 	"aclk_gic",
 	"aclk_gic_noc",
+	"aclk_hdcp_noc",
+	"hclk_hdcp_noc",
+	"pclk_hdcp_noc",
 	"pclk_perilp0",
 	"pclk_perilp0",
 	"hclk_perilp0",
@@ -1489,6 +1492,7 @@ static const char *const rk3399_cru_critical_clocks[] __initconst = {
 	"gpll_hclk_perilp1_src",
 	"gpll_aclk_perilp0_src",
 	"gpll_aclk_perihp_src",
+	"aclk_vio_noc",
 };
 
 static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
-- 
1.9.1

[toc] | [next] | [standalone]


#1460045

FromGuenter Roeck <groeck@google.com>
Date2016-08-11 00:20 +0200
Message-ID<s4K0V-2GI-3@gated-at.bofh.it>
In reply to#1459039
On Tue, Aug 9, 2016 at 11:02 AM, Chris Zhong <zyw@rock-chips.com> wrote:
> Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10. With
> this modification, the aclk_vio_noc should be put into critical list,
> since it is required by VOP.
> And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc,
> pclk_hdcp_noc. Mark them as critical to avoid someone close them.
>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> ---
>
>  drivers/clk/rockchip/clk-rk3399.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
> index b173711a..676b017 100644
> --- a/drivers/clk/rockchip/clk-rk3399.c
> +++ b/drivers/clk/rockchip/clk-rk3399.c
> @@ -1073,7 +1073,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {
>         /* vio */
>         COMPOSITE(ACLK_VIO, "aclk_vio", mux_pll_src_cpll_gpll_ppll_p, CLK_IGNORE_UNUSED,
>                         RK3399_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
> -                       RK3399_CLKGATE_CON(11), 10, GFLAGS),
> +                       RK3399_CLKGATE_CON(11), 0, GFLAGS),
>         COMPOSITE_NOMUX(PCLK_VIO, "pclk_vio", "aclk_vio", 0,
>                         RK3399_CLKSEL_CON(43), 0, 5, DFLAGS,
>                         RK3399_CLKGATE_CON(11), 1, GFLAGS),
> @@ -1470,6 +1470,9 @@ static const char *const rk3399_cru_critical_clocks[] __initconst = {
>         "aclk_cci_pre",
>         "aclk_gic",
>         "aclk_gic_noc",
> +       "aclk_hdcp_noc",
> +       "hclk_hdcp_noc",
> +       "pclk_hdcp_noc",
>         "pclk_perilp0",
>         "pclk_perilp0",
>         "hclk_perilp0",
> @@ -1489,6 +1492,7 @@ static const char *const rk3399_cru_critical_clocks[] __initconst = {
>         "gpll_hclk_perilp1_src",
>         "gpll_aclk_perilp0_src",
>         "gpll_aclk_perihp_src",
> +       "aclk_vio_noc",

I think there was a previous comment suggesting that this clock should
be handled differently. Has this been resolved ?

Otherwise

Reviewed-by: Guenter Roeck <groeck@chromium.org>

>  };
>
>  static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
> --
> 1.9.1
>

[toc] | [prev] | [next] | [standalone]


#1460148 — Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical

FromXing Zheng <zhengxing@rock-chips.com>
Date2016-08-11 04:50 +0200
SubjectRe: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical
Message-ID<s4Oee-5jA-5@gated-at.bofh.it>
In reply to#1460045
Chris,

On 2016年08月11日 06:14, Guenter Roeck wrote:
> On Tue, Aug 9, 2016 at 11:02 AM, Chris Zhong <zyw@rock-chips.com> wrote:
>> Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10. With
>> this modification, the aclk_vio_noc should be put into critical list,
>> since it is required by VOP.
>> And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc,
>> pclk_hdcp_noc. Mark them as critical to avoid someone close them.
>>
>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
>> ---
>>
>>   drivers/clk/rockchip/clk-rk3399.c | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
>> index b173711a..676b017 100644
>> --- a/drivers/clk/rockchip/clk-rk3399.c
>> +++ b/drivers/clk/rockchip/clk-rk3399.c
>> @@ -1073,7 +1073,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {
>>          /* vio */
>>          COMPOSITE(ACLK_VIO, "aclk_vio", mux_pll_src_cpll_gpll_ppll_p, CLK_IGNORE_UNUSED,
>>                          RK3399_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
>> -                       RK3399_CLKGATE_CON(11), 10, GFLAGS),
>> +                       RK3399_CLKGATE_CON(11), 0, GFLAGS),
Sorry to broken copy&paste, thanks to fix the incorrect bit.

Reviewed-by: Xing Zheng <zhengxing@rock-chips.com>

Thanks.
>>          COMPOSITE_NOMUX(PCLK_VIO, "pclk_vio", "aclk_vio", 0,
>>                          RK3399_CLKSEL_CON(43), 0, 5, DFLAGS,
>>                          RK3399_CLKGATE_CON(11), 1, GFLAGS),
>> @@ -1470,6 +1470,9 @@ static const char *const rk3399_cru_critical_clocks[] __initconst = {
>>          "aclk_cci_pre",
>>          "aclk_gic",
>>          "aclk_gic_noc",
>> +       "aclk_hdcp_noc",
>> +       "hclk_hdcp_noc",
>> +       "pclk_hdcp_noc",
>>          "pclk_perilp0",
>>          "pclk_perilp0",
>>          "hclk_perilp0",
>> @@ -1489,6 +1492,7 @@ static const char *const rk3399_cru_critical_clocks[] __initconst = {
>>          "gpll_hclk_perilp1_src",
>>          "gpll_aclk_perilp0_src",
>>          "gpll_aclk_perihp_src",
>> +       "aclk_vio_noc",
> I think there was a previous comment suggesting that this clock should
> be handled differently. Has this been resolved ?
>
> Otherwise
>
> Reviewed-by: Guenter Roeck <groeck@chromium.org>
>
>>   };
>>
>>   static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
>> --
>> 1.9.1
>>
>
>

-- 
- Xing Zheng

[toc] | [prev] | [next] | [standalone]


#1460208

FromHeiko Stübner <heiko@sntech.de>
Date2016-08-11 09:10 +0200
Message-ID<s4ShP-8tK-21@gated-at.bofh.it>
In reply to#1460045
Am Mittwoch, 10. August 2016, 15:14:06 schrieb Guenter Roeck:
> On Tue, Aug 9, 2016 at 11:02 AM, Chris Zhong <zyw@rock-chips.com> wrote:
> > Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10. With
> > this modification, the aclk_vio_noc should be put into critical list,
> > since it is required by VOP.
> > And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc,
> > pclk_hdcp_noc. Mark them as critical to avoid someone close them.
> > 
> > Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> > ---
> > 
> >  drivers/clk/rockchip/clk-rk3399.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/clk/rockchip/clk-rk3399.c
> > b/drivers/clk/rockchip/clk-rk3399.c index b173711a..676b017 100644
> > --- a/drivers/clk/rockchip/clk-rk3399.c
> > +++ b/drivers/clk/rockchip/clk-rk3399.c
> > @@ -1073,7 +1073,7 @@ static struct rockchip_clk_branch
> > rk3399_clk_branches[] __initdata = {> 
> >         /* vio */
> >         COMPOSITE(ACLK_VIO, "aclk_vio", mux_pll_src_cpll_gpll_ppll_p,
> >         CLK_IGNORE_UNUSED,>         
> >                         RK3399_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
> > 
> > -                       RK3399_CLKGATE_CON(11), 10, GFLAGS),
> > +                       RK3399_CLKGATE_CON(11), 0, GFLAGS),
> > 
> >         COMPOSITE_NOMUX(PCLK_VIO, "pclk_vio", "aclk_vio", 0,
> >         
> >                         RK3399_CLKSEL_CON(43), 0, 5, DFLAGS,
> >                         RK3399_CLKGATE_CON(11), 1, GFLAGS),
> > 
> > @@ -1470,6 +1470,9 @@ static const char *const
> > rk3399_cru_critical_clocks[] __initconst = {> 
> >         "aclk_cci_pre",
> >         "aclk_gic",
> >         "aclk_gic_noc",
> > 
> > +       "aclk_hdcp_noc",
> > +       "hclk_hdcp_noc",
> > +       "pclk_hdcp_noc",
> > 
> >         "pclk_perilp0",
> >         "pclk_perilp0",
> >         "hclk_perilp0",
> > 
> > @@ -1489,6 +1492,7 @@ static const char *const
> > rk3399_cru_critical_clocks[] __initconst = {> 
> >         "gpll_hclk_perilp1_src",
> >         "gpll_aclk_perilp0_src",
> >         "gpll_aclk_perihp_src",
> > 
> > +       "aclk_vio_noc",
> 
> I think there was a previous comment suggesting that this clock should
> be handled differently. Has this been resolved ?

The clock getting handled differently was pclk_grf_vio - aka the GRF part 
needed. This one is the interconnect clock of the vio port (as far as I 
understand that), which we currently don't model at all.
But if we did it would probably handled in some new part but not in the 
graphics drivers.

So all looks well like it is here :-)

Heiko

[toc] | [prev] | [next] | [standalone]


#1460830

FromHeiko Stübner <heiko@sntech.de>
Date2016-08-12 00:20 +0200
Message-ID<s56uv-1pD-35@gated-at.bofh.it>
In reply to#1459039
Am Dienstag, 9. August 2016, 11:02:33 schrieb Chris Zhong:
> Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10. With
> this modification, the aclk_vio_noc should be put into critical list,
> since it is required by VOP.
> And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc,
> pclk_hdcp_noc. Mark them as critical to avoid someone close them.
> 
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>

I've split that patch in two and applied them there:
https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.8-clk/fixes&id=a3f457d9636b3f5ae4fc6502cb0c95f60f5e342b
(gate-bit-fix)
https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.9-clk/next&id=54479449c801e46ee2b6ba08e2f19cd810f74f94
(critical clocks)

with the provided Reviewed-bys.


Heiko

[toc] | [prev] | [next] | [standalone]


#1460877 — Re: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical

FromChris Zhong <zyw@rock-chips.com>
Date2016-08-12 02:40 +0200
SubjectRe: [v2 PATCH] clk: rockchip: mark rk3399 hdcp_noc and vio_noc as critical
Message-ID<s58FX-2QI-1@gated-at.bofh.it>
In reply to#1460830
Hi Heiko


On 08/12/2016 06:17 AM, Heiko Stübner wrote:
> Am Dienstag, 9. August 2016, 11:02:33 schrieb Chris Zhong:
>> Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10. With
>> this modification, the aclk_vio_noc should be put into critical list,
>> since it is required by VOP.
>> And the Type-C DP need these clocks: aclk_hdcp_noc, hclk_hdcp_noc,
>> pclk_hdcp_noc. Mark them as critical to avoid someone close them.
>>
>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> I've split that patch in two and applied them there:
> https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.8-clk/fixes&id=a3f457d9636b3f5ae4fc6502cb0c95f60f5e342b
> (gate-bit-fix)
> https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.9-clk/next&id=54479449c801e46ee2b6ba08e2f19cd810f74f94
> (critical clocks)
>
> with the provided Reviewed-bys.
with the "gate-bit-fix" patch, probably someone will find the panel can 
not display, since the aclk_vio_noc would be disabled default, and this 
noc clk is required by VOP.
So, if someone want to pick up "gate-bit-fix", please get the one 
"critical clocks" firstly.

>
>
> Heiko
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web