Commit graph

71 commits

Author SHA1 Message Date
TeYuan Wang
5c95b36ea8 thermal: provide chg_mdis permission for thermalHAL
Bug: 226130317
Test: ls -al dev/thermal/cdev-by-name/chg_mdis/cur_state
Change-Id: Id0681d66f33f94baed52f67aea63270a6875ac14
2022-04-06 01:55:13 +00:00
George Lee
ea926b06e2 thermal: Reconfigure DFS Clock to divide by 4
1. Reconfigure DFS clock divider to divide by 4.
2. OCP_WARN_CPU2 was repurposed for DFS usage.  Since SOFT_OCP_WARN_CPU2
was not used by BCL, it will be repurposed to replace OCP_WARN_CPU2.

Bug: 223909471
Test: Local test to verify register value
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Ie9960c30b102d67f0ade156631386b656ff82790
2022-04-01 18:34:58 +00:00
TeYuan Wang
6f00cd7be1 bcl: modify batoilo trip_point_0 permission for thermalHAL
Bug: 222017625
Test: adb shell ls -al dev/thermal/tz-by-name/batoilo/trip_point_0*
Change-Id: Ie8d122a8b70bd4f975e586733f5f2a74c46cdaa9
2022-03-30 06:12:12 +00:00
chungkai
1a05b6dc70 init: add uclamp threshold setting
To filter tiny task, add uclamp threshold setting

Test: build and boot pass
Bug: 214098855
Signed-off-by: chungkai <chungkai@google.com>
Change-Id: Ib8f20a8d0134eff972084cd72a2975d7f778d539
2022-03-30 03:49:30 +00:00
Rick Yiu
3c9226acc7 Change file permission for perfer_idle
Sync permission to other nodes.

Bug: 224637637
Test: build pass
Change-Id: I5e9d4dab6bdb94ad2ca8dd4bb6e52bff72f8b6ee
2022-03-29 10:25:06 +00:00
Ken Tsou
ee38fc1122 battery: Enable Battery Defender
Sync with ag/14540731 to fix the wrong path.
BatteryDefender: Failed to write /sys/devices/platform/soc/soc:google,charger/charge_start_level
BatteryDefender: Failed to write /sys/devices/platform/soc/soc:google,charger/charge_stop_level

Bug: 222008498
Change-Id: I4782e2c387b147fc48cf4134d27af8675964dc44
Signed-off-by: Ken Tsou <kentsou@google.com>
2022-03-25 03:08:25 +00:00
chungkai
b586e0609f sched: move sysfs to procfs
Modify the path of vendor_sched nodes

Test: work normally
Bug: 216207007
Signed-off-by: chungkai <chungkai@google.com>
Change-Id: Ib239ec8bbff66a7f25205eff68c0213cc6b62d69
2022-03-24 17:44:37 +00:00
SalmaxChang
602c38c63f conf: support to mount modem erofs image
- Create fstab.modem for modem as flexibility.
- Add and support both erofs and ext4 images for compatibility.

Bug: 201348703
Change-Id: Idc6dd8ef8f044c764f2811469806ee9e6defb87f
2022-03-17 05:56:33 +00:00
Jaegeuk Kim
6d4913e3c7 Remove discard command tuning
This is done by rootdir/init.rc.

Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I939c97aa2cd2ee271f05053eea0af006f6c9b8a1
2022-03-17 03:22:07 +00:00
Randall Huang
3bec1149e8 UFS: enable UFS clock gating when off mode charging
Avoid high UFS power consumption

