[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20db85cb-1d16-3aad-c9b0-0a2a602f20ec@linaro.org>
Date: Mon, 20 Jun 2022 17:17:09 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Dmitry Osipenko <digetx@...il.com>, rafael@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
"open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH 2/3] thermal/drivers/tegra: Remove get_trend function
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@...aro.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
Powered by blists - more mailing lists