Commit graph

38 commits

Author SHA1 Message Date
Treehugger Robot
a410fdff0b Merge "thermal: Update vskin-close-sub-1 equation" into 24D1-dev 2024-05-10 05:26:55 +00:00
Wei Wang
4c4a4459d5 Merge "thermal: Apply special thermal config for wingboard/MLB device" into 24D1-dev 2024-05-09 04:58:15 +00:00
sashwinbalaji
1c5e52ad45 thermal: Update vskin-close-sub-1 equation
Update vskin-close subsenor equation to better correlate for safety
cases.

Bug: 338512090
Test: Push config and verify lshal
Change-Id: I679ee99227bd39c9d0b3615dec82a186ab524866
2024-05-09 00:32:21 +08:00
Treehugger Robot
f15b631448 Merge "thermal: Support undersampling for vskin-models" into 24D1-dev 2024-05-07 00:14:35 +00:00
sashwinbalaji
f8e414dbd8 thermal: Support undersampling for vskin-models
Enable undersampling for VSkin-Model adn VSkin-Speaker-Model, this will
enable to avoid unnecesary read temp fails when enough samples not
collected.

Bug: 338920071
Test: Push config and verify for thermal error logs
Change-Id: Ic8af11170c0273286068c12493615c4b838ecacc
2024-05-06 16:26:45 +08:00
Peter (YM)
04c7d884b6 thermal: enable frequency based constrain on gpu thermal throttle
Replacec cdevceiling and hardlimit information with freuqencies in
thermal config

Bug: 336698561
Test: Flash Build and boot to home, run adb dumpsys android.hardware.thermal.IThermal/default, check the cdevceiling and hardlimit number for gpu
Change-Id: I7b582b3d19ddea8c5c3a643d57972167ed5b6c87
Signed-off-by: Peter (YM) <peterym@google.com>
2024-05-06 02:31:40 +00:00
TeYuan Wang
15c78bac5b thermal: Move TPU to the VSKIN-SOC PID loop
Bug: 322223131
Test: run TPU test
Change-Id: I4996071d1618808068dddddd984f3eca4da32517
2024-05-02 23:38:47 +00:00
sashwinbalaji
79277084b0 thermal: Apply special thermal config for wingboard/MLB device
- Add new thermal config for wingboard without dependency on:
  - chg_mdis
  - inner_brightness zone
- Update init_thermal_config to check if wingboard, if so use the custom
  config

Bug: 335005016
Test: Build and boot to verify thermal logs
Change-Id: I58b9517de2acdfca0e371ce1a5dfe486eb6c15ee
2024-04-29 11:47:49 +08:00
Wei Wang
a4eeccb5b3 Merge "thermal: use frequency to define hard limit and cdev ceiling" into 24D1-dev 2024-04-26 17:43:37 +00:00
Treehugger Robot
4030a99fc2 Merge "thermal: Add VSkin-Speaker Model" into 24D1-dev 2024-04-26 07:47:12 +00:00
Treehugger Robot
3ab2c71536 Merge "thermal: Update VSkin-Model" into 24D1-dev 2024-04-26 07:47:12 +00:00
Peter (YM)
b76a852082 thermal: use frequency to define hard limit and cdev ceiling
Test: Boot to home and flash on device
Bug: 330780045
Change-Id: I6deaa4de72d289468344c3312ac44e266e225883
Signed-off-by: Peter (YM) <peterym@google.com>
2024-04-26 04:02:25 +00:00
sashwinbalaji
607d6b55a3 thermal: Add VSkin-Speaker Model
- Add linear regression model for VSkin-Speaker
- Setup abnormality monitoring:
	- 0 <= VSkin-Speaker <= 55
	- -15 <= Vskin-Speaker Model - Legacy <= 15
- Residency for Vskin-Speaker Model

Bug: 303547367
Test: Local build and verify lshal
Change-Id: Iadb46c82c2568c2eec31fe2cf7b9fd2cb9a56a04
2024-04-24 14:54:31 +08:00
sashwinbalaji
be09cda8ba thermal: Update VSkin-Model
- Unhide VSkin-Model to ensure thermal recorder can log
- Reduce vskin-model-legacy-diff to align with other devices
- Remove model backupsensor, since model is not used for throttling
  remove backup sensor to collect more field issues.

Bug: 315948438
Test: Push config and verify dumpsys
Change-Id: I4adfcb6a13c58b15f1d97b1130d4bc0f1776f235
2024-04-24 14:00:21 +08:00
sashwinbalaji
2c94505351 thermal: read thermistor temperature from upstream sysfs
tz_temp callback will invoke thermal_zone_device_update and return the
cached temp from thermal core. However, during device resume, the cached
temp may be reset to INVALID number before being returned.