Bug: 224888044
Test: check clkgate_enable in uart console
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: Ie5504a259621a8661133eebd8f574d5af2809abb
2022-03-16 16:50:46 +00:00
Denny cy Lee
f9c2f03287 Pixelstats: porting from p21
Bug: 222019890
Bug: 222657999
Test: check debug logcat in pixelstat, HardwareInfo
Change-Id: I110a2b2713b6c27e23418569bb8d1b726af07b95
2022-03-15 03:09:18 +00:00
Midas Chien
93fdc4704e display: make early wakeup node is readable
Bug: 221384860
Test: cat node
Change-Id: I69fe93f467c12e009e97d6f953ba404bec558834
2022-03-14 18:30:42 +00:00
George Lee
5d2540b63c bcl: Increase hardware clock divider count
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: If130d477f617c0e62efa5f35effa122b60253107
2022-03-10 20:17:32 +00:00
Midas Chien
a7b2be93d0 display: allow composer to access panel idle handle exit node
Bug: 202182467
Test: composer can access panel idle handle exit node
Change-Id: I1d117ba50871e633d044b4c8bb25da14df506b66
2022-03-04 06:55:04 +00:00
Rick Yiu
34cad67219 Support SetProcessProfiles for vendor groups
Add ProcFilePath for vendor group change of a process.

Bug: 218684257
Test: function works
Change-Id: I2d87a1a5d27dee699b37de6fac8d8b52334ba54e
2022-03-01 04:32:22 +00:00
Midas Chien
e542e25078 display: allow composer to access panel idle node
Change panel idle node ownership to allow composer to access.

Bug: 198808492
Test: init and composer can write to panel idle node
Change-Id: I9fd7fe752cfe0694216d608765c4647dd3c00b95
2022-02-17 09:17:42 +00:00
Ted Lin
805826c2cc fix the avc denied for maxfg/registers
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:28): avc: denied { search } for name="maxfg" dev="debugfs" ino=31872 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=dir permissive=1 app=com.google.android.hardwareinfo
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:29): avc: denied { read } for name="registers" dev="debugfs" ino=31885 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=1 app=com.google.android.hardwareinfo
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:30): avc: denied { open } for path="/sys/kernel/debug/maxfg/registers" dev="debugfs" ino=31885 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=1 app=com.google.android.hardwareinfo
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:31): avc: denied { getattr } for path="/sys/kernel/debug/maxfg/registers" dev="debugfs" ino=31885 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=1 app=com.google.android.hardwareinfo

Bug: 208909060
Test: adb bugreport
Change-Id: I72a6b72e568fe109350edd2a0a91747251e6fba4
Signed-off-by: Ted Lin <tedlin@google.com>
2022-02-17 09:04:23 +00:00
TeYuan Wang
ae8e17631b thermal: provide gxp-cooling user_vote permission for thermalHAL
Bug: 219869479
Test: ls -al dev/thermal/cdev-by-name/gxp-cooling/user_vote
Change-Id: Id11ad3cb6b1770cbaffb760feaad571c678a22df
2022-02-16 19:34:39 +00:00
Sayanna Chandula
589318e5c4 thermal: enable cooling devices cur state permissions
Enable permissions for wcl_fcc and dc_icl cooling devices
current state for charging throttling.

Bug: 204523879
Test: build and boot on device. Check charging throttling
Change-Id: Icf175bd270d0eb6a9d2adcde2199b034683a8b8f
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2022-02-15 05:10:46 +00:00
Rick Yiu
1b0d78ac5b Sync vendor task_profiles and init rc file
Sync the settings from P21.

Bug: 207573268
Test: build pass
Change-Id: Ia6f761c6247522707d34888347bec6736c227e9e
2022-02-11 13:47:55 +00:00
Kris Chen
0567190969 Configure permission for AOC UDFPS sysfs node.
Bug: 205242782
Bug: 215044794
Test: Verify system process can read/write to the node.
Change-Id: Iecadeb47e08abf300ccd93eb8e95c91eb3195fd2
2022-02-11 02:43:14 +00:00
George Lee
5f5dbb824b thermal: enable gpu/tpu permission for user_vote
Bug: 215814890
Test: Local test to verify permission
Signed-off-by: George Lee <geolee@google.com>

