Commit graph

109 commits

Author SHA1 Message Date
Sam Ou
e7877516ff Merge "thermal: Remove bcl related tzones" into main 2025-01-13 19:52:48 -08:00
samou
50fb151974 thermal: Remove bcl related tzones
Flag: EXEMPT tuning changes
Test: Confirm boot
Bug: 389568268
Change-Id: I5e0b25234304316ec38e6fbcd872b50a74583caa
Signed-off-by: samou <samou@google.com>
2025-01-13 08:32:37 +00:00
Jikai Ma
66f53acc42 thermal: prev_samples_order mismatch fix
- update model metadata with correct 'prev_samples_order' value

Bug: 385392415
Test: confirm ThermalHAL loads the model without error
Flag: EXEMPT config update
Change-Id: I02c496af39f0bdef6a005f2622ddfd99c72f67b0
2025-01-02 09:38:44 -08:00
TeYuan Wang
756cd13578 thermal: update policy for earlier USB port throttling/warning
Bug: 377956961
Test: confirm usbc throttling and warning UI by emul_temp
Flag: EXEMPT config update

Change-Id: Ieb5f1bb93a9f96ba855c7ed05cdc8b9f033392ca
2024-12-06 18:21:53 +00:00
Sayanna Chandula
3e26b5e953 Merge "thermal: support stats for future temperature predictions" into main 2024-10-29 22:39:17 +00:00
Sayanna Chandula
6124fe3c3f thermal: support stats for future temperature predictions
LSTM-VT-PREDICTION-7SEC-BACK:
LSTM predicted current VT 7 seconds back. This is the 2nd sample
of LSTM model output. First sample is for current VT. This can be
compared with current VT to measure LSTM model accuracy for 7 seconds
interval.

LSTM-VT-PREDICTION-NOW:
First sample of LSTM model output

LSTM-VT-PREDICTION-ERROR-7SEC:
Compares LSTM prediction 7 seconds back with current LSTM predicted VT.

Bug: 353345569
Test: Build
Flag: EXEMPT config update

Change-Id: I79abe378fee7be0e6c9311d9e04e61a535e50a09
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-10-18 11:44:23 -07:00
Jikai Ma
de9f892cc1 thermal: update P24 ml prediction model and config
Bug: 372110489
Test: loaded to device and boot to home
Flag: EXEMPT config update
Change-Id: Ie05768cf2e8da0180fb22c06cc6322a97544669d
Signed-off-by: Jikai Ma <jikai@google.com>
2024-10-17 16:45:27 +00:00
Sam Ou
a3244ab2c8 Merge "thermal: Remove bcl related tzones" into main 2024-09-18 15:49:46 +00:00
Peter (YM)
f2def037fb thermal:remove unused state2power value
Bug: 355566259
Test: Build test
Flag: EXEMPT NDK
Change-Id: I58abd056ea1edfa9478d4419ca84560951c2a280
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-15 04:13:19 +00:00
samou
d35eeb2c3d thermal: Remove bcl related tzones
Flag: EXEMPT tuning changes
Bug: 349935208
Test: Confirm boot
Change-Id: I2029cde12297d51ab14e336e3ce733cbed879f6c
Signed-off-by: samou <samou@google.com>
2024-08-06 03:55:18 +00:00
David Chao
313e0cbebb thermal: update charging thermal throttling
Increase K_I and PowerWeight to reduce temperature
and charging throttling overshoots.

Bug: 338150302
Test: boot and charging thermal throtlting worked properly.
Change-Id: Ia7b2b5f7b2f8d62d1cde800be149993b284f72d4
2024-06-06 18:39:52 +00:00
sashwinbalaji
b59526a5d0 thermal: Add residency stats for vskin-charge by charger type
Use thb_hda value to find charger type and split vskin-charge into
different categories on basis of charger type.
For each category if charger not active, store time in bucket 0 and if
active store residency in higher buckets.
Thresholds: [-200, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55]

