I totally agree, thanks for reminding me. Sustainable power is the maximumIf the trip temperature is decreased, allow_maximum_power will only+static void power_allocator_reset(struct thermal_zone_device *tz)
+{
+ struct power_allocator_params *params = tz->governor_data;
+
+ reset_pid_controller(params);
+ allow_maximum_power(tz, true);
Do you really want to allow the maximum power? What about if the trip
temperature is decreased ?
be executed once, and then the ipa governor will adapt to the lower trip
temperature and calculate the allocated power for cooling actors again.
Right?
Sorry for jumping in this fifth version but I'm not sure about resetting
the change is the right way (and probably, changing a trip point with
the power allocator is not a good idea)
The platforms where the IPA is planned to be used are creating a dummy
trip point where the IPA begins the acquisition without cooling devices
in order to have the math building the PID schema (eg. hi3660.dtsi).
What about the sustainable power vs the trip point temperature? I mean
we can change the trip temperature but not the sustainable power which
is directly related to the target temperature. So the resulting power
computation will be wrong.
power available at the target temperature, so it must be updated when the trip
point is changed. Sorry for missing this point. How about calling
get_sustainable_power() to update the sustainable_power? Furthermore, when
the sustainble_power() is changed, the pid constants tzp->k_* must be estimated
again. In get_sustainble_power, it checks that the sustainable_power is updated,
it will call the estimate_pid_constants() to renew the tzp->k_*.
The more I think about that, the more I do believe writable trip pointI've seen that you have sent a patch recently which adds the callback
and IPA are incompatible.
What about forbid that?
For instance, add a set_trip callback instead of resetting in the
governor and return -EPERM from the IPA?
thermal_zone_trips_update(), is that what you said set_trip callback?
Lukasz ?