Commit 602c233f65 added a conditional for
ops->get_trip_temp(). In the original code,
ops->get_trip_temp() is called unconditionally. So delete
the conditional to fix it. At the same time, modify the
comment of enable. Actually, IPA is always enable, but
sometimes it needs to be disabled for a while. Making
'enable' true or false, IPA can be enabled or disabled by
user requirement.
When the 'override' turns to false from true and current
temperature is below the switch_on_temp(means 'update' is
false), the cooling device state has not changed, also
the power could not be updated to the maximum power. So
add a vendor hook to renew the 'update' value, so that the
cooling device can be updated.
Fixes: 602c233f65 ("ANDROID: thermal: Add a flag for vendor hook enable_thermal_power_throttle")
Bug: 271370056
Signed-off-by: Di Shen <di.shen@unisoc.com>
Change-Id: I43191926f8da9016fe76d7cb78639b1cbd89c53e
To avoid changing the visibiliy of data types when including
hook definition headers remove header file inclusions from
the hook definition header files.
Instead, the hook definition headers should just have forward
declarations that don't require full definition.
To provide full definitions of the types for the KMI, the
headers that define the types should be included by the
source file that instantiates the hooks - normally
vendor_hooks.c.
Since the KMI is frozen, some of the inclusions are still
required to preserve the CRC associated with symbols. Keep
these inclusions under #ifdef __GENKSYMS__.
Bug: 233047575
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ibc1173eb4b07fcec21c7abd8e0ab1950b3fb5b34
This change is intended to reduce the chance of a missed ABI break
involving vendor hooks.
The following type is now fully defined in ABI XML.
* `struct timekeeper`
symbol '__traceiter_android_rvh_account_irq' changed
CRC changed from 0x18e0dccf to 0x4e82c102
symbol '__traceiter_android_rvh_after_dequeue_task' changed
CRC changed from 0x7efc419b to 0x1c0066e1
symbol '__traceiter_android_rvh_after_enqueue_task' changed
CRC changed from 0xd6f0f603 to 0xf7eaafb8
... 75 omitted; 78 symbols have only CRC changes
Bug: 233047575
Change-Id: I8c04eede1b9d9e788abce95cb31dbd19916774ef
Signed-off-by: Giuliano Procida <gprocida@google.com>
Add vendor hook to thermal to allow vendor to selectively disable
thermal cooling device stats feature based on requirement. It helps
vendor to optimize memory footprint due to this feature especially
for low memory devices.
Bug: 218825214
Change-Id: I2ec72505f03575e09229c54765584614b16a3904
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
tle
Taking in account of SoC's surface temperature, we have to use more str-
ict temperature control to make IPA can monitor and mitigate temperature
control earlier and faster. It means power budget will be overridden wi-
th a more strict one(user power budget). So add an override flag.
It is not the same as "enable" flag. Originally, whether the IPA turns
on or not depends on whether the temperature exceeds switch_on_temp,the-
refore add "enable" flag.
About enable flag:
true: enable IPA control when temperature >= swtich_on_temp
false: disable IPA control when temperature < switch_on_temp
Now in order not to affect the original logic, add flag "override".
About override flag:
true: power budget is overridden by user power budget, and then thermal
power throttle takes action even if temperature < switch_on_temp.
false: power budget is not overridden, there's no other thermal requirm-
ent. Normal temperature control.
Bug: 209386157
Signed-off-by: Di Shen <di.shen@unisoc.com>
Change-Id: Ia9bbded636809d89d90a330df302391a5f4b3f5a
Need to get temperature data and config info from thermal zone device.
Bug: 208946028
Signed-off-by: Di Shen <di.shen@unisoc.com>
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Change-Id: I5945df5258181b4a441b6bbe09327099491418b3
(cherry picked from commit c53f0e3530641d6b696bae12eed55c58599ab516)
Add hook to get cpufreq policy data after registering and unregistering
cpufreq thermal for platform thermal requirement.
Bug: 228423762
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Change-Id: I9c6bc88f348f252c428560427bd8bca91092edfa
When vendor hooks are added to a file that previously didn't have any
vendor hooks, we end up indirectly including linux/tracepoint.h. This
causes some data types that used to be opaque (forward declared) to the
code to become visible to the code.
Modversions correctly catches this change in visibility, but we don't
really care about the data types made visible when linux/tracepoint.h is
included. So, hide this from modversions in the central vendor_hooks.h file
instead of having to fix this on a case by case basis.
This change itself will cause a one time CRC breakage/churn because it's
fixing the existing vendor hook headers, but should reduce unnecessary CRC
churns in the future.
To avoid future pointless CRC churn, vendor hook header files that include
vendor_hooks.h should not include linux/tracepoint.h directly.
Bug: 227513263
Bug: 226140073
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b
For SoC's skin temperature, we have to use more stringent temperature
control to make IPA can monitor and mitigate temperature control earlier
and faster, so add it to meet platform thermal requirement.
Bug: 211564753
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Signed-off-by: Di Shen <di.shen@unisoc.com>
Change-Id: Iaef87287eef93d6fdbc3c58c93f70c1525e38296
(cherry picked from commit 6709f523251f77dc1e9ea643668c630db1f7db80)
By default, thermal power throttle is always enable, but sometimes it
need to be disabled for a period of time, so add it to meet platform
thermal requirement.
Bug: 209386157
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Change-Id: If9c53a9669eec8e2821d837cfa3c660a9cfbf934
(cherry picked from commit 64999249d5fecc79805fd799bdf71bc5b554efc1)
Need to get the request frequency and target frequency
use it to do frequency check and modify it according to
the platform thermal requirements.
Bug: 208166320
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Change-Id: I776b43c8f559b8a072abd8d3abcb3528348b2c5d
(cherry picked from commit fc827b344f76709dc7f242c7db32e1828f510fdd)