Commit graph

23 commits

Author SHA1 Message Date
Sayanna Chandula
6f59876ad6 thermal: enable input data validation
Update tflite models with metadata containing input data ranges.
Enable input data validation and backup sesor.
Add offsets based off temperature ranges.

Bug: 319167815
Bug: 328789394
Test: Build and boot on device. Test backup sensor and offsets

Change-Id: Icdc0c1a1fe026613e4a1716747335e60aca4edf9
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-03-20 11:49:53 -07:00
TeYuan Wang
293906adff thermal: reading the thermistor temperature from upstream sysfs for proto
Bug: 326252555
Test: adb shell dumpsys thermalservice
Change-Id: I13dc61d5d4df64b3a9858dc062a3eee52d0dee94
2024-02-29 02:12:11 +00:00
Sayanna Chandula
0f72b2af9b Merge "thermal: add historic samples for tflite vt prediction" into main 2024-02-15 01:01:44 +00:00
Sayanna Chandula
ba2f333130 thermal: add historic samples for tflite vt prediction
Add historic samples of past 5 iterations
Remove VSYS_PWR_ODPM from VT prediction

Bug: 315169778
Test: Build and boot on device

Change-Id: I70557d67633cbc4bcfbfe8811beff56353c54085
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-02-14 08:46:08 -08:00
TeYuan Wang
f28d1f2826 thermal: remove battery from TriggerSensor
Bug: 324178403
Test: no thermal error log when thermalHAL init
Change-Id: Ieb08a0b9312a591861384136572ccf1dddd5bbda
2024-02-07 07:43:00 +00:00
Sayanna Chandula
af4cea32f3 thermal: update vt prediction models with higher odpm average
- Updated vt predictions models with 15 samples average for ODPM rails.
- This reduces VT prediction being very sensitive to power changes
- Remove other ODPM rails from VT prediction except for VSYS_PWR_CAMERA

Bug: 307824060, 322910529
Test: Build and boot on device

Change-Id: Ibb285269d3da86e3d331ea3c7c5a3cd715da0ba2
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-31 11:37:55 -08:00
Sayanna Chandula
4e1edbd52d thermal: add 500mC offset for km4 vt prediction
- Add 500mC offset to address underprediction
- Fix issue with VIRTUAL-SKIN-LEGACY-SHUTDOWN thresholds

Bug: 321108353
Test: Build and boot on device

Change-Id: I778e4949308af484ec8ca7a9dfaf27d13c429209
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-25 15:15:42 -08:00
Jikai Ma
d1ed787a37 thermal: patched linear model virtual sensor
Bug: 315234782
Test: Build and boot on device
Change-Id: I86806579efe479aafd4a34855e8a0f80176ef1cf
Signed-off-by: Jikai Ma <jikai@google.com>
2024-01-25 18:50:47 +00:00
Sayanna Chandula
2842a579c0 thermal: enable thermal throttling based on virtual-skin-model
- Switch to VIRTUAL-SKIN-MODEL from VIRTUAL-SKIN-LEGACY
- Add a backup shutdown based on VIRTUAL-SKIN-LEGACY
- Remove unnecessary polling delays from few sensors

Bug: 321108353
Test: Build and boot on device

Change-Id: I8b8909ded87ba2b76d5712c474120dbe5ab13c2c
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-24 11:18:22 -08:00
Sayanna Chandula
9b07c28910 thermal: update vt models with odpm features
Bug: 307824060
Test: Build and boot on device

Change-Id: Ide175d4945ac64e32d33e0c57e486f2691631b78
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-23 18:00:01 -08:00
sashwinbalaji
37a10af4f0 thermal: Add vskin-model stats monitoring config
Update thermal config as:
- Rename VIRTUAL-SKIN to VIRTUAL-SKIN-LEGACY
In order to differentiate different vt models, we need to define
legacy equation as a sepearate sensor and use it as a reference
for virtual-skin. Later when we want to switch to other models,
we could simply replace the combination for virtual-skin sensor
- Record Stats for
	- VIRTUAL-SKIN-MODEL
	- VIRTUAL-SKIN-MODEL - VIRTUAL-SKIN
  		- At intervals of 500 mdeg (-4500 to 4500)
		- At intervals of 1000 mdef (-13000 to 12000 exlucding
		  -4000 to 4000)
	- Abnormality Monitoring
		- VIRTUAL-SKIN-MODEL [0-55 deg]
		- VIRTUAL-SKIN-MODEL-LEGACY-DIFF [-12000 - 12000 mdeg]

