[v4,09/24] PM / devfreq: tegra30: Reset boosting on startup
diff mbox series

Message ID 20190707223303.6755-10-digetx@gmail.com
State New
Headers show
Series
  • More improvements for Tegra30 devfreq driver
Related show

Commit Message

Dmitry Osipenko July 7, 2019, 10:32 p.m. UTC
Governor could be stopped while boosting is active. We have assumption
that everything is reset on governor's restart, including the boosting
value, which was missed.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/devfreq/tegra30-devfreq.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Chanwoo Choi July 16, 2019, 12:13 p.m. UTC | #1
On 19. 7. 8. 오전 7:32, Dmitry Osipenko wrote:
> Governor could be stopped while boosting is active. We have assumption
> that everything is reset on governor's restart, including the boosting
> value, which was missed.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/devfreq/tegra30-devfreq.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
> index d5d04c25023b..32fe95458ee7 100644
> --- a/drivers/devfreq/tegra30-devfreq.c
> +++ b/drivers/devfreq/tegra30-devfreq.c
> @@ -536,6 +536,9 @@ static void tegra_actmon_configure_device(struct tegra_devfreq *tegra,
>  {
>  	u32 val = 0, target_freq;
>  
> +	/* we don't want boosting on restart */

nitpick.
I think that following comment is proper in my case.
In my case, I think 'we' expression is not good

	/* Reset the boost frequency on restart */

> +	dev->boost_freq = 0;
> +
>  	target_freq = clk_get_rate(tegra->emc_clock) / KHZ;
>  	dev->avg_count = target_freq * ACTMON_SAMPLING_PERIOD;
>  	device_writel(dev, dev->avg_count, ACTMON_DEV_INIT_AVG);
> 

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Dmitry Osipenko July 16, 2019, 1:19 p.m. UTC | #2
16.07.2019 15:13, Chanwoo Choi пишет:
> On 19. 7. 8. 오전 7:32, Dmitry Osipenko wrote:
>> Governor could be stopped while boosting is active. We have assumption
>> that everything is reset on governor's restart, including the boosting
>> value, which was missed.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  drivers/devfreq/tegra30-devfreq.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
>> index d5d04c25023b..32fe95458ee7 100644
>> --- a/drivers/devfreq/tegra30-devfreq.c
>> +++ b/drivers/devfreq/tegra30-devfreq.c
>> @@ -536,6 +536,9 @@ static void tegra_actmon_configure_device(struct tegra_devfreq *tegra,
>>  {
>>  	u32 val = 0, target_freq;
>>  
>> +	/* we don't want boosting on restart */
> 
> nitpick.
> I think that following comment is proper in my case.
> In my case, I think 'we' expression is not good
> 
> 	/* Reset the boost frequency on restart */

Okay, I'll change the wording.

>> +	dev->boost_freq = 0;
>> +
>>  	target_freq = clk_get_rate(tegra->emc_clock) / KHZ;
>>  	dev->avg_count = target_freq * ACTMON_SAMPLING_PERIOD;
>>  	device_writel(dev, dev->avg_count, ACTMON_DEV_INIT_AVG);
>>
> 
> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> 
>

Patch
diff mbox series

diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
index d5d04c25023b..32fe95458ee7 100644
--- a/drivers/devfreq/tegra30-devfreq.c
+++ b/drivers/devfreq/tegra30-devfreq.c
@@ -536,6 +536,9 @@  static void tegra_actmon_configure_device(struct tegra_devfreq *tegra,
 {
 	u32 val = 0, target_freq;
 
+	/* we don't want boosting on restart */
+	dev->boost_freq = 0;
+
 	target_freq = clk_get_rate(tegra->emc_clock) / KHZ;
 	dev->avg_count = target_freq * ACTMON_SAMPLING_PERIOD;
 	device_writel(dev, dev->avg_count, ACTMON_DEV_INIT_AVG);