Change-Id: I09d3d9bc5033ba2f31adbb34fa8969dc75a767bc
2022-01-28 23:48:56 +00:00
Kai Shi
fda5286dd1 Increase TCP wmem max size
Increase TCP wmem max size to allow high Tx throughput over wifi.

Bug: 213596972
Test: manual test to confirm TCP memory size is increased and wifi TCP throughput with default TCP window size can reach 700Mbps in HE80 mode.
Change-Id: Id1f6ea94da83825ca39093aba5c85bec5bee4a72
2022-01-26 17:15:38 +00:00
TeYuan Wang
8bf22ece52 BCL: remove thermal zone policy change
ThermalHAL listens genl event, so we do not need to
modify the thermal zone policy to user_space

Bug: 204718864
Test: Confirm no selinux denied log, and thermal zone policy is not changed
Change-Id: I77119d79d65902f6ce5cb632349a8cf7aec1d664
2022-01-26 02:41:03 +00:00
TeYuan Wang
b4f08a7823 thermal: chown quiet_therm trip_point
Bug: 211777844
Test: Confirm quiet_therm trip_point_0_temp can be modified by thermalHAL
Change-Id: I5c1c901bdf979917cca2e60552250cfc8756d806
2022-01-26 02:41:03 +00:00
Thurston Dang
70b9383b97 Backport 'Set /dev/sg1 permissions in ueventd.rc' to P22
... 'This way we don't need to guess when we need to chown.'

This is Tri's change to init.gs101.rc (http://go/a-g/15447093),
applied to init.<censored>.rc.

Under some circumstances (see bug), storageproxyd needs to access
/dev/sg1 but doesn't have permission, leading to other apps
blocking on storage.

Bug: 214910469
Test: Check that steps b/214910469#comment76 no longer gets stuck
Change-Id: I9e4133b6bb9ffab1e0044a16b3582436ccf5dd44
2022-01-24 05:13:57 +00:00
Thurston Dang
3a41cf3876 Backport 'Start storageproxyd early' to P22
... 'And restart it after /data is mounted.'

This is Tri's change to init.gs101.rc (http://go/a-g/15447094),
applied to init.<censored>.rc.

Bug: 187105270
Test: boot device, secure storage test com.android.storage-unittest.td
Change-Id: I226181b35c59f4882e466d2b8a839d32750e93e0
2022-01-22 19:05:46 +00:00
George Lee
acbed80455 bcl: Update threshold levels
Bug: 197028142
Test: Boot and confirm level
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I16b357b6c9fb26fc338ec2af66cd43692072b6b5
2022-01-18 22:36:47 +00:00
joenchen
e625d127ad init change owners of sysfs nodes min_vrefresh and idle_delay_ms
init: change file owners of sysfs nodes min_vrefresh and
idle_delay_ms in order to grant permission for hwcomposer

Bug: 213299701
Test: use the following commands
adb shell "vndservice call Exynos.HWCService 1005 i32 0 i32 30"
adb shell "vndservice call Exynos.HWCService 1006 i32 0 i32 1000"

Change-Id: I57043afd6ac08740775680505ee6f3247d56a956
2022-01-17 10:21:16 +00:00
Wei Wang
2b490ccab5 Start bootanimation explicitly.
Bug: 207573158
Test: build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I7e628828062f0203d9aefded94aacf086565ceef
2022-01-12 22:01:07 +00:00
linpeter
638ece5abc display: atc sysfs node change
Give atc nodes are changed to dqe0 form.

Bug: 213133646
test: check file node permission
Change-Id: Ibe1b9dc6739994342e44b2867827ce0428c6095c
2022-01-12 08:07:30 +00:00
Yifan Hong
074c7216c4 Implement health AIDL HAL.
Test: VTS
Test: manual charger mode
Test: recovery
Bug: 213273090
Change-Id: If6e730d8dbd7d7ca95cfd4f045ac045d69597568
2022-01-11 21:39:14 +00:00
Taeju Park
07853908da Remove a0 and a1 powerhints
Bug: 208243183
Signed-off-by: Taeju Park <taeju@google.com>
Change-Id: I4a29445e7be74c280ce9d58eb8a1b7782aa9fcb6
2022-01-11 16:40:55 +00:00
Randall Huang
5eeaade7a4 storage: remove convert_to_f2fs.sh
No longer need this script.

