summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-13bcl: Add log check for real brownout.George Lee
Adding year to the data capture for timestamp comparison during lastmeal.txt generation. Add check within Battery Mitigation to confirm lastmeal.txt contains information related to brownout and only generates if it does contain information about the brownout. Bug: 246817058 Test: Confirm proper lastmeal.txt generation Signed-off-by: George Lee <geolee@google.com> Change-Id: Ie5efbfbdb86688231728056fa3254d698d63046b
2022-09-27Merge "zram: support zram size experiments" into tm-qpr-devRichard Chang
2022-09-23Merge "pixelstats: support thermal stats" into tm-qpr-devSayanna Chandula
2022-09-23thermal: log sub sensors temperature at INFO levelTeYuan Wang
Bug: 244253837 Bug: 247907195 Test: Check logcat for sub sensors temperature Change-Id: I999ae50ca71a66a07adc5834dcac1c476eb4f69d
2022-09-21Merge "cs40l25: Remove the low level Ramp Down feature" into tm-qpr-devTreeHugger Robot
2022-09-21cs40l25: Remove the low level Ramp Down featureChase Wu
When enabling both high/low level ramp down feature, the random buzzy feeling will appear . To fix this symptom, we disable the low level ramp down feature since it let high level one lose it's function under a back-to-back call and when the high level one do nothing, the buzzy feeling will appear. Bug: 242061915 Bug: 246475480 Test: check the delay time from VibrationThread logs Signed-off-by: Chase Wu <chasewu@google.com> Change-Id: Id2aab1179125985b5bb83652c55118c0ce672fcd
2022-09-20pixelstats: support thermal statsSayanna Chandula
Add support for thermal stats with dfs metrics Bug: 228247740 Test: Build and boot on device adb shell cmd stats print-stats | grep -i <atom-id> Change-Id: Id466c43ee8503c1bdf99c3ad8218336874ebe595
2022-09-19Merge changes I379924bc,Ibcc0438e into tm-qpr-devChris Paulo
* changes: cs40l26: protect mActiveID with mutex cs40l26: restore global gain setting when off
2022-09-19Merge "cs40l26: remove alwaysOn support" into tm-qpr-devTreeHugger Robot
2022-09-19zram: support zram size experimentsRichard Chang
Let vendor_init adjusted the zram size by device config from the server. Allow us to study the performance and power impacts by experiment settings. Change persist.vendor.zram.size to persist.vendor.boot.zram.size since it only takes effect when next booting. Bug: 240128114 Test: adb remount ; adb push pixel-mm-gki.rc /vendor/etc/init/ ; adb reboot Test: adb shell setprop persist.device_config.vendor_system_native_boot.zram_size 4g ; adb reboot ; check zram swap size is 4g Test: adb shell setprop persist.device_config.vendor_system_native_boot.zram_size 4g ; adb shell setprop persist.vendor.boot.zram.size 3g ; adb reboot ; check check zram swap size is 3g Change-Id: I0bf62fe1275a1e0bed129d78db9b4e1e5c353dbe
2022-09-16Merge "vibrator: cs40l26: Add f0 and redc compensation switch" into tm-qpr-devTreeHugger Robot
2022-09-16cs40l26: protect mActiveID with mutexTai Kuo
Bug: 242157565 Test: atest PtsVibratorHalTestSuite \ VtsHalVibratorManagerTargetTest \ VtsHalVibratorTargetTest \ android.os.cts.VibratorTest \ android.os.cts.VibratorManagerTest \ android.os.cts.VibrationEffectTest \ android.os.cts.VibrationAttributesTest \ android.os.cts.CombinedVibrationTest Change-Id: I379924bc2a5d06fc9f903eb1800e9bea5b0ac4ac
2022-09-16Merge "BatteryDefender: DWELL-DEFEND will trigger only when soc reaches ↵TreeHugger Robot
100%" into tm-qpr-dev
2022-09-16Merge "thermal: in lshal-debug make headings camelCase and ending with ↵Wei Wang
colon" into tm-qpr-dev
2022-09-16vibrator: cs40l26: Add f0 and redc compensation switchChase Wu
Bug: 241353178 Test: check the value after device boot up Test: update PtsHapticsTestCases and run it Test: atest VibratorHalCs40l26TestSuite Signed-off-by: Chase Wu <chasewu@google.com> Change-Id: I5b3be34ad5a97294392a24a29506ec107f504258 Merged-In: I5b3be34ad5a97294392a24a29506ec107f504258
2022-09-16BatteryDefender: DWELL-DEFEND will trigger only when soc reaches 100%Jack Wu
DWELL-DEFEND will start counting time only when soc reaches 100%. remove the condition if/when Dock-defend triggers since soc does not over 90% Bug: 242948736 Test: DWELL-DEFEND triggers only after soc reaches 100% Signed-off-by: Jack Wu <wjack@google.com> Change-Id: I56103bc1547cfbea4770e095f08b5a55eee39cdf
2022-09-15cs40l26: remove alwaysOn supportTai Kuo
Bug: 246772422 Test: atest PtsVibratorHalTestSuite Test: atest VibratorHalCs40l26TestSuite Change-Id: I1513da7f51f380227742200baf5ec0b41da2f374
2022-09-15cs40l26: restore global gain setting when offTai Kuo
Bug: 242157565 Test: Connect/Disconnect with USB, then check audio-coupled-haptics. Test: atest VibratorHalCs40l26TestSuite Change-Id: Ibcc0438edb91edeb4c56de80e2a108e7e31a1451
2022-09-14thermal: in lshal-debug make headings camelCase and ending with colonsashwinbalaji
-Make all entries have same format headerTitle: content1 content2 Bug: 246489316 Test: adb shell lshal debug android.hardware.thermal@2.0::IThermal/default Change-Id: Ia0fcda5eda89d999730db1754cdb68f2de217876
2022-09-14Merge "zram: add more zram size config" into tm-qpr-devTreeHugger Robot
2022-09-08zram: add more zram size configMartin Liu
This change adds more zram size and percentage configs. Test: boot Bug: 240128114 Signed-off-by: Martin Liu <liumartin@google.com> Change-Id: I7ada20b67a1beb8f57666a5d2649dd5ca4324931
2022-09-01attempt to wipe digital car keys when clearing userdata from fastbootdJeffrey Carlyle
A WipeKeys function is optionally compiled into the recovery UI on Pixels where digital car keys are supported. This change looks for that function and, if found, uses it to clear the keys during a userdata wipe. Includes are reordered based on repohook requirements. (cherry picked from commit 6e7361b7f72c0de51757ec061c8a0fb016c6070d) Bug: 203234558 Test: data wipe in Android recovery mode on raven Test: data wipe in Android recovery mode on c10 Test: data wipe in user mode fastbootd mode on raven Test: data wipe in user mode fastbootd mode on c10 Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com> Change-Id: I5854110bcb291389db62d2dce0623d74e6715d97
2022-09-01thermal: fix racing when thermalHAL startTeYuan Wang
1. interface_start will bypass the "disabled" flag, so thermalHAL will be started before symlinks ready that cause trip point update unsuccessfully. 2. There has been policies to trigger symlink and thermalHAL service at "boot" stage, so we don't need hal class setting in rc. Bug: 244381248 Test: P22: confirm the trip points can be overwritten by thermalHAL successfully. Coral: thermal-engine and thermalHAL throttling work normally Change-Id: I61b29c7e3dfdfd2b118c277552fa731a395be479
2022-08-29Merge changes from topic "MM Metrics 2022" into tm-qpr-devRobin Hsu
* changes: pixelstat: MM metrics: compaction duration metrics pixelstat: MM metrics: direct reclaim metrics pixelstat: MM metrics: add generic reader pixelstat: MM metrics: new vmstat metrics pixelstat: MM metrics: PSI metrics pixelstat: MM metrics: framework change pixelstat: MM metrics: keep 1st report pixelstat: MM metrics: proto file
2022-08-26Merge "Revert "attempt to wipe digital car keys when clearing userdata from ↵Jeffrey Carlyle
fastbootd"" into tm-qpr-dev
2022-08-26Revert "attempt to wipe digital car keys when clearing userdata from fastbootd"Jeffrey Carlyle
This reverts commit 6e7361b7f72c0de51757ec061c8a0fb016c6070d. Reason for revert: see b/243864778 Change-Id: Iff77acb996008c21fc7d5e731d5852b1b240ac86
2022-08-26pixelstat: MM metrics: compaction duration metricsRobin Hsu
Compaction duration metrics: (/sys/kernel/pixel_stat/mm/compaction/mm_compaction_duration) Sample output: (root) # cat /sys/kernel/pixel_stat/mm/compaction/mm_compaction_duration 2 480 0 0 0 2 0 Test: local test Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: Ie5329acf0b312f9245c882738b210a8a231b5899
2022-08-26pixelstat: MM metrics: direct reclaim metricsRobin Hsu
Direct reclaim metrics: /sys/kernel/pixel_stat/mm/vmscan/direct_reclaim/<level>/latency_stat <level> could be native, top, visible, or other Sample output: (root) # cat /sys/kernel/pixel_stat/mm/vmscan/direct_reclaim/native/latency_stat 138 7888 70 35 31 2 Test: local test Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: If695ae5016037b6bd1e213981340f2b14bf756f2
2022-08-26pixelstat: MM metrics: add generic readerRobin Hsu
Add shared functions for reading direct reclaim and compaction duration information. The format is a number of integers. e.g. /sys/kernel/pixel_stat/mm/vmscan/direct_reclaim/visible/latency_stat: 0 0 0 0 0 0 Test: local test Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: If09cf4b6538be0bcbb99a9e90a81784a9c406bc9
2022-08-26pixelstat: MM metrics: new vmstat metricsRobin Hsu
We previous employed some vmstat metrics (proc/vmstat). This time we add even more: * Added metrics list "workingset_refault_file" "workingset_refault_anon" "compact_success" "compact_fail" "kswapd_low_wmark_hit_quickly" "kswapd_high_wmark_hit_quickly" "thp_file_alloc" "thp_zero_page_alloc" "thp_split_page" "thp_migration_split" "thp_deferred_split_page" * Note: previous implementation mixed "workingset_refault" and "workingset_refault_file". As old kernel only has "workingset_refault", newer kernel has separated 'workingset_refault_file", and "workingset_refault_anon" This CL define it more clearly, where old metrics are left there for backward compatibility, and added two more metrics for '_file' and '_anon'. Test: local test Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: I812386bec4db3d982a82731f82bc61af9c53b9e5
2022-08-26pixelstat: MM metrics: PSI metricsRobin Hsu
PSI metrics: (proc/pressure/<xyz>, xyz = cpu, io, or memory) sample output: /proc/pressure # cat cpu some avg10=2.93 avg60=3.17 avg300=3.15 total=94628150260 /proc/pressure # cat io some avg10=1.06 avg60=1.15 avg300=1.18 total=37709873805 full avg10=1.06 avg60=1.10 avg300=1.11 total=36592322936 /proc/pressure # cat memory some avg10=0.00 avg60=0.00 avg300=0.00 total=29705314 full avg10=0.00 avg60=0.00 avg300=0.00 total=17234456 avg<n>: <n> = 10, 60, 300 means <n> second moving average stall % 2-decimal digits accuracy. Used fixed-point with 2-decimal digit e.g. 16.66% => 1666 We sample the avg<n> metrics per 5 minutes and aggregate min, max and avg for avg<n> total: total stall (not in percentage) 'total' metrics will not be aggregated. They will be shown as per hour difference (current value - previous value). Test: local test Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: Ia074aac8a49ad1315195935322f143416a56f413
2022-08-26pixelstats: Correct gc_urgent_mid mode indexOcean Chen
It used the wrong index to upload data. Bug: 229049054 Change-Id: I97ca5014c7a341b919853ecfdabfd44df57f2735
2022-08-25pixelstats: modify VendorAudioHardwareStatsReported for lintRoger Fang
g3 lint requires proto naming as lower case. Bug: 227458662 Bug: 239508478 Test: Trigger ATEST TH build pass Signed-off-by: Roger Fang <rogerfang@google.com> Change-Id: I2ea341c15783a2db64001e5898875550554d1f52
2022-08-24Merge "attempt to wipe digital car keys when clearing userdata from ↵Jeffrey Carlyle
fastbootd" into tm-qpr-dev
2022-08-24Merge "pixelstat: add missing attr of VendorAudioHardwareStatsReported" into ↵Roger Fang
tm-qpr-dev
2022-08-23pixelstat: add missing attr of VendorAudioHardwareStatsReportedRoger Fang
Missing the default attributes in the proto definition Bug: 227458662 Bug: 239508478 Test: Trigger ATEST TH build pass Signed-off-by: Roger Fang <rogerfang@google.com> Change-Id: Iaf22cd64af07851bf683a6ffc319353a49285f20
2022-08-23Merge "Pixelstats: support ams_rate sysfs" into tm-qpr-devRoger Fang
2022-08-23pixelstat: MM metrics: framework changeRobin Hsu
Some small change in the MM metrics framework: * Previously preparing atom by a vector "values", and the vector is keep resized per module added in. This CL calculates the last index and allocate space for the vector once for all. Note that later on, if we want to add or remove some metrics, we need to change the last index to keep it sync to the last metric proto file. * Add version for 'PixelMmMetricsPerHour' and 'PixelMmMetricsPerday' (and it is the last metrics as defined in the design doc) Test: n/a Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: I35da187f9318e8aed089c3676d8c6df815913f02
2022-08-23pixelstat: MM metrics: keep 1st reportRobin Hsu
For atom 'PixelMmMetricsPerHour', previously we skip the first round metrics reports. The intention was to skip those heavy boot-time metrics so that it won't affect our statistics on normal data. However, in newer implementation, we already have the elapsed_timetsamp_nanos field (event time in "devices time since boot" format) in the Suez table (b/223529199). Now it's even better: We can use the device time to filter out those boot events, and we can separate the statistics into two categories: (1) normal, and (2) boot time. So this time we don't skip the first round report. Test: n/a Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: I05705e4b16b6e790b54b17a149179b6ea24f2fdf
2022-08-23Pixelstats: support ams_rate sysfsRoger Fang
Add sysfs to report auto microphone switch rate metric. Bug: 227458662 Bug: 239508478 Test: check log in logcat Signed-off-by: Roger Fang <rogerfang@google.com> Change-Id: Id2d3d3c506badc7da164fc82326ad034f54d9acf
2022-08-22Fix charge capacity being not reportedStephane Lee
The value was added at the end of the array. If there are no wireless stats, we will not be reporting the value. Test: Ensure that charge capacity is reported via statsd Bug: 243077852 Change-Id: I9e304f2dc230c840dd8b679b779045b64c455cc2
2022-08-22Merge "thermal: move charger thermal HAL into project folder" into tm-qpr-devWei Wang
2022-08-22thermal: move charger thermal HAL into project folderDavid Chao
Move charger pixel-thermal-symlink from common to project folder to prevent the GKI version dependencies from blocking init. Bug: 240897207 Test: thermal_symlinks worked properly in charging mode Change-Id: Id8dbdb20cd730c904ce636210a3b6cf0785ab826
2022-08-22pixelstat: MM metrics: proto fileRobin Hsu
proto file: Added metrics. Eldar: 721257251 Test: n/a Bug: 234564667 Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: I9264107b23f171df2ebb295072bbce8bd81cefcd
2022-08-16battery_mitigation. Early sync avoid corruptionGeorge Lee
We want to make sure thismeal.txt contains legible content instead of corrupted characters. Added an early fsync before the SYSFS read to ensure interrupt name is logged. Bug: 242764069 Test: Confirm that thismeal.txt can be logged Signed-off-by: George Lee <geolee@google.com> Change-Id: I323fa5ea73c455c2e00d204b1b0bb69bc56e2cb0
2022-08-16ADPF: optimize the wakeup performance and fix unstable boost.jimmyshiu
Optimize boost: A more efficient way is to trigger the wakeup boost through mTidSessionListMap, so the time complexity reduce from O(n^3) to O(n^2). The original code path: PSM:wakeSessions() contains a loop that is O(n), inside the loop, it calls to PHS::wakeup() which call to PSM::setUclampMinLocked(), and PSM::setUclampMinLocked() contains two loops O(n^2) The new code path: PSM::wakeSessions() directly checks all the ADPF tasks O(n) and get the wakeup boost value O(n), then directly set the uclamp.min The time complexity lower to O(n^2). Fix unstable boost: The original flow is to find max boost and wake it up from stale state one by one. But the previous woken ones would not be counted when the later ones finding their max boost value. The new flow boost all the tasks first, then wake up all those sessions. Bug: 235510337 Test: Manually playing UIBench -> Transitions -> ActivityTransition Change-Id: I995673b74401e198eb72188134ba1ebc134f971c
2022-08-11attempt to wipe digital car keys when clearing userdata from fastbootdJeffrey Carlyle
A WipeKeys function is optionally compiled into the recovery UI on Pixels where digital car keys are supported. This change looks for that function and, if found, uses it to clear the keys during a userdata wipe. Includes are reordered based on repohook requirements. Bug: 203234558 Test: adb reboot fastboot && fastboot -w; then check for key after reboot Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com> Change-Id: I46a58f7d521fdefd0675be0b4180bbefdee2e660 Merged-In: I46a58f7d521fdefd0675be0b4180bbefdee2e660
2022-08-10ADPF: extend non-stale session timer in wakeup am: 986c81e89bWei Wang
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/pixel/+/19562478 Change-Id: I77fa30b1a67ed1e9eb5ace66a5c3e78e0cb60798 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-09ADPF: extend non-stale session timer in wakeupWei Wang
For DISPLAY_UPDATE_IMMINENT wakeup signal, non-stale session's timer should be also extended. This resolves the performance issue caused those sessions to go stale     prematurely. Bug: 241621485 Test: Build Signed-off-by: Wei Wang <wvw@google.com> Change-Id: I06330e064060248bb556ae35e0cb8fd302cef231
2022-08-08ADPF: extend non-stale session timer in wakeupWei Wang
For DISPLAY_UPDATE_IMMINENT wakeup signal, non-stale session's timer should be also extended. This resolves the performance issue caused those sessions to go stale     prematurely. Bug: 241621485 Test: Build Signed-off-by: Wei Wang <wvw@google.com> Change-Id: I06330e064060248bb556ae35e0cb8fd302cef231