So, change the reading path to upstream temp_show which will return the
temperature from thermistor driver directly.

Current Issue:
We are observing lot of extreme low temp for vskin being reported and
with all coefficients being positive the only way negative vskin is
reported is when thermistors report very low temp. Since abnormality
logging is rate limited this reduces the amount of ml model issues
reported.

Bug: 323987378
Test: Local build and verify lshal
Change-Id: I2445f9d654c2a86c9507bf1654dc44f3b765c889
2024-04-19 09:49:15 +08:00
TeYuan Wang
d51b20059e thermal: adjust CPU cdev_ceiling
Bug: 329697728
Test: boot to home
Change-Id: I0df4438f17832c7f121cc4340064855d44a44a2b
2024-04-16 18:52:29 +00:00
Treehugger Robot
acdce4976a Merge "thermal: Add VIRTUAL-SKIN-MODEL" into 24D1-dev 2024-04-09 00:39:19 +00:00
Treehugger Robot
ce7f4875bc Merge "thermal: Update left/right inner display equations" into 24D1-dev 2024-04-08 22:38:45 +00:00
sashwinbalaji
7ac59e36d9 thermal: Hide USB-MINUS-CHARGER
Hide the subsensor USB-MINUS-CHARGER.

Bug: 303547449
Test: Local build, verify no thermal error logs and lshal.
Change-Id: Ia3b09b6c33191fde861c3861d5d159be285a200a
2024-04-08 20:27:50 +00:00
sashwinbalaji
8255f9834c thermal: Add VIRTUAL-SKIN-MODEL
- Add vskin-model.
- Rename existing vskin to vskin-legacy.
- Add input validation for model and fallback on vskin-legacy for
  vskin-model.
- Add abnormality and residency stats for vskin model.

Bug: 315948438
Test: Local build and verify lshal and thermal logcat.
Change-Id: I3930939b9ed3777ed6eb5bce745c9f099f639fb1
2024-04-08 10:52:19 +08:00
sashwinbalaji
c5642a252a thermal: Update left/right inner display equations
Update the formula for L/R brightness compensation.

Bug: 309716793
Test: Load config and veirfy thermal log and lshal
Change-Id: I33c0054b19197b4fa7f298090d6b2c2acb1f076f
2024-04-08 10:52:19 +08:00
sashwinbalaji
2d2f84936d thermal: Remove deprecated power rails
Remove the below power rails as they're going to be replaced with
different ones for better ODPM coverage.

  - S8S_VDD_G3D_L2
  - L9S_GNSS_CORE

Bug: 331556280
Test: Push config and verify thermal logs
Change-Id: Ic5c6cb7c4ddae258c89cbe3cb50a104f7044e016
2024-04-01 12:42:56 +08:00
sashwinbalaji
809257b65d thermal: Update charging equation and threshold.
- Update WLC moderate threshold from 38 to 41.
- Update rule to identify WLC scneario (acc to pa/2736243).
- Update WLC equation to latest equation.
- Keep inital vskin-charge equation as vskin-charge persist.
- lower charger_threm trigger point to align with vskin-charge persist
  trigger temp.
- Set vskin-charge-persist as vskin-wlc if current state is wlc else set
  to vskin-wired.
- to ensure vskin wired status is recorded, unhide is_wlc, vskin-wired
  and vskin-charge-persist.

Bug: 303547723
Test: Boot to home and check logs
Change-Id: I1b86b3c15caca6353447c76f2f72bb7c18cccfd6
2024-03-28 16:07:32 +08:00
sashwinbalaji
80c9fb7020 thermal: Update VIRTUAL-SKIN equation
Update the trigger sensors and equation for virtual-skin.

Bug: 303547449
Test: Local build, verify no thermal error logs and lshal.
Change-Id: I72677b58a4c4e29f4cd5e95b98691e4e1efb0fdc
2024-03-28 15:30:36 +08:00
Treehugger Robot
474b0138cc Merge "thermal: update cdev ceiling for LITTLE cores" into 24D1-dev 2024-03-26 18:53:49 +00:00
sashwinbalaji
e1a6516a88 thermal: update cdev ceiling for LITTLE cores
Inefficient OPPs were removed for the LITTLE cores from em table.

This change is to update the cdev ceilings in thermal policy to reflect
the EM changes

Bug: 331397497
Test: Build and boot on device.
Change-Id: I770b4495715a8da8e90248c0df043d2aa489c8d4
2024-03-26 16:48:05 +00:00
Peter (YM)
2e3b405b8a therma: disable LIGHT tier throttling when gaming
We already have the CPU scheduler optimization for game mode to sustain
the power and perf, so remove the CPU thermal policy at lower
temperature to avoid the interfence on CPU scheduler.

