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


Groups > linux.kernel > #1491106 > unrolled thread

[PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399

Started byElaine Zhang <zhangqing@rock-chips.com>
First post2016-09-26 09:30 +0200
Last post2016-09-26 17:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399 Elaine Zhang <zhangqing@rock-chips.com> - 2016-09-26 09:30 +0200
    Re: [PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT  for RK3399 Doug Anderson <dianders@chromium.org> - 2016-09-26 17:20 +0200
      Re: [PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399 Heiko Stuebner <heiko@sntech.de> - 2016-09-26 17:30 +0200

#1491106 — [PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399

FromElaine Zhang <zhangqing@rock-chips.com>
Date2016-09-26 09:30 +0200
Subject[PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399
Message-ID<slywp-UK-23@gated-at.bofh.it>
According to the advice of the IC,
setting the PMU_GPU_PWRDW/PWRUP_CNT regs 6 cycel(250ns) for RK3399 SOC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
 drivers/soc/rockchip/pm_domains.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 7acd1517dd37..247dd6f6994a 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -722,11 +722,11 @@ static const struct rockchip_pmu_info rk3399_pmu = {
 	.idle_offset = 0x64,
 	.ack_offset = 0x68,
 
-	.core_pwrcnt_offset = 0x9c,
-	.gpu_pwrcnt_offset = 0xa4,
+	.core_pwrcnt_offset = 0xac,
+	.gpu_pwrcnt_offset = 0xac,
 
-	.core_power_transition_time = 24,
-	.gpu_power_transition_time = 24,
+	.core_power_transition_time = 6, /* 0.25us */
+	.gpu_power_transition_time = 6, /* 0.25us */
 
 	.num_domains = ARRAY_SIZE(rk3399_pm_domains),
 	.domain_info = rk3399_pm_domains,
-- 
1.9.1

[toc] | [next] | [standalone]


#1491347 — Re: [PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399

FromDoug Anderson <dianders@chromium.org>
Date2016-09-26 17:20 +0200
SubjectRe: [PATCH] power-domain: rockchip: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399
Message-ID<slFRg-5rZ-37@gated-at.bofh.it>
In reply to#1491106
Hi,

On Mon, Sep 26, 2016 at 12:25 AM, Elaine Zhang <zhangqing@rock-chips.com> wrote:
> According to the advice of the IC,
> setting the PMU_GPU_PWRDW/PWRUP_CNT regs 6 cycel(250ns) for RK3399 SOC.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
>  drivers/soc/rockchip/pm_domains.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

This has problems on several levels.  Please see
<https://patchwork.kernel.org/patch/9288607/> for some context.

Note that ATF changes have landed, so my patch could probably land at any time.


> diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
> index 7acd1517dd37..247dd6f6994a 100644
> --- a/drivers/soc/rockchip/pm_domains.c
> +++ b/drivers/soc/rockchip/pm_domains.c
> @@ -722,11 +722,11 @@ static const struct rockchip_pmu_info rk3399_pmu = {
>         .idle_offset = 0x64,
>         .ack_offset = 0x68,
>
> -       .core_pwrcnt_offset = 0x9c,
> -       .gpu_pwrcnt_offset = 0xa4,
> +       .core_pwrcnt_offset = 0xac,
> +       .gpu_pwrcnt_offset = 0xac,

One specific thing that's wrong is that you're setting both the GPU
and the Core to the same register address, which is wrong.  You're
changing them from 0x9c (little) and 0xa4 (big) to 0xac (gpu) and 0xac
(gpu, again)

A second specific thing that is wrong is that there are 3 relevant
sets of counts in this CPU: big, little, and cpu.  This code only
handles two.  As per <https://patchwork.kernel.org/patch/9288607/>,
rather than fixing this code I think this belongs in ATF to manage.


> -       .core_power_transition_time = 24,
> -       .gpu_power_transition_time = 24,
> +       .core_power_transition_time = 6, /* 0.25us */
> +       .gpu_power_transition_time = 6, /* 0.25us */

If these transition times are actually good, please work with Caesar
to get a patch to ATF.  Please double-check with Xing Zheng to make
sure that suspend/resume isn't affected.

-Doug

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


#1491350

FromHeiko Stuebner <heiko@sntech.de>
Date2016-09-26 17:30 +0200
Message-ID<slG0V-5v6-5@gated-at.bofh.it>
In reply to#1491347
Am Montag, 26. September 2016, 08:17:54 CEST schrieb Doug Anderson:
> Hi,
> 
> On Mon, Sep 26, 2016 at 12:25 AM, Elaine Zhang <zhangqing@rock-chips.com> 
wrote:
> > According to the advice of the IC,
> > setting the PMU_GPU_PWRDW/PWRUP_CNT regs 6 cycel(250ns) for RK3399 SOC.
> > 
> > Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> > ---
> > 
> >  drivers/soc/rockchip/pm_domains.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> This has problems on several levels.  Please see
> <https://patchwork.kernel.org/patch/9288607/> for some context.
> 
> Note that ATF changes have landed, so my patch could probably land at any
> time.

thanks for the heads up. As before I still agree with you that this is better 
done in the ATF, so I guess I can merge your other patch for 4.10 now.


Heiko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web