Bug: 207031989
Test: boot to home, make sure all f2fs partitions are mounted
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: I882084fb3a7cf1771e146d7d950ee4a5106792fe
2022-01-06 16:51:23 +08:00
Bart Van Assche
520ff8ddb6 BFQ: Change slice_idle to 0
As one can see in https://b.corp.google.com/issues/191606824,
slice_idle=0 works better for Android than slice_idle=8. Hence change
slice_idle from 8 to 0 for the second generation SoC.

See also
https://googleplex-android-review.git.corp.google.com/c/device/google/gs101/+/15415376.

Test: Untested
Change-Id: I2204047975b040a0255cf902132423d55710e131
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-12-16 11:03:07 -08:00
davidycchen
fb7bd91ee6 conf/init.rc: change touch sysfs node ownership
Change touch sysfs node ownership as system/system for dumpstate.

Bug: 199104466
Test: adb bugreport

Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: Ie4375424b7a1299d8ec1e69167f9564bda9b3e4e
2021-12-01 10:01:51 +00:00
Midas Chien
11c6bdb6f9 display: update sysfs early_wake
Allow HWC to modfiy display early_wakeup.

Bug: 207615889
Test: check node attribute
Test: early wakeup works
Change-Id: I29d4cb8c867071f49a882920692dd013dc0b601f
2021-11-29 17:34:48 +00:00
Kyle Lin
af8d6b2439 memlat: correct the memlat setting
Bug: 207047575
Test: build, boot and verify the value
Change-Id: I20b0a54240102c283f5421838aa13c91ca7abd93
2021-11-24 07:34:20 +00:00
Shiyong Li
f574475006 display: allow framework to access local hbm node
Change local hbm node ownership to allow framework to access.

Bug: 205640231
Test: check ownership after boot
Signed-off-by: Shiyong Li <shiyongli@google.com>
Change-Id: Iba041a9cf8672682411f2167f8677b30e5979027
2021-11-16 20:19:16 +00:00
Roger Wang
197e2a096b wifi: move configuration to project specific
In this commit, I remove project specific content.
For example, I remove p2p interface property,
supplicant service definition and board configurations.

Bug: 203635329
Test: check functionality and output as follows
$ adb shell ifconfig
Output: p2p-wlan0-0 Link encap:Ethernet

$ adb shell getprop wifi.direct.interface
p2p-dev-wlan0

Log output:
wl_cfgvendor_set_hal_started, HAL version: BCMDHD vendor HAL
wpa_supplicant: Configuration file '/data/vendor/wifi/wpa/wpa_supplicant.conf' -> '/data/vendor/wifi/wpa/wpa_supplicant.conf'
wpa_supplicant: Reading configuration file '/data/vendor/wifi/wpa/wpa_supplicant.conf'
wpa_supplicant: update_config=1
wpa_supplicant: eapol_version=1
wpa_supplicant: ap_scan=1
wpa_supplicant: fast_reauth=1
wpa_supplicant: pmf=1
wpa_supplicant: p2p_add_cli_chan=1
wpa_supplicant: oce=1
wpa_supplicant: sae_pwe=2
wpa_supplicant: Reading configuration file '/vendor/etc/wifi/wpa_supplicant_overlay.conf'
wpa_supplicant: sae_pwe=2
wpa_supplicant: driver_param='use_p2p_group_interface=1p2p_device=1'
wpa_supplicant: disable_scan_offload=1
wpa_supplicant: wowlan_triggers='any'

