Commit graph

315 commits

Author SHA1 Message Date
Eric Biggers
f739cf68c0 Generate a separate fstab file for FIPS mode
Add a file "fstab.gs101-fips" alongside the existing "fstab.gs101" in
order to specify different encryption settings in FIPS mode.

"androidboot.fstab_suffix=gs101-fips" on the kernel command line will be
used to select the FIPS fstab when needed.

As the two fstabs should be otherwise identical, generate them from a
template file so that they will stay in sync.

Note that generating the fstabs requires that they be installed as build
system modules rather than via PRODUCT_COPY_FILES, which results in the
vendor_ramdisk copy of the fstabs being installed to system/etc rather
than /.  This shouldn't cause any problem, now that Android has been
updated to look for the fstab in this location too.

Bug: 191417025
Change-Id: I1d115e014df8ba2fb83046ac0b9b791597364846
2021-08-30 14:09:06 -07:00
AleX Pelosi
ac171ac32d gs101: use CPU4 in charger mode am: 5ac742b9fc am: 3fb606c6a6
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/15631479

Change-Id: I006252fa85755ec29f808dd682b124b8ec606e24
2021-08-20 00:28:16 +00:00
AleX Pelosi
41fcd9e444 gs101: use CPU4 in charger mode
For charging efficiency certification swap CPU6 with CPU4 while in
off-mode charging.

Bug: 194146139
Signed-off-by: AleX Pelosi <apelosi@google.com>
Change-Id: Ib2bee00b952df65d60534342e20f5d331b839e4c
Merged-In: Ib2bee00b952df65d60534342e20f5d331b839e4c
2021-08-19 23:49:43 +00:00
George Chang
957e03aca2 Remove NFC/SE settings from common gs101
Bug: 196825539
Test: build pass
Merged-In: I1833e3206403f1fce30377daaf942e617ed499b7
Change-Id: I1833e3206403f1fce30377daaf942e617ed499b7
2021-08-19 07:22:04 +00:00
George Lee
1fd62f31bf bcl: Put OCP_WARN level back to original level
Bug: 196833426
Test: Boot and confirm proper level set
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I3f46c74f35925ee0b31ec719b93d007e93a5a18f
2021-08-17 16:21:12 +00:00
Tri Vo
7290750087 Start storageproxyd early
And restart it after /data is mounted.

Bug: 187105270
Test: boot raven, secure storage test com.android.storage-unittest.td
Change-Id: I505e315b58c3e0830d9a1f11d2f8afd549186535
2021-08-11 16:02:34 +00:00
Tri Vo
f29084928b Set /dev/sg1 permissions in ueventd.rc
This way we don't need to guess when we need to chown.

Bug: 187105270
Test: boot raven
Change-Id: I36b17d440ef340e558b10ed3fef03435ec63690f
2021-08-11 16:02:34 +00:00
George Lee
ff8a3c60a2 bcl: lower ocp_warn for tpu and gpu
Bug: 181348043
Test: Local test and verify trip point
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I499bcfecf4a0eea7459f8cdd41d4e7c59129ffef
2021-08-11 01:32:04 +00:00
TeYuan Wang
cc9cd89806 thermal: provide permission for user space request TPU throttling
Bug: 188701596
Test: ls -al dev/thermal/cdev-by-name/tpu_cooling/user_vote
Change-Id: I8a53b118b2e8e51603554c5fbb8a085d47422918
2021-08-10 23:18:01 +00:00
Daeho Jeong
bb82be6a2a bfq: set slice_idle to 0
Bug: 191606824
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I6a2e52cdf5a43fb2e74b756eb0f1249761d76b0e
2021-08-09 23:10:42 +00:00
Stephane Lee
75619b9882 Create one-shot clear for Trickle-Defend
Test: Ensure there are no sepolicy/permissions errors
Bug: 194447428
Change-Id: Ie295e33967edc3294e1bf6d2192639d6b0377659
2021-08-03 00:20:07 +00:00
George Lee
433a2566e6 bcl: enable batoilo thermal zone
Enabling batoilo thermal zone.
Reduced soft_ocp_warn per bug 184739333.

Bug: 194240210
Test: Local test: flash and boot
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I4cad70946af1cd8ffd2131df9f505dac49b8c8f8
2021-07-30 20:49:41 +00:00
Lisa Liu
d79a11550b gs101: Start bootanimation explicitly.
Start bootanimation explicitly by name. Let animation start before
surfaceflinger to avoid the condition ctl.start bootanim queued after mount_all command.

