Commit graph

51 commits

Author SHA1 Message Date
Peter (YM)
d7ec3719ed thermal: read thermistor temp from sysfs
- avoid wrong sensor value reading for thermalHAL

Bug: 327327502
Test: Build to boot to home
Flag: EXEMPT (bug 337358613)
Change-Id: I342bcbfb5ee884aa437d4d4552aeea7d0a9df119
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-19 04:09:57 +00:00
Peter (YM)
c12283dc31 thermal:remove unused state2power value
Bug: 355566259
Test: Build test
Flag: EXEMPT NDK
Change-Id: If63c2eaf5d002af1bae85e14b9b0412e7da81e49
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-15 07:19:11 +00:00
samou
68458452d7 thermal: Remove bcl related tzones
Flag: EXEMPT tuning changes
Bug: 349935208
Test: Confirm boot
Change-Id: Iae3decd1d4063b1f41b4c5cdbd43b3eba1d9269f
Signed-off-by: samou <samou@google.com>
2024-08-12 12:32:21 +00:00
samou
60b4e5b2cd thermal: Remove SOFT_OCP related tzones
Bug: 337976702
Test: Confirm boot
Change-Id: I1f26231452a31b0e3940e98531b384f4e31928cb
Signed-off-by: samou <samou@google.com>
2024-05-21 12:28:50 +00:00
TeYuan Wang
dcd3d4207e thermal: PID tuning for 26 levels of chg_mdis
Bug: 266625520
Test: verified by emul_temp
Change-Id: I6e44ea99e6b350ede3763969b6c6a1769e06e86f
2023-12-13 00:06:21 +00:00
TeYuan Wang
a039a3d3ec thermal: align the setting VSKIN related sensors
Bug: 302435949
Test: emul_temp
Change-Id: Ib2436ef6c715d0ddbe7f46afa1514a5a7f138477
2023-10-20 11:58:59 -07:00
sashwinbalaji
16c067a53e thermal: Update config for stats
Bug: 259903201
Test: local build and verify stats
Change-Id: Ia1b0c4d31427f1100cec23548e7a8a390179e7b1
2023-05-04 09:28:48 +00:00
Peter (YM)
44d4e48ecc thermal: more aggressive CPU throttling policy
Bug: 264725759
Test: Test Burn8, MH_OFF, MH_ON, Genshin Impact
Change-Id: I2209159cc156b3b04301eda5560010c88c4982e4
2023-02-11 00:21:46 +00:00
Sayanna Chandula
5144606e74 thermal: update shutdown thresholds for Tj zones
Bug: 256193172
Test: Build and boot on device
Change-Id: Id42cd4df7f2af117c1c574f1cfac9a53e0cb7586
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2022-11-14 23:50:46 +00:00
Sayanna Chandula
b2276fb72d Revert "thermal: remove gxp cooling device dependency"
This reverts commit af3528b903.

Re-enable gxp cooling device

Bug: 238273184
Test: Build and boot on device
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I6e7eac3f8b15fffccbf64c80f8af7866b9397e4f
Merged-In: I6e7eac3f8b15fffccbf64c80f8af7866b9397e4f
2022-09-19 20:33:06 +00:00
TeYuan Wang
91b6195129 thermal: more aggressive CPU throttling policy
Bug: 243198654
Test: run MH and burn8
Change-Id: I81cce79f74e742c84f2462bdfd7ea95e4939f55f
2022-09-16 18:18:37 +00:00
Jeremy Kemp
c111dbd746 Remove GPU-specific 151MHz min power hint.
gChips discovered potential issues with this frequency, and has recommended its removal.

This also updates thermal hard-limits to reflect the removal of one
operating point.

Bug: 240479599
Test: Boot to homescreen
Change-Id: If16a65550b85a4a4a66cdcd3b5bd7e31d7e7dc88
Signed-off-by: Siddharth Kapoor <ksiddharth@google.com>
2022-09-03 07:25:51 +00:00
George Lee
1c2f2a4cf2 Revert "thermal: remove userspace throttling for BCL tzone"
This reverts commit 7e2cc1ebbe.

Reason for revert: Move throttling back to userspace
Bug: 239887528
Signed-off-by: George Lee <geolee@google.com>

