All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Dmitry Osipenko <digetx@gmail.com>, rafael@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"open list:TEGRA ARCHITECTURE SUPPORT"
	<linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 2/3] thermal/drivers/tegra: Remove get_trend function
Date: Mon, 20 Jun 2022 17:17:09 +0200	[thread overview]
Message-ID: <20db85cb-1d16-3aad-c9b0-0a2a602f20ec@linaro.org> (raw)
In-Reply-To: <6d5b2bfc-f449-668c-8c97-638eb806cb66@gmail.com>

On 18/06/2022 14:44, Dmitry Osipenko wrote:
> 16.06.2022 23:25, Daniel Lezcano пишет:
>> The get_trend function does already what the generic framework does.
>>
>> Remove it.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---

[ ... ]

>>   static void thermal_irq_enable(struct tegra_thermctl_zone *zn)
>>   {
>>   	u32 r;
>> @@ -716,7 +685,6 @@ static int tegra_thermctl_set_trips(void *data, int lo, int hi)
>>   static const struct thermal_zone_of_device_ops tegra_of_thermal_ops = {
>>   	.get_temp = tegra_thermctl_get_temp,
>>   	.set_trip_temp = tegra_thermctl_set_trip_temp,
>> -	.get_trend = tegra_thermctl_get_trend,
>>   	.set_trips = tegra_thermctl_set_trips,
>>   };
>>   
> 
> The framework doesn't use the trip temperature, is it really the same?
> Previously, if temperature was above the trip and was dropping, then it
> was THERMAL_TREND_STABLE instead of THERMAL_TREND_DROPPING.

Actually, the only difference is the temp > trip and the temperature < 
last_temperature. It results in the STABLE trend and the governor does 
nothing.

With the core trend function for the same inputs, temperature < 
last_temperature results in a DROPPING but as temp > trip the 'throttle' 
boolean is true in the governor, and get_next_state() with DROPPING + 
throttle=true, results in nothing because the action happens when 
throttle=false.

All the combinations result at end at the same action from the governor.



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2022-06-20 15:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 20:25 [PATCH 1/3] thermal/drivers/qcom: Remove get_trend function Daniel Lezcano
2022-06-16 20:25 ` [PATCH 2/3] thermal/drivers/tegra: " Daniel Lezcano
2022-06-18 12:44   ` Dmitry Osipenko
2022-06-20 15:17     ` Daniel Lezcano [this message]
2022-06-28  8:41   ` Daniel Lezcano
2022-06-28 11:44     ` Dmitry Osipenko
2022-06-28 15:10       ` Guenter Roeck
2022-06-28 18:43         ` Guenter Roeck
2022-06-29  9:35           ` Dmitry Osipenko
2022-06-29 12:56             ` Guenter Roeck
2022-06-29 20:05   ` Dmitry Osipenko
2022-06-30 10:17     ` Daniel Lezcano
2022-07-28 15:41   ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
2022-06-16 20:25 ` [PATCH 3/3] thermal/drivers/u8500: Remove the " Daniel Lezcano
2022-06-28  8:40   ` Daniel Lezcano
2022-06-28 12:50     ` Linus Walleij
2022-06-30 10:16       ` Daniel Lezcano
2022-06-30 12:32         ` Vincent Guittot
2022-06-30 13:27           ` Daniel Lezcano
2022-07-28 15:41   ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
2022-06-17 12:58 ` [PATCH 1/3] thermal/drivers/qcom: Remove " Amit Kucheria
2022-07-28 15:41 ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano

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=20db85cb-1d16-3aad-c9b0-0a2a602f20ec@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amitk@kernel.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thierry.reding@gmail.com \
    /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.