Bug: 193726798
Bug: 191910503
Test: boot test
Change-Id: Id0d276ac8bca39c6ac1dae2b2d542107a9522b91
2021-07-30 14:08:15 +08:00
Bart Van Assche
864a08d3a7 init.gs101.rc: Reduce the queue depth for /dev/sda
Use the default chosen by the block layer (64). The purpose of this patch is
to reduce storage latency. Without this patch:

 # grep -aH . /sys/block/sd*/queue/nr_requests
/sys/block/sda/queue/nr_requests:256
/sys/block/sdb/queue/nr_requests:64
/sys/block/sdc/queue/nr_requests:64
/sys/block/sdd/queue/nr_requests:64

With this patch applied:

 # grep -aH . /sys/block/sd*/queue/nr_requests
/sys/block/sda/queue/nr_requests:64
/sys/block/sdb/queue/nr_requests:64
/sys/block/sdc/queue/nr_requests:64
/sys/block/sdd/queue/nr_requests:64

Bug: 194450129
Test: Built Android images and installed these on an Android phone.
Change-Id: I236874f3791d62a2d5faf0d37a149025639f5c4a
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2021-07-29 13:31:50 -07:00
Rick Yiu
e05964f062 gs101: Disable system group boost in off charger mode
Bug: 193192017
Test: build pass
Change-Id: Ieb5ff22808f22eb5796950d427986f352d748839
2021-07-28 01:24:48 +00:00
Jack Wu
b089995845 add permission for pca charge_stats access
Bug: 194386750
Test: no Permission denied while accessing the file node
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Ia399e59a2f7098147522161d5c7458545febfb77
2021-07-24 06:42:51 +00:00
YiHo Cheng
2bb5a796f9 thermal: Update usb_pwr_therm2 emul_temp control
Update usb_pwr_therm2 emul_temp control to allow
vendor.disable.usb.overheat.mitigation.control to disable/enable
usbc-port throttling to prevent device offline during thermal
mitigation test in lab.

Bug: 194252201
Test: setprop vendor.disable.usb.overheat.mitigation.control 0/1 to
check usb_pwr_therm2 temperature reading

Change-Id: Ia522706ce32bee68596b977a3e526f0b951a95ca
2021-07-23 17:45:41 +00:00
Jack Wu
9e5b9c54c0 move permission for WirelessCharger HAL to init
Bug: 194354746
Test: there is no wireless access error
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: I2dcc54047129132c38899d5e4310dc7c1ca7bc80
2021-07-23 12:09:26 +00:00
vincechiu
f3b644db0c Camera: create three new groups for camera threads
high-group is running on CPU 6-7.
mid-group is running on CPU 4-5.
mid-high-gropu is running on CPU 4-7.
Move camera tasks to CPU 4-7 for 1 seconds when AP launch.

Bug: 194271751
Test: GCA
Change-Id: I8e13e9ad0057b8f42f8ed3958bf0c6d58a5a02bc
2021-07-23 09:03:24 +00:00
Lisa Liu
9a20a9faee gs101: tune vendor_sched parameters for boot time
Set uclamp_min and prefer_idle to sys_group to improve 2nd init
stage boot time performance.
* original
boot_progress_start_avg: 4832.3
* with tuning
boot_progress_start_avg: 4028.75

Bug: 193192017
Test: boot test
Change-Id: I8ebd52fddceadbee22e9a8c75969d52047b2acfc
2021-07-23 06:38:38 +00:00
Rick Yiu
4b4ee6e226 gs101: Change uclamp max setting for bg group
Set to 60% or 615.

Bug: 188947181
Test: build pass
Change-Id: I93a423b1c0cb297df709971304f8101b27e46a1d
2021-07-23 01:06:10 +00:00
TeYuan Wang
d0a506b5d9 thermal: Enable thermalHAL in off charging mode
To support USB port overheat protection, we need to launch thermalHAL in
off charging mode.

Bug: 183573049
Test: verified usb port overheat protection in off charging mode with
emul temp

