All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	MyungJoo Ham
	<myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Kyungmin Park
	<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Jonathan Hunter
	<jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Michael Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Stephen Boyd <sboyd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1 3/5] PM / devfreq: tegra20: Use clk_round_rate_unboundly()
Date: Wed, 1 Apr 2020 08:22:30 +0900	[thread overview]
Message-ID: <8e62e4ac-081c-a1ac-f0a9-b4e882fcd3b5@samsung.com> (raw)
In-Reply-To: <20200330231617.17079-4-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi Dmitry,

On 3/31/20 8:16 AM, Dmitry Osipenko wrote:
> The clk_round_rate() doesn't work for us properly if clock rate is bounded
> by a min/max rate that is requested by some other clk-user because we're
> building devfreq's OPP table based on the rounding.
> 
> In particular this becomes a problem if display driver is probed earlier
> than devfreq, and thus, display adds a memory bandwidth request using
> interconnect API, which results in a minimum clock-rate being set for
> the memory clk. In a result, the lowest devfreq OPP rate is getting
> limited to the minimum rate imposed by the display driver.
> 
> Let's use new clk_round_rate_unboundly() that resolves the problem by
> rounding clock rate without taking into account min/max limits imposed by
> active clk users.
> 
> Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/devfreq/tegra20-devfreq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/devfreq/tegra20-devfreq.c b/drivers/devfreq/tegra20-devfreq.c
> index ff82bac9ee4e..1bb10ef11dfe 100644
> --- a/drivers/devfreq/tegra20-devfreq.c
> +++ b/drivers/devfreq/tegra20-devfreq.c
> @@ -149,10 +149,10 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
>  
>  	tegra->regs = mc->regs;
>  
> -	max_rate = clk_round_rate(tegra->emc_clock, ULONG_MAX);
> +	max_rate = clk_round_rate_unboundly(tegra->emc_clock, ULONG_MAX);
>  
>  	for (rate = 0; rate <= max_rate; rate++) {
> -		rate = clk_round_rate(tegra->emc_clock, rate);
> +		rate = clk_round_rate_unboundly(tegra->emc_clock, rate);
>  
>  		err = dev_pm_opp_add(&pdev->dev, rate, 0);
>  		if (err) {
> 

Firstly, patch1 have to be reviewed for this patch.
I have no any objection. It looks good to me.

If patch1 get the confirmation from clock maintainer,
feel free to add my acked tag:
Acked-by: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

WARNING: multiple messages have this Message-ID (diff)
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 3/5] PM / devfreq: tegra20: Use clk_round_rate_unboundly()
Date: Wed, 1 Apr 2020 08:22:30 +0900	[thread overview]
Message-ID: <8e62e4ac-081c-a1ac-f0a9-b4e882fcd3b5@samsung.com> (raw)
In-Reply-To: <20200330231617.17079-4-digetx@gmail.com>

Hi Dmitry,

On 3/31/20 8:16 AM, Dmitry Osipenko wrote:
> The clk_round_rate() doesn't work for us properly if clock rate is bounded
> by a min/max rate that is requested by some other clk-user because we're
> building devfreq's OPP table based on the rounding.
> 
> In particular this becomes a problem if display driver is probed earlier
> than devfreq, and thus, display adds a memory bandwidth request using
> interconnect API, which results in a minimum clock-rate being set for
> the memory clk. In a result, the lowest devfreq OPP rate is getting
> limited to the minimum rate imposed by the display driver.
> 
> Let's use new clk_round_rate_unboundly() that resolves the problem by
> rounding clock rate without taking into account min/max limits imposed by
> active clk users.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/devfreq/tegra20-devfreq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/devfreq/tegra20-devfreq.c b/drivers/devfreq/tegra20-devfreq.c
> index ff82bac9ee4e..1bb10ef11dfe 100644
> --- a/drivers/devfreq/tegra20-devfreq.c
> +++ b/drivers/devfreq/tegra20-devfreq.c
> @@ -149,10 +149,10 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
>  
>  	tegra->regs = mc->regs;
>  
> -	max_rate = clk_round_rate(tegra->emc_clock, ULONG_MAX);
> +	max_rate = clk_round_rate_unboundly(tegra->emc_clock, ULONG_MAX);
>  
>  	for (rate = 0; rate <= max_rate; rate++) {
> -		rate = clk_round_rate(tegra->emc_clock, rate);
> +		rate = clk_round_rate_unboundly(tegra->emc_clock, rate);
>  
>  		err = dev_pm_opp_add(&pdev->dev, rate, 0);
>  		if (err) {
> 

Firstly, patch1 have to be reviewed for this patch.
I have no any objection. It looks good to me.

If patch1 get the confirmation from clock maintainer,
feel free to add my acked tag:
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

  parent reply	other threads:[~2020-03-31 23:22 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 23:16 [PATCH v1 0/5] NVIDIA Tegra devfreq drivers improvements Dmitry Osipenko
2020-03-30 23:16 ` [PATCH v1 1/5] PM / devfreq: tegra: Add Dmitry as a maintainer Dmitry Osipenko
     [not found]   ` <20200330231617.17079-2-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-31 23:13     ` Chanwoo Choi
2020-03-31 23:13       ` Chanwoo Choi
     [not found]       ` <db4883d4-18b7-238a-798b-ad45aad978fc-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2020-04-01 18:52         ` Dmitry Osipenko
2020-04-01 18:52           ` Dmitry Osipenko
2020-03-30 23:16 ` [PATCH v1 4/5] PM / devfreq: tegra30: Use clk_round_rate_unboundly() Dmitry Osipenko
2020-03-31 23:22   ` Chanwoo Choi
     [not found]     ` <147b571a-bae1-8a58-942c-579a5297299b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2020-03-31 23:23       ` Chanwoo Choi
2020-03-31 23:23         ` Chanwoo Choi
     [not found] ` <20200330231617.17079-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-30 23:16   ` [PATCH v1 2/5] clk: Introduce clk_round_rate_unboundly() Dmitry Osipenko
2020-03-30 23:16     ` Dmitry Osipenko
     [not found]     ` <20200330231617.17079-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-04-02  0:33       ` Michał Mirosław
2020-04-02  0:33         ` Michał Mirosław
2020-04-02 14:21         ` Dmitry Osipenko
2020-05-27  5:55       ` Stephen Boyd
2020-05-27  5:55         ` Stephen Boyd
     [not found]         ` <159055894944.88029.2029223648098859689-n1Xw8LXHxjTHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>
2020-05-27 17:57           ` Dmitry Osipenko
2020-05-27 17:57             ` Dmitry Osipenko
     [not found]             ` <3fcac59c-7a37-d4af-9d12-710d7af05845-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-05-28  0:38               ` Stephen Boyd
2020-05-28  0:38                 ` Stephen Boyd
2020-05-27  5:57       ` Stephen Boyd
2020-05-27  5:57         ` Stephen Boyd
2020-03-30 23:16   ` [PATCH v1 3/5] PM / devfreq: tegra20: Use clk_round_rate_unboundly() Dmitry Osipenko
2020-03-30 23:16     ` Dmitry Osipenko
     [not found]     ` <20200330231617.17079-4-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-31 23:22       ` Chanwoo Choi [this message]
2020-03-31 23:22         ` Chanwoo Choi
2020-03-31 23:23         ` Chanwoo Choi
2020-03-30 23:16   ` [PATCH v1 5/5] PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting Dmitry Osipenko
2020-03-30 23:16     ` Dmitry Osipenko
2020-03-31 23:29     ` Chanwoo Choi
     [not found]       ` <afcc9f80-c102-da42-8f7f-9b66417a9d4d-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2020-04-01 18:53         ` Dmitry Osipenko
2020-04-01 18:53           ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e62e4ac-081c-a1ac-f0a9-b4e882fcd3b5@samsung.com \
    --to=cw00.choi-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=sboyd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.