Bug: 341872098
Test: Push locally and verify stats by connecting to different chargers
Change-Id: I15738686a0a6b263ab4b3f2caf1a22d7c31c4518
2024-06-05 11:26:13 +08:00
sashwinbalaji
bd273f003d thermal: Clean up stats config
- Remove stats monitoring for sub-sensors since they don't denote a
  particular hotspot.
- Remove stats monitoring for wingboard configs.
- For vskin-legacy, vskin-model, vskin-speaker improve the resolution of
  buckets by splitting range [49, 55] into [49, 51, 53, 55]

Bug: 341872098
Test: Push config and verify lshal
Change-Id: Iabff63922c283a595fa7ec2dfa8af539629d4064
2024-05-28 09:34:50 +08:00
Sayanna Chandula
1bcb265b5c Merge "thermal: update legacy virtual senor formulas" into 24D1-dev 2024-05-23 18:35:26 +00:00
Sayanna Chandula
3cffe299f7 Merge "thermal: set virtualskin model cache interval to 7 seconds" into 24D1-dev 2024-05-23 18:34:57 +00:00
Sayanna Chandula
8530c2e189 Merge "thermal: add explicit passive delay to enable step ratio" into 24D1-dev 2024-05-23 18:34:07 +00:00
Jikai Ma
614af2385c thermal: update legacy virtual senor formulas
- generated legacy formulas with DVT and CUJ data
- removed 'battery' thermistor from sensor combination list
- removed 'LINEAR' formulas

Bug: 342227291
Test: verified thermal hal service starts properly with it
Change-Id: Iff59072d432ff98afe852295745cebd81ec73d15
Signed-off-by: Jikai Ma <Jikai@google.com>
2024-05-23 18:16:04 +00:00
Sayanna Chandula
108e06a214 thermal: set virtualskin model cache interval to 7 seconds
With previous samples being used in vt estimation, the sampling period
between vt estimation calls impact vt accuracy. Currently vt model is
using default cache interval of 2 seconds. This change sets the cache
interval to 7 seconds explicitly to match with passive delay

Bug: 341967304
Test: Check vt estimation invoke calls with frequency thermalservice dump

Change-Id: Ic6a38939b2bec88a66c87517e6efa548566ea877
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-05-23 10:16:33 -07:00
Sayanna Chandula
019bef5229 thermal: add explicit passive delay to enable step ratio
Due to defalut passive delay of 2 seconds being used for the VT sensor,
previous samples are ignored at 7 seconds intervals. This change sets
explicit passive_delay for VT sensor to make sure we are not ignoring
previous samples and apply step_ratio

Bug: 342257359
Test: Check VIRTUAL-SKIN-MODEL-UPDATED values at run time

Change-Id: I18a9e4913b8153b8d2c3a313451338a9f1b6ca0c
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-05-22 17:05:41 -07:00
Treehugger Robot
e1b30ceb40 Merge "thermal: updated BTS equations" into 24D1-dev 2024-05-21 18:04:30 +00:00
Ramya Subramanian
3359abda9e thermal: updated BTS equations
Bug: 297083757
Test: Tested on CM4 boot to home and with thermal recorder

Change-Id: Ia6071a8c70e19cebeab909ca6c3e36138c93badc
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2024-05-20 21:10:13 +00:00
Sayanna Chandula
bb7c7b5371 thermal: virtualtemp: enable step ratio for vt model
Enabling step ration for vt model would dampen the vt which seems
to be very sensitive to some of the thermistor changes

Bug: 338284524
Test: Build and boot on device. Monitor Virtual Temperature

Change-Id: Ia45f683e3bef9dc1becf74c683c408ffdecf6e48
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-05-15 23:52:04 +00:00
Sayanna Chandula
59dc0432dd Merge "thermal: virtualtemp: update threshold for swithcing to legacy" into 24D1-dev 2024-05-15 00:51:39 +00:00
TeYuan Wang
3dddd667ea thermal: align the latest VSKIN-model for wingboard config
Bug: 328118301
Test: boot to home
Change-Id: I746ed4148094541afa502929d57f39e1ea8c7d68
2024-05-10 23:38:47 +00:00
David Chao
b7ca1c1e1a thermal: Update charging thermal throttling
Reduce temperature and charging throttling overshoots by fine-tuning PID
parameters.