Change-Id: I0b36646d9779c2c1a25f38aafea5ca178bf91be1
2021-07-21 17:09:36 +00:00
TeYuan Wang
cf33914f6c thermal: change permission for usbc related thermal sysfs
Bug: 183573049
Test: check permission for usbc related thermal sysfs
Change-Id: Id5af18d9f0fc5acfe29d9b5be3f3beabaa36f480
2021-07-20 23:53:52 +00:00
Stephane Lee
870465e109 Add cpm/pca9468 logbuffer directories so that bugreports can take a snapshot
Test: adb bugreport; check dumpstate_board.txt
Bug: 193894298
Change-Id: I548a1715fe2ee679fef304fc4da9465c691e70c0
2021-07-19 20:54:38 +00:00
Stephane Lee
88fb5844e5 odpm: Create powerstats vendor data folder on init
Test: Ensure that there are no sepolicy errors for odpm_config
Bug: 192674986
Change-Id: I0c576a823451159c1208b49563649db174533e86
2021-07-16 01:55:33 +00:00
Taeju Park
3dd2b9777f Tuning down_rate_limit and down_rate_limit_scale_pow to improve power consumption
Bug: 170511089
Change-Id: I665b38aa633296c6d8f36efd5b3a49c582d87dc4
Signed-off-by: Taeju Park <taeju@google.com>
2021-07-15 22:05:01 +00:00
Wei Wang
ec8345ffbe Fix the right uclamp.min for SF render engine
Bug: 192099706
Test: boot and trace
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ic8d1c65701ae0190988a758a31f0d0baaed54d71
2021-07-14 20:47:16 +00:00
Wei Wang
30393266aa Boost SF when interaction hint is active.
We have seen cases SF main thread running longer occasionally which may
run in danger of missing frames. This CL lifts cpufreq for SF when touch
boost is active to compensate the sudden jump of its cpu demand.

Bug: 192099706
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I49b2d589249f60a38eab907afbadfbcfdd233d1c
2021-07-14 06:18:59 +00:00
Stephane Lee
113bb9059a Add DC Charging/Temp defend clear to server configurable parameters; ensure sysfs node is writable
Test: Ensure there are no errors on logcat | grep google_battery@
Bug: 183772980
Bug: 192921867
Change-Id: Id55a6a1670cc0c46b787baec16efec8c0bb4521d
2021-07-12 13:27:54 -07:00
YiHo Cheng
e90e9f58bf thermal: Update neutral_therm trip point
Allow to thermalhal to update trip points for neutral_therm which is the
triggering sensor of virtual skin sensor for o6 proto.

Bug: 193373779
Test: neutral_therm can be updated to the correct threshold
Change-Id: I16dcd44ce9e69f456df322664756dc74357bf50b
2021-07-12 15:25:37 +00:00
Long Ling
7983b026c6 init: update sysfs early_wake attribute
Allow HWC to modfiy early_wakeup

Bug: 187763532
Change-Id: If3b6e664bf510895aae06ba3cac2620c267d6a60
2021-07-12 15:14:59 +00:00
Albert Wang
ed651c86bf Move init.gs101.usb.rc under hw/
Bug: 192498561
Test: boot to home normally
Signed-off-by: Albert Wang <albertccwang@google.com>
Change-Id: I465a668035cf03c6ac9587a6d48d22e2f52133d0
2021-07-07 15:18:17 +00:00
Konstantin Vyshetsky
cf18666812 ufs: set clkgate_enable when in offmode charging
Bug: 190729148
Bug: 190727603
Test: manual R4
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I2f544cc01af18a0a6e85a2abd37d8621f24e286d
2021-07-04 03:56:30 +00:00
Midas Chien
69e6504dec init: allow hwcomposer to write early wake up node
Bug: 189173278
Bug: 191386940
Test: hwcomposer able to write node
Change-Id: Iede3d6121d5157732cfa1f18491bc7a3292ff2f3
2021-07-02 18:36:38 +00:00
Erick Reyes
1c54b52a93 gs101: add compatibility path for TPU
This is to expose a common path to runtime.

Test: Manual. Verified edgetpu_logging works with modified path
Bug: 191193044