Change-Id: I4ef3851a7163e50ed95862ba99330046634e032c
2022-08-23 19:56:31 +00:00
Sayanna Chandula
bb6bd73aab thermal: update C10 vs-cpu-gpu thresholds
Update C10 VIRTUAL-SKIN-CPU-GPU thresholds

Bug: 230644885
Test: Build and boot on device.
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I9316de24d69c3717e35d77c9318cc3a57389bb46
2022-07-19 23:30:47 +00:00
Sayanna Chandula
835341d69a thermal: update usbc overheat mitigation thresholds
Update usbc overheat mitigation thresholds for UI

Bug: 222577017
Test: Build and boot on device
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: Ica73dfdb9795db09026822a0fee6048daacc439f
2022-07-19 16:58:18 +00:00
George Lee
7e2cc1ebbe thermal: remove userspace throttling for BCL tzone
This is part of the change to move the throttling mechanism into kernel
space for faster response time.

Bug: 238555356
Test: Confirm kernel space throttling
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I681ad03f5165af00b7db00251e03abeccebdb0cc
2022-07-18 20:56:04 +00:00
George Lee
cdc0153692 thermal: Move BCL tzones passive delay to 1s
Bug: 238435115
Test: Boot and verify settings
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Iebf1682246f736ef7cec1796e4dd7539315ee8bc
2022-07-08 21:53:48 +00:00
TeYuan Wang
5243b1a5ca thermal: enable logging for USBC virtual sensor
Bug: 222577017
Test: Verified by emul_temp
06-28 14:33:25.423 I/pixel-thermal( 6959): usb_pwr_therm: 37
06-28 14:33:25.424 I/pixel-thermal( 6959): USB-MINUS-USB2: 8.456
06-28 14:33:25.425 I/pixel-thermal( 6959): USB-MINUS-NEUTRAL: 7.676

Change-Id: I13a13aa4df7d68946ed0aab7937495b5b5365704
2022-06-28 20:01:29 +00:00
George Lee
133bcdf2ef thermal: Re-enable Monitoring of BCL tzones
Given that PTS-Thermal fix for Monitored tzones and TRIP_DOWN
is enabled.  We can re-enable monitoring of BCL thermal zones.

Bug: 236930961
Test: Boot and confirm settings
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Ic848bff8824d693904e7a575b8679a7e305275b4
2022-06-27 15:26:26 +00:00
TeYuan Wang
43ec1192d2 thermal: update CPU/GPU throttling policy to optimize perf
1. GPU 202Mhz thermal throttling is too aggressive and cause frame missing. So, adjust the hardlimit and cdev_ceiling to improve perf.

2. Set the cdev_ceiling for CPU to avoid the abnormal throttling request when ODPM has issue.

Bug: 234998975
Test: Confirm fps drop for pip test
Change-Id: I07b58d4e9412e4389bb7e2bb185ea9da0b18cc13
2022-06-24 06:42:23 +00:00
Sayanna Chandula
af3528b903 thermal: remove gxp cooling device dependency
Bug: 236296247
Test: Build and boot on device
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: Ib7aa0b9b929978eb24104c79e93290b292454735
2022-06-23 23:11:18 +00:00
Sayanna Chandula
0f1551bd67 thermal: update virtual skin coefficients to v1.1
Update virtual skin sensor coefficients as per v1.1

Bug: 234872294
Test: Build and boot on device
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I0053b9581ed1fa423ef849850bd8bcbc9084885d
2022-06-14 04:46:27 +00:00
George Lee
79753e6c35 thermal: Remove PassiveDelay for VDROOP1/2/BATOILO
Part of removing monitoring of BCL thermal zones.

Bug: 234901714
Test: Boot and confirm settings
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I470951a6a8676079642c7070687198645a163887
2022-06-09 07:02:25 +00:00
George Lee
6f90a13c3a thermal: Re-enable soft_ocp_cpu1 monitoring.
Bug: 234707775
Test: Boot and confirm its monitoring
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I531242c67dfc3d5542f15366f464b28fcbdc0c31
2022-06-07 16:55:11 +00:00
George Lee
b2180f952b thermal: Remove Monitor flag for BCL tzones.
Since all of the BCL tzones are triggered from IRQ, we do not need to
monitor the tzones.