Bug: 303547723
Test: boot and charging thermal throtlting worked properly.
Change-Id: Icaeef76998347167976a1ef3606f417db3c5a380
2024-05-10 23:26:57 +00:00
Sayanna Chandula
640f2f6672 thermal: virtualtemp: update threshold for swithcing to legacy
For mmWAVE test cases, legacy equation is under predicting heavily
resulting in virtua-skin switching to vt legacy even though the
model output was more accurate. This change increases the threshold
to address the same

Bug: 338284524
Test: Build and boot on device

Change-Id: I1c7a14a1d9042a2370c30490969d29294fc95f79
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-05-10 14:30:29 -07:00
Sayanna Chandula
3014b79e70 thermal: virtualtemp: update vt models with dvt and cuj data
- Update VT models trained with dvt and cuj data
- Use backup sensor during undersampling
- Remove battery thermistor from VT model prediction

Bug: 337512118
Bug: 338596757

Test: Build and boot on device. Check VT through dumpsys
adb shell dumpsys thermalservice

Change-Id: Id26238f7baf58e23ef5e1c771d2ee6cf8968ec8e
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-05-07 14:36:41 -07:00
Peter (YM)
c8155e9f31 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: If5d105208ea055230dbbf4b6ecbac799b04a18db
Signed-off-by: Peter (YM) <peterym@google.com>
2024-05-06 02:30:49 +00:00
Treehugger Robot
30eb0787d6 Merge "thermal: Move TPU to the VSKIN-SOC PID loop" into 24D1-dev 2024-05-03 17:00:32 +00:00
TeYuan Wang
1a2a883b47 thermal: Move TPU to the VSKIN-SOC PID loop
Bug: 322223131
Test: run TPU test
Change-Id: I9ed71aed7d2469bbeab0e792d72b2e4c5f618ebc
2024-05-02 23:40:07 +00:00
sashwinbalaji
77bd92b57d thermal: Expose VCharge-Sensors with throttling
Expose virtual charge sensors to which throttling is binded to and
hide those which don't have.

Unhide:
 - VIRTUAL-SKIN-CHARGE-WIRED
 - VIRTUAL-SKIN-CHARGE-PERSIST
Hide:
 - VIRTUAL-SKIN-CHARGE

Bug: 336193005
Test: Verify dumpsys
Change-Id: I4d83f6af17fccb7de8d053c9d981163c9dde0ea3
2024-05-02 09:10:14 +08:00
Jikai Ma
e27cfe4bb8 thermal: update legacy formula with DVT test data
Bug: 320714468

Test: side load to device and successfully start thermal hal service.
Change-Id: I8189d7d7c94d590cc06ac82893d6b3dfd730585a
Signed-off-by: Jikai Ma <jikai@google.com>
2024-05-01 01:11:26 +00:00
Sayanna Chandula
dbb9ba6344 thermal: fix typo in thermal config
Bug: 337094450
Test: Build and boot on device

Change-Id: I5884945aa8be3e1c881b49f5bb379a2ab3e05afb
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-04-29 18:29:26 -07:00
Sayanna Chandula
670fd87775 Merge changes from topic "p24-vt-dvt" into 24D1-dev
* changes:
  thermal: update vt models with dvt data
  thermal: add smooth transition from model to legacy vt
2024-04-29 20:30:39 +00:00
Sayanna Chandula
f90c98757f thermal: update vt models with dvt data
prev_sample_order = 3
activation = leaky_relu
sample_interval_ms = 7000
max_sample_interval_ms = 12000

Bug: 337512118
Test: Build and boot on device. Check VIRTUAL-SKIN temperature

Change-Id: Ia13654991d88435f13c86fc1535caca054e1cc09
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-04-27 14:24:57 -07:00
Sayanna Chandula
dd66c5faaa thermal: add smooth transition from model to legacy vt
- Remove backup sensor and enable under sampling
- Clamp VT_MODEL prediction based on training set max_surface
- Use VT_MODEL_LEGACY_DIFF to decide on switch
- Enable smooth transition with weights