Change-Id: If18f13e7c4c8fc13fb68e50145cc407c91d3fa60
2021-11-15 09:20:32 +00:00
Jenny Ho
49425acfb8 dumpstate: sync battery dumpstate data
Bug: 205071645
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I16dbfb492311e532fa14a001686ca1d3386b57aa
2021-11-15 01:53:30 +00:00
Stephane Lee
7a3738058d 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-11-11 06:48:39 +00:00
Ted Lin
270a005cb4 dumpstate: eeprom and fix the permission problem
Bug: 200119012
Change-Id: I753ab06c819f6b1c739a87f27785bcdab05282b6
Signed-off-by: Ted Lin <tedlin@google.com>
2021-11-11 06:48:39 +00:00
Jenny Ho
184fe31622 dumpstate: dump battery maxfg monitor log
Bug: 196755019
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I04e2be21680c2cc673af1205cdb772fa3b845bd4
2021-11-11 06:48:39 +00:00
Konstantin Vyshetsky
067512ec32 Generate a separate fstab file for FIPS mode
Add a file "fstab.gs201-fips" alongside the existing "fstab.gs201" in
order to specify different encryption settings in FIPS mode.

"androidboot.fstab_suffix=gs201-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.

(cherry-pick from device/google/gs101)
Test: Boot to home screen with/without fips mode
Bug: 202417706
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I8fdc1c9a91399816fa2d4c53f282d63e988ce7d5
2021-11-11 05:04:50 +00:00
vincechiu
86c6a376a7 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.

(cherry-pick from device/google/gs101)
Bug: 205010238
Bug: 194271751
Test: GCA
Change-Id: I8e13e9ad0057b8f42f8ed3958bf0c6d58a5a02bc
2021-11-10 18:28:28 +00:00
Peter Liu
f8f72e99d9 camera power hint: add prefer high cap in all modes
Prefer high cap will choose the mid / high cores when possible with
consideration of energy efficiency.

Running task on high cores with low clock is more efficient than running
at little core with high clock.

This hint also addresses CTS issues with keeping latency_sensitive = 1.
(equivalent to prefer idle)

This hint adds:
1) Enable prefer_high_cap of camera vendor group
2) Set high_capacity_start_cpu to 4
4) Set MemFreq floor
5) Change camera-daemon/cpu.uclamp.latency_sensitive owner to root

(cherry-pick from device/google/gs101)
Bug: 205010238
Bug: 186564130

Test:
android.hardware.camera2.cts.RobustnessTest#testAeAndAfCausality (5/5)
android.hardware.cts.CameraTest#testPreviewCallback (5/5)
android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceRepeatingBurst (5/5)
android.hardware.cts.CameraTest#testFocusDistances (3/6). (3/6) without CL.

*****************************************************************
              raven Camera CTS Test Results

*****************************************************************
Tests Passed: 217, Failed: 0, Not found: 0, Status unknown: 0

Change-Id: Ia2abb0eb9c57fa05c4db7bf1d02053e303301781
2021-11-10 18:19:40 +00:00
Bowgo Tsai
f883475ba9 Removing 'verity_update_state'
This is not needed in device-specific init.rc file, because it's
is superseded by commit https://r.android.com/1866693.

Bug: 203720638
Test: presubmit
Change-Id: I74cfa6f3aa0c9125559f3241ed8e23f8a8510616
2021-11-04 07:03:04 +00:00
David Kimmel
b94c2fc9ad gs201: Soft max freq persistent properties
Bug: 204105895
Test: adb shell setprop persist.vendor.softmaxfreq.cl0 1328000

Change-Id: I8333a12ff12af674329733120402713dca7e32e3
Signed-off-by: David Kimmel <davidkimmel@google.com>
2021-11-02 21:12:39 +00:00
Kris Chen
e6d10041e9 gs201: set permission for UDFPS factory apk to control HBM
Bug: 204142361
Test: Perform UDFPS calibration.
Change-Id: Ie60ddbea72ebe6c3c3998e7cdb8a5809ec47ffd2
2021-10-28 08:43:12 +00:00