Bug: 197189623
Test: Pts Thermal test passing
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I96a245329e59a19f5baf15992c87a3ea568b7ddf
2022-06-06 18:16:34 +00:00
TeYuan Wang
d3c9705ecd thermal: bringup charge_mdis PID loop
Bug: 209635028
Bug: 226130317
Test: emul_temp with different power workload
Change-Id: Ic26adbe21450c14569135dd4694083701070df58
2022-05-31 23:23:31 +00:00
TeYuan Wang
4bf5bce6ad thermal: add k_i for CPU GPU PID loop
Bug: 232919952
Test: run manhattan and burn8
Change-Id: I8b0e59b0b32a19b49116240ff01145f9a950ffb6
2022-05-31 17:44:02 +00:00
Sayanna Chandula
2435a0c9cd thermal: update virtual coefficients per v0.7
Update P10 virtual coefficients to v0.7 version. No change for C10
coefficients.

Bug: 232569691
Test: Build and boot on device.
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I8b7b5c2b2f1a20f07925b66697632fdc66bdc644
2022-05-25 15:05:46 +00:00
Sayanna Chandula
6d769090c0 thermal: update virtual coefficients per v0.6
Update C10 virtual coefficients as per v0.6. No changes for P10

Bug: 232303785
Test: Build and boot on device
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I2662aba527265d67acb1f5237e550eff75347ca8
2022-05-20 18:58:12 +00:00
TeYuan Wang
0b07b217f9 thermal: correct the sensor settings in thermal config
Bug: 222577017
Bug: 228789757
Test: emul_temp and confirm the thermal log
Change-Id: I772dc36d0667e0f5c8b6473f9e3f158c36388039
2022-05-13 16:48:41 +00:00
Sayanna Chandula
d16aa14df0 thermal: update usbc overheat mitigation thresholds
Update C10 USBC overheat mitigation thresholds.

Bug: 222577017
Test: Build and boot on device.
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I1799774b495bb44c5f2cf4cbe67c92a231f6333d
2022-05-12 23:24:19 +00:00
George Lee
8794415291 thermal: BCL policy for BATOILO
Re-enable BATOILO throttling for GPU/TPU to combat over current use
case.

Bug: 231484774
Test: Boot and confirm brownout mitigation for synthetic load
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Ia46ffd4bb2f5c246f48971aa8d4622b203bef1e7
2022-05-06 20:55:24 +00:00
Sayanna Chandula
09b55b3d91 thermal: update virtual coefficients to 0.5 version
Update virtual-skin, virtual-skin-charge and cellular-emergency
sensors to 0.5 version coefficients.
Added "Version" field for virtual-skin node for identifying the
version of coefficients.

Bug: 229418131, 227477863
Test: Build and boot on device. Check virtual-skin readings
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I709fa1dfa5304416335bba1a7cb21a267e00c744
2022-04-21 19:25:31 +00:00
TeYuan Wang
f0cda432e8 thermal: bringup PID thermal throttling for CPU GPU
Bug: 196478280
Test: run burn8 and manhattan
Change-Id: I447fa5bc452f413f65c46c235a5a3692b628586b
2022-04-20 15:37:48 +00:00
Sayanna Chandula
dade9ed2ac thermal: add usbc virtual sensors for overheat protection
Add a virtual sensor for USBC overheat protection and messaging to
UI. Bind overheat protection sensor with USBC cooling device.

Bug: 222577017
Test: Build and boot on device
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I6f3cdc01fedfd152382a2d5370e22e0acf6cb3ba
2022-04-12 21:49:02 +00:00
George Lee
43ad58996b thermal: Remove 80% SOC monitoring
Bug: 228808192
Test: Local test to verify no polling
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I6a0a0fa240e199a3ccf47138b3204679fd3f6eed
2022-04-12 00:10:45 +00:00
TeYuan Wang
deaa89eb24 thermal: Hide the sensors which are not used by framework
Bug: 227686549
Test: adb shell dumpsys thermalservice
Change-Id: I26e16c664ac95264d0d4cc943bb45627ff774d8c
2022-04-05 23:58:19 +00:00
George Lee
c7017427f5 thermal: BCL policy for cold temperature
Add cold temperature policy to combat sharp SOC% drop

Bug: 223420221
Test: Local peak current shock test at cold temperature
Signed-off-by: George Lee <geolee@google.com>
Change-Id: If1db429a6c6c181735af001a72372f63a59d01c4
2022-03-28 17:48:38 +00:00
Sayanna Chandula
3baae0f8d2 thermal: update C10 and P10 v4 thermal coefficients
Update C10 and P10 thermal configurations with v4 coefficients