Bug: 336265406
Test: Build and boot on device. Test smooth transition

Change-Id: If30a87a24b12b0af5527d9c05be7a14bb06dcfac
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-04-27 12:15:26 -07:00
Wei Wang
c5a9cdb1ff Merge "thermal: use frequency to define hard limit and cdev ceiling" into 24D1-dev 2024-04-26 17:43:37 +00:00
Jikai Ma
878c5bad5c thermal: fix thermal config typo
Bug: 337094450
Test: side loaded to device and successfully start thermal service.
Change-Id: Ied79a83d5c0e9d4c9393ffa4ef550b382b7b79e1
2024-04-25 19:57:19 -07:00
Peter (YM)
681064ae17 thermal: use frequency to define hard limit and cdev ceiling
Test: Boot to home and flash on device
Bug: 330780045
Change-Id: I428e14f354a5897601cbcaf8f7bbbeb6a0cc5d8f
Signed-off-by: Peter (YM) <peterym@google.com>
2024-04-26 02:38:45 +00:00
Sayanna Chandula
d3d8be7a77 Merge "thermal: update abnormal thresholds for model-legacy-diff" into 24D1-dev 2024-04-19 21:34:41 +00:00
Jikai Ma
768a123df2 Merge "thermal: add support of LSTM model sensors" into 24D1-dev 2024-04-17 20:30:49 +00:00
Jikai Ma
7a7ba4ae75 thermal: add support of LSTM model sensors
- add tflite model files
- add lstm model sensors to thermal config
- add lstm model sensor to virtual skin prediction

Bug: 308179047
Test: build and validate thermal service

Change-Id: Iaff613d75b3766bfbdf40b391e453a94172872a3
Signed-off-by: Jikai Ma <jikai@google.com>
2024-04-16 14:44:38 -07:00
Sayanna Chandula
96ff84c82f thermal: update abnormal thresholds for model-legacy-diff
Reduce threshold to 7C to gather more traces to analyze

Bug: 333110670
Test: Build and boot on device

Change-Id: I2a9ff381055fedaea18791fc030832a8b0877105
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-04-15 22:57:35 -07:00
TeYuan Wang
1ac7f7c59c thermal: adjust CPU cdev_ceiling
Bug: 329697728
Test: run camera test
Change-Id: I410bfdf7d26883985b7f1882d6f449794549b631
2024-04-12 17:58:44 +00:00
Sayanna Chandula
a8fc85d8e7 thermal: update abnormal thresholds for model-legacy-diff
Given that we have very few traces/events uploaded for 12C threshold,
this change reduces the threshold to 10C to help collect more data
to analyze infield abnormalities.

Bug: 333110670
Test: Build and boot on device

Change-Id: Icd3357e543bfd612b856d843a7cf56486361ed81
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-04-10 10:32:53 -07:00
Sayanna Chandula
d6e73fd2c1 thermal: update vt models with evt1.1 cert data
- Models prepared with both PD and Cert data from EVT1.1 tests
- Used leaky_relu activation

Bug: 332971287
Test: Build and boot on device

Change-Id: I07fea17ab21d6efd66d1d74629886051ea92aa94
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-04-04 16:14:30 -07:00
TeYuan Wang
0a476b3b1e thermal: add thermal config for wingboard
Bug: 328118301
Test: boot to home
Change-Id: I8511581cbace269db9bf80a8068e7abb9a885530
2024-04-01 17:45:37 +00:00
sashwinbalaji
9b6048ab03 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:47:41 +08:00
Treehugger Robot
4d48b7c9a3 Merge "thermal: update rule to identify non WLC scenarios" into 24D1-dev 2024-03-26 17:34:25 +00:00
Wei Wang
ff342550fe Merge "thermal: use virutal-skin-legacy for proto devices" into 24D1-dev 2024-03-25 18:20:50 +00:00