Bug: 329697728
Test: Build and verify behavior by sending powerhint
Change-Id: Ida42089c9752ce03875da9f390cc6d4a360151d8
Signed-off-by: Peter (YM) <peterym@google.com>
2024-03-26 07:14:03 +00:00
sashwinbalaji
ab5065e8a5 thermal: Add initial VIRTUAL-SKIN-OUTER-DISPLAY
To monitor and verify the feature of "sensor name based brightness
throttling", add VIRTUAL-SKIN-OUTER-DISPLAY of type DISPLAY.

But to ensure no regression, set its equation to be same as VIRTUAL-SKIN
and in future once verified we can update the equation.

Bug: 326615866
Test: Local build and verify thermal logs
Change-Id: I370990837911ab4b733aa9adca624ff1788f9500
2024-02-26 18:37:22 +08:00
sashwinbalaji
259d71f4d3 thermal: Update hotThresholds
Update emergency and shutdown threshold values to align with previous
generation foldable device.

Bug: 303547512
Bug: 322147413

Test: Build and verify lshal and use emul_temp to trigger shutdown
Change-Id: I3229de36dafcff7fdb29a6f1dd014bd49324c285
2024-02-22 08:28:57 +08:00
Priyanka Advani
c12fbfbd41 Revert "thermal: Update hotThresholds"
This reverts commit fb839117d6.

Reason for revert: Probable culprit for b/326235335. Will be verifying through ABTD for confirmation and before submitting the revert.

Change-Id: Ie82a56007090386c5f4425b3495fc8ccfdfc884c
2024-02-21 16:52:33 +00:00
sashwinbalaji
fb839117d6 thermal: Update hotThresholds
Update emergency and shutdown threshold values to align with previous
generation foldable device.

Bug: 303547512
Bug: 322147413

Test: Build and verify lshal and use emul_temp to trigger shutdown
Change-Id: Ia98dc74d5964868fa893ef1badfe0f5e37093e40
2024-02-21 18:25:04 +08:00
Peter (YM)
2f23a1f721 thermal: update gpu cdev ceiling
To Align with latest GPU available frquencies

Bug: 318313844
Test: run gpu stress test
Change-Id: I5260ee09877f9e4167535baa09ebc8d091587007
Signed-off-by: Peter (YM) <peterym@google.com>
2024-02-06 06:39:19 +00:00
Treehugger Robot
ba8615a5fe Merge changes Idf292dbb,I544b8942 into main
* changes:
  thermal: Reduce LIGHT-tier's ceiling before 43 degC for camera
  thermal: Update cdev ceiling to match latest EM table
2024-01-26 09:26:39 +00:00
samou
a19931dca2 thermal: remove brownout event
The battery_mitigation takes over the brownout event
and informs subsystems to do mitigation.

Bug: 319285945
Change-Id: I6b318197a5248470cce670747393f67663689487
Signed-off-by: samou <samou@google.com>
2024-01-11 14:15:45 +00:00
sashwinbalaji
d08d37db69 thermal: Reduce LIGHT-tier's ceiling before 43 degC for camera
Align with latest camera thermal throttling (ag/25589702)

Bug: 319174137
Test: run camcorder
Change-Id: Idf292dbb33e295dda33176343cc2012e56141d7b
2024-01-10 13:17:59 +08:00
sashwinbalaji
506a2dbaa6 thermal: Update cdev ceiling to match latest EM table
Bug: 318313844
Test: maintain Tskin with burn8/burncycle/MH
Change-Id: I544b89427c1597153766feded7aeaeec4993d4f9
2024-01-10 13:14:51 +08:00
sashwinbalaji
fc365a9d48 thermal: Add INNER-DISPLAY-DIFF virtual sensor.
Add LEFT-INNER-DISPLAY, RIGHT-INNER-DISPLAY virtual sensors.
Add INNER-DISPLAY-DIFF (diff of right - left) virtual sensor.

The INNER-DISPLAY-DIFF sensor will be used for inner display thermal
compensation.

Bug: 309716793
Test: Push config to device and verify thermal log and lshal
Change-Id: I4f7fbb2006b84dd6ab945d0de94f5d5ca2ffcd49
2024-01-02 13:03:50 +08:00
sashwinbalaji
edb8b488e5 thermal: Dynamically decide thermal config to use
Add service which will device thermal config on basis of following
conditions:

- No display panel / proto, use thermal_info_config_proto

Bug: 315096213
Test: Build and verify on all device variations
Change-Id: Ic1f652dcf38888150200bb80b35aad740058e85f
2023-12-18 19:28:00 +08:00