Bug: 320347462
Test: Push config and verify logcat and lshal
Change-Id: I397c8a07cf01abd5d8a7dedf290829a19e21ae87
2024-01-23 17:59:40 -08:00
samou
8e7dc247a7 thermal: remove brownout event
The battery_mitigation takes over the brownout event
and informs subsystems to do mitigation.

Bug: 319285945
Change-Id: I58e0a9e0469575096f34243e73c1e32474eea006
Signed-off-by: samou <samou@google.com>
2024-01-11 14:02:56 +00:00
TeYuan Wang
fcf460a0e9 thermal: update USBC throttling policy
Bug: 317281453
Test: verified by emul_temp
Change-Id: Idc2e31e32bd7b278fa7a64d8e6de123c14bfa15a
2024-01-03 14:50:32 -08:00
Sayanna Chandula
d4032aaaa3 thermal: enable virtual-skin-model
Bug: 298225131
Test: Build and boot on device

Change-Id: Iaff3795474b66ff7345a9c5236e6dff4da69de01
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2023-12-12 15:01:32 -08:00
Sayanna Chandula
d79fbc7c99 thermal: set cellular emergency at 54C
Bug: 296476775
Test: Build and boot on device

Change-Id: I3787ec4c52774a78d8c01c42200a789c51a139b4
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2023-12-12 14:54:42 -08:00
Ramya Subramanian
16ae08548a thermal: optimize thermal policy for camera mode
Bug: 310748549
Test: sideloaded the cofig files and device rebooted to home

Change-Id: Ib2af1fd19099b58fd6ba23bde10ea59767b67e05
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-11-18 23:38:20 +00:00
Jikai Ma
b14b8d7586 thermal: update virtual skin sensor formula
formulas updated with P1.1 test data

Bug: 296476775
Test: boot to home

Sign-off-by: jikai@google.com
Change-Id: I88febd4792f9c32c6fcbd3d27490cdac80f00311
2023-11-07 19:18:29 +00:00
Sayanna Chandula
6243474aec thermal: set polling delay for virtual skin speaker
Bug: 304828870
Test: Build and boot on device

Change-Id: I3707c5039223fae0caaf24e59054b1d66c59abd8
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2023-10-26 14:03:36 -07:00
Ramya Subramanian
35bdb22a0a thermal: updated BTS equations
Bug: 297083757
Test: Tested on CM4/KM4, boot to home and with thermal recorder

Change-Id: I489613010ae04851bd713d3d9c74ede15661d191
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-10-24 17:54:18 +00:00
Ramya Subramanian
ad537dafcd thermal: virtual skin thresholds updated to match POR values.
gpu cooling device is now available in kernel, enabled in HAL

Bug: 305017362
Test: tested on CM4 and KM4 devices. no access to TK4 or EVT

Change-Id: I06c022eb68a5726802529fe67fd76b189df14d32
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-10-23 16:53:04 +00:00
Ramya Subramanian
cddaacbecf Reapply "thermal: separate out proto and EVT config due to differences in rail"
This reverts commit 2741e1dcdb.
Test: Tested on RCPro, CM4/KM4 proto devices
Change-Id: I5dda1c21d215dcfff757b73275f9fc3eac31a19a

Bug: 304936256
Change-Id: I72e6dd09d9443fec8a49fc0c7f7310455946f086
2023-10-18 15:23:10 +00:00
Zheng Pan
2741e1dcdb Revert "thermal: separate out proto and EVT config due to differences in rail"
This reverts commit 2df105a118.

Reason for revert: break build of ripcurrentpro

Change-Id: I0e9fa3a59f5b8cd14e9a9e450b6c1508aace73ba
2023-10-17 05:58:42 +00:00
Ramya Subramanian
2df105a118 thermal: separate out proto and EVT config due to differences in rail
config

Bug: 304936256
Test: Tested on Proto1.0 KM4, CM4 devices

Change-Id: I68a192f3f217453a7413f703dce24f8ef2c27caa
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-10-16 20:37:55 +00:00