Signed-off-by: Erick Reyes <erickreyes@google.com>
Change-Id: I11865108931443d96389640c89b6cc29aee3a634
2021-06-29 23:19:45 +00:00
Lisa Liu
2261184ed9 Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Bug: 191646246
Test: Boot test
Change-Id: I7e5e12c4422aa516cd9d8c63b1e5be37b6aa80bf
2021-06-25 01:50:01 +00:00
Adam Shih
c7884a192e modularize pktrouter
Bug: 190331212
Test: make sure pktrouter gets initialized
06-23 13:21:19.372  1 1 I init : Parsing file /vendor/etc/init/pktrouter.rc...
06-23 13:21:23.510     1     1 I init    : processing action (vendor.pktrouter=1) from (/vendor/etc/init/pktrouter.rc:7)
06-23 13:21:23.510     1     1 I init    : starting service 'pktrouter'...
Change-Id: I89de2b2dd151bba877dea0bd5db0df1048b2ab6b
2021-06-24 07:24:45 +00:00
TeYuan Wang
4c97453535 thermal: move gs101 thermal permission commands to device folder
Bug: 182970733
Test: check the thermal sysfs permission on O6
Change-Id: I80c0571aca9cbff1881c884350a5ca39e6beef6b
2021-06-23 23:09:44 +00:00
Denny cy Lee
294e58b1b2 init.hardware.rc: add permission for battery eeprom
Bug: 189050725
Test: manually, file mod owner: 644 system
Change-Id: Iff5bb544f9fb76556ef783d04abd363240c6bd3b
Signed-off-by: Denny cy Lee <dennycylee@google.com>
2021-06-23 08:22:41 +00:00
vincenttew
4b566654f4 create audio folder to store calibration data
Test: build pass
Bug: 188503612
Signed-off-by: vincenttew <vincenttew@google.com>
Change-Id: I5b3bfbd854d62ea8eddea0017fd8654476ae8a20
2021-06-21 10:04:14 +00:00
Jack Wu
31d5416e15 add permission for wireless charge_stats access
Bug: 176195960
Test: no Permission denied while accessing the file node
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Ia70c110de8bc1b6166c57e9c3df3d4f43f23a428
2021-06-19 00:33:13 +00:00
yihsiangpeng
eb215e398b Add permission for WirelessCharger HAL
Bug: 186797309
Signed-off-by: yihsiangpeng <yihsiangpeng@google.com>
Change-Id: I8cd9d8c7e7acb35149a73a8beba8bb4be5a7ce1e
2021-06-18 17:01:00 +00:00
Rick Yiu
3ce37fb4f1 gs101: Modify nnapi uclamp settings
Chaning setting for better benchmark performance.

Bug: 189074148
Test: build pass
Change-Id: I3c33147ec88494ff5b709063d6568add0e17933a
2021-06-18 06:20:30 +00:00
Badhri Jagan Sridharan
6e44d2ee0c dumpstate: dump logbuffer tcpm logs in bugreport
Bug: 189792358
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I64cf665985226c81ff23b32bda25c303d8031d5f
2021-06-17 16:19:38 -07:00
Wei Wang
9e92582df5 Fix app launch boost override by ADPF
Bug: 177493042
Bug: 170487162
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ifa6ec954396f05c1e98516f819b4e4e44e4a692d
2021-06-16 22:40:35 +00:00
Wei Wang
2fee52bbf5 Relax SurfaceFlinger cpuset and adding uclamp.min for RenderEngine
SurfaceFlinger IPC improved with mid and big cores, relaxing cpuset will
help improve its efficiency. For render engine, we set uclamp.min to
skip scheduling on little cores.

FWIW, we let the RT scheduler figure out what is good for perf/power.

Bug: 170507315
Bug: 191054286
Test: Build and boot
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I880cf549e33a3a2f629e8260366c4ce8c34c3ae6
2021-06-15 19:15:18 +00:00
Ted Lin
0671df09b8 Remove the attribute set from init.rc for debugfs
[    2.993897] audit: type=1400 audit(1623037840.652:4): avc:  denied  { setattr } for
pid=374 comm="init" name="registers" dev="debugfs" ino=9 scontext=u:r:vendor_init:s0
tcontext=u:object_r:vendor_regmap_debugfs:s0 tclass=file permissive=0

[    3.079941] audit: type=1400 audit(1623037840.740:7): avc:  denied  { setattr } for  pid=374 comm="init" name="fg_model" dev="debugfs" ino=18 scontext=u:r:vendor_init:s0 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=0

Bug: 190337297
Test: check bugreport
Change-Id: Ia6d33d6192b230be763e52298b86a21b632ffa90
Signed-off-by: Ted Lin <tedlin@google.com>
2021-06-15 02:37:45 +00:00
Kyle Lin
dc29ed3477 init.gs101.rc: adjust memlat settings
Bug: 170479348
Test: build, boot and check the values
Change-Id: I4d2463dbb377074916ac1d5fe2f4b8880fa58da0
2021-06-11 00:06:23 +00:00
Rick Yiu
7e195263bf gs101: Refine vendor_sched parameters
Also set 512 to bg_group_throttle.

Bug: 170508405
Test: value set correctly
Change-Id: I5ff0a9630b459b8783f358106da4ca2a20154636
2021-06-10 04:16:44 +00:00
Cyan Hsieh
88218211cc Revert "Set audio.camerasound.force for JP devices"
This reverts commit b6c4f766b748af81d502cf031c75b2c6c4c7cf09.

Reason for revert: switch to use ro.boot.hardware.sku for judgement

Bug: 188396079
Change-Id: I012b2d32d9b7245fd1d1be5a00c5e922a1f52d19
2021-06-08 16:50:31 +08:00