Bug: 223909968
Test: Build and boot on device. Check thermal configuration at
/vendor/etc/thermal_info_config.json
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: Iad867590122f5c16667ba020f98799c952b3176c
2022-03-23 03:37:01 +00:00
George Lee
18771c221b thermal: Reduce DVFS throttling per BCL irq
By increasing hardware clock divider count, we do not need to throttle
as hard to mitigate for brownout.

Bug: 221070649
Test: Local stress test to ensure no brownout.
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I7ced6cdcf215738dd50d527f9f58ae4046492b29
2022-03-10 20:17:32 +00:00
Sayanna Chandula
e2e40853a5 thermal: update C10 and P10 thermal configurations
Update virtual-skin and virtual-skin-charge with v2 coefficients.

Bug: 220922474
Test: Build and boot on device. Check thermal configuration
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I81224836d03fe501b6472d568e037019c61b7dca
(cherry picked from commit c9f55902d1)
2022-03-09 23:40:31 +00:00
TeYuan Wang
12d950f1d1 thermal: bringup basic thermal throttling for dogfood
Bug: 219869479
Test: verified by emul_temp
Change-Id: Ifc2123bd78c62126a25b5d3e4d9413a4dc97bcd6
2022-02-16 19:34:39 +00:00
Sayanna Chandula
74d797205a thermal: enable cellular emergency sensor
Add cellular-emergency sensor with same virtual
coefficients as virtual-skin, but a 54 degC
emergency threshold.

Bug: 216391268
Test: build and boot on device.
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I8d6178b228ffaf31b80341efb4a78e681940bb47
2022-02-15 18:52:11 +00:00
Sayanna Chandula
ab4b15955b thermal: enable charging throttling
Create a virtual rail POWER_FOR_CHARGING_THROTTLING and
bind fcc/dc_icl/wlc_fcc cooling devices with virtual-skin-charge
sensor.

Bug: 204523879
Test: build and boot on device. Check charging throttling
Change-Id: Iffd71c5bb6b8545bb95468b3321bcf57c0b02913
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2022-02-15 05:10:46 +00:00
Sayanna Chandula
ff1e6d34e1 thermal: enable thermal shutdown
Lower thermal shutdown temeprature to 55 degC to renable
shutdown for all HW revs and usecases

Bug: 204522715
Test: build and boot on device. Run a workload and check
thermal shutdown
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I10ca928cf8639f279b9dcb1d609d0bb8c7ed2c29
2022-02-15 05:09:32 +00:00
George Lee
cebb70c7b8 thermal: enable TPU/GPU cooling for BCL sensors
Bug: 218336859
Test: Boot and confirm state change
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I4baceec1e31a84bf0b38643cbdf1360856aa381f
2022-02-08 00:41:57 +00:00
Sayanna Chandula
0be31df9b5 thermal: update C10 and P10 thermal configurations
Reduce the thermal thresholds
Bug: 211777844
Test: build and boot on device. Check thermal thresholds
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: I708ab2470102a1dae53268db1066ca6857793bc4
2022-01-28 06:53:25 +00:00
George Lee
b60df13d49 thermal: update BCL policy changes for BAACL
Bug: 204271308
Test: Boot and confirm temperature reading
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I10b15a4863dbbc11b9d2149b3fda73f860717a3f
2022-01-24 23:21:23 +00:00
George Lee
fa5437f715 thermal: update BCL policy changes
Bug: 197028142
Test: Boot and confirm temperature reading
Signed-off-by: George Lee <geolee@google.com>
Change-Id: If63882cd7335e002a6df51cd6bd1d37f5d8d24e3
2022-01-18 22:36:47 +00:00
Sayanna Chandula
de94c5d8c5 thermal: update C10 and P10 thermal configurations
Add virtual-skin and virtual-skin-charge sensors.
Update the coefficients.
Disable thermal shutdown

Bug: 211777844, 204522715
Test: build and boot on device. Check tskin mitigation
Signed-off-by: Sayanna Chandula <sayanna@google.com>
Change-Id: Ic48ef0e364ed2d6a3cd581144a7d46bac76f834e
2022-01-18 18:49:44 +00:00