Commit graph

273 commits

Author SHA1 Message Date
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
linpeter
cc1a0db348 init: set LHBM node permission before start hwcompower
Give local_hbm_mode node sutiable permission to allow
hwcomposer to set local_hbm_mode to display driver.

Bug: 184768835
test: check file node permission
Change-Id: I2e5dcd87ba27a1ccf8de14a12472ba806833ed12
2021-06-08 05:30:43 +00:00
George Lee
f41184fff0 bcl: disable.bcl property to disable clk div
Bug: 188365095
Test: Local Test
/sys/devices/virtual/pmic/mitigation/instruction # setprop vendor.disable.bcl.control 0
/sys/devices/virtual/pmic/mitigation/instruction # cat enable_mitigation
1
/sys/devices/virtual/pmic/mitigation/instruction # setprop vendor.disable.bcl.control 0
/sys/devices/virtual/pmic/mitigation/instruction # setprop vendor.disable.bcl.control 1
/sys/devices/virtual/pmic/mitigation/instruction # cat enable_mitigation
0
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I326d2d8f1b694d1e5d2a5d663c8fa58e55d37d85
2021-06-02 21:38:37 +00:00
Stephane Lee
0daa5cc618 Add Adaptive Charging AC pause buffer control
Bug: 188524940
Test: Ensure that there are no logcat errors from health_safety_margin
Change-Id: Ia67649fd6d2e4cc8b87b5fa9c21b15b07722efbe
2021-06-01 20:36:15 +00:00
Cyan_Hsieh
7a7f31c030 Set audio.camerasound.force for JP devices
Test: set to JP sku and check No camera sound option
Bug: 188396079
Change-Id: Id6a89d53f796d2311b91955908ec72e88edbc371
2021-05-31 02:54:19 +00:00
George Lee
1f5972077d thermal: add soc to thermal HAL monitoring
Bug: 188365095
Test: Local Test
/dev/thermal/tz-by-name/soc # ls -la
-rw-r--r--  1 system system 4096 2021-05-26 17:25 mode
-rw-r--r--  1 system system 4096 2021-05-26 17:25 trip_point_0_hyst
-rw-r--r--  1 system system 4096 2021-05-26 17:25 trip_point_0_temp
/dev/thermal/tz-by-name/soc # cat policy
user_space

Signed-off-by: George Lee <geolee@google.com>
Change-Id: I9f9cffb29ad025872d77dc2e41d893a2fb2d375a
2021-05-28 16:08:03 +00:00
Peter Liu
7bb4e1f1b3 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

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-05-20 03:24:07 +00:00
Taeju Park
c36b562b57 Enable prefer_idle for nnapi vendor group
Bug: 182509410
Signed-off-by: Taeju Park <taeju@google.com>
Change-Id: I1b58018120f4575f2b12faa15c24c41f1c3b4e8e
2021-05-20 02:28:47 +00:00
Edmond Chung
f2a5afd136 Revert "Update power hint for camera workload"
This reverts commit 3a0efffdbc722cb8a9684ce3c0080d2476c0abb8.

Reason for revert: This CL causes performance/frame drop issues which leads to more CTS flakiness.

Bug: 188462637
Bug: 185233206
Test: Camera CTS
Change-Id: I1796ba29da0e2c19874531bda8c21bc10e248055
2021-05-19 20:05:16 +00:00
Stephane Lee
80c8b07636 Enable Battery Defender on gs101
Bug: 188110823
Test: Ensure that Dwell-Defend can trigger with 'setprop
vendor.battery.defender.threshold 61'

Change-Id: I4782e2c387b147fc48cf4134d27af8675964dc44
2021-05-18 18:48:49 +00:00
Minchan Kim
637041f47e init.gs101.rc: dump page_pinner information into bugreport
Dump page_pinner information into dumpstate_board.txt.
It helps to find vulnerable place of CMA failure.

Page pinned ts 13 us count 0
PFN 10292273 Block 10051 type CMA Flags 0x8000000000080024(uptodate|active|swapbacked)
 try_grab_page+0x168/0x17c
 follow_page_pte+0x2e4/0x4c8
 follow_pmd_mask+0x180/0x498
 __get_user_pages+0x1a0/0x42c
 __get_user_pages_remote+0xa4/0x28c
 get_user_pages_remote+0x20/0x48
 copy_strings+0x188/0x2ac
 do_execveat_common+0x278/0x300
 __arm64_sys_execve+0x44/0x5c
 el0_svc_common+0xa4/0x180
 do_el0_svc+0x28/0x88
 el0_svc+0x14/0x24
 el0_sync_handler+0x88/0xec
 el0_sync+0x19c/0x1c0

Page pinned ts 2 us count 0
PFN 10436170 Block 10191 type CMA Flags 0x8000000000080026(referenced|uptodate|active|swapbacked)
 try_grab_page+0x168/0x17c
 follow_page_pte+0x2e4/0x4c8
 follow_pmd_mask+0x180/0x498
 __get_user_pages+0x1a0/0x42c
 __get_user_pages_remote+0xa4/0x28c
 get_user_pages_remote+0x20/0x48
 copy_strings+0x188/0x2ac
 do_execveat_common+0x290/0x300
 __arm64_sys_execve+0x44/0x5c
 el0_svc_common+0xa4/0x180
 do_el0_svc+0x28/0x88
 el0_svc+0x14/0x24
 el0_sync_handler+0x88/0xec
 el0_sync+0x19c/0x1c0

Bug: 187552095
Test: adb bugreport <zip> and confirmed it contains page_pinner
      information.

Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I59bd41ad9e06cab0348ce85059f73d0796632868
2021-05-17 18:22:16 +00:00
Wei Wang
b442e78600 Fix permission for vendor_group migration
Test: build
Bug: 182509410
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I535b93649d1653def108c0407b16a8ae2f4873bd
2021-05-14 19:12:21 +00:00
Manish Varma
3fd056fb40 Modify file path for i2c devices
Bug: 188078957
Test: Verified using temporary log messages to confirm
file paths are formed correctly as otherwise to test queryMoistureDetectionStatus()
requires some mock circuits.

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: If5402d5999c77bf5a3431c70d800e50570b87c88
2021-05-14 05:05:26 +00:00
Wei Wang
e31ba16606 gs101: Align max uclamp value for background cgroup with vendor_group
Since cfs_rq clamp feature uses tg's value, align it with the
vendor_group setting.

Bug: 170508405
Test: build pass
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ie0c896de2022f435be5ea53ae3cecf5d80d2c067
2021-05-13 02:58:42 +00:00
Jia-yi Chen
7d81ea9443 Update power hint for camera workload
1) Enable prefer_high_cap of camera vendor group
2) Set high_capacity_start_cpu to 4
3) Set prefer_idle of camera vendor group to 0
4) Set MemFreq floor
5) Change camera-daemon/cpu.uclamp.latency_sensitive owner to root

Bug: 186564130
Test: Boot & check setting values
Change-Id: Ief0cae2aa9e4f84bed93f7de0bfb765e8a27009b
2021-05-13 01:48:20 +00:00
Rick Yiu
cd64c6b386 gs101: Set max uclamp value for background group
With vendor kernel support of getting rq cfs util in group base,
we could limit uclamp.max of background group to get more power benefit.

Bug: 170508405
Test: build pass
Change-Id: I997e653eb2790f5e3be4fbf3c8b1de356d787377
2021-05-13 00:27:51 +00:00
Wei Wang
6d4c63e896 P21: enable throttle background group at 5%
Right now we have many groups due to uclamp setup, and this would
potentially create interesting fairness between groups.

Ultimately we want only a system group and a background group for
cpu.shares, which would achieve after b/182509410 resolved.

Test: boot and check setting
Bug: 171740453
Change-Id: I8fa23268aa7ed02dcccc527abcec8556009aa9a7
2021-05-12 23:08:05 +00:00
Taeju Park
185653e3a2 vendor_hook: separate uclamp configuration
Bug: 182509410
Test: build
Change-Id: Ide71afdbeb5fd79800823d0d8bb9b2a3a54bcca9
Signed-off-by: Taeju Park <taeju@google.com>
2021-05-12 18:28:50 +00:00
Jia-yi Chen
a6889fd404 Revert "Update power hint for camera workload"
This reverts commit 637fc9e8d727121276cf8dea2976ac52f8da8d15.

Reason for revert: Camera EBUF overflow observed after launching GCA.

Bug: 187760882
Change-Id: I2357d943f4b4d96ffa7a156671ac7c790640a5ed
2021-05-11 02:22:56 +00:00
Wei Wang
e895392c27 Update power hint for camera workload
1) Enable prefer_high_cap_enable
2) Set high_capacity_start_cpu to 4
3) Set cpu.uclamp.latency_sensitive to 0
4) Change camera-daemon/cpu.uclamp.latency_sensitive owner to root

Bug: 186564130
Test: Boot & check setting values
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I4ea14e82bf65f72a1113359cd163230a767e816b
2021-05-10 18:29:41 +00:00
Jia-yi Chen
82acc06cbe gs101: Change uclamp min value for camera
uclamp value is calculated based on the full capacity 1024. Previously
camera-daemon uses 6 which would set the min to 61. This boosts the
camera thread util up and would have power penalty. Change the value
to 1 to have minimum boost.

Bug: 186564130
Test: cat /dev/cpuctl/camera-daemon/cpu.uclamp.min & check power
Change-Id: Ib8f5ae2091848da4ee98211aeae37612ae2b308a
2021-05-07 22:23:28 +00:00
Wei Wang
df79b08139 Adjust little core rate limit
With recently merged kernel change pa/1916082, down rate limit  will be
adjusted dynamically. Without out this change, we would run into cases
that we too little down rate limit for little.

Bug: 186392111
Bug: 170511089
Test: boot and check rate limit
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I78d9894301c9f4f888d33010c9fcca20d51d4b20
2021-05-07 07:17:29 +00:00
Sunil Ravi
2832991570 Wifi: Added supplicant HAL interface declarations 1.3 and 1.4
Bug: 187302501
Bug: 186636898

Test: boot and wifi function is ok
Test: p2p connection and throughput tests.
Change-Id: I599763e8c583f9566833183d4dbec13db1d040bc
2021-05-06 23:33:51 +00:00
Sunil Ravi
3d015b03ab Revert "Wifi: Move supplicant service init to wpa_supplicant"
This reverts commit 788012640b

Reason for revert: Caused throughput issue in p2p b/187302501

Bug: 187302501
Bug: 186636898

Test: boot and wifi function is ok
Test: p2p connection and throughput tests.

Change-Id: I70f4015040f10452acff697ee504b02cfb3c1e27
2021-05-06 23:33:51 +00:00
Kyle Lin
3a3512c3a3 init.gs101.rc: add memlat settings
Bug: 170479743
Test: build and boot
Change-Id: I1f5f3ebdb2e4aeb3fe76de3b82358ea4783a571b
2021-05-06 07:05:34 +00:00
Jenny Ho
c1c9613145 init.gs101.rc: change TRICKLE/TEMP/DWELL permission to system
For dump these informations into bugreports and debugging

Bug: 186872139
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I5e4efd83b1ae111a423cb13e1c35f31766f98252
2021-05-05 02:55:28 +00:00
Yu-Chi Cheng
395ae043ba Added EdgeTPU vendor service into P21.
The original edgetpu_service is now split into two, where the
original one stays under /system_ext/ and the new one,
edgetpu_vendor_service, now locates under /vendor/.

This change updates files including device.mk accordingly to
ensure these services are setup properly on P21.

Bug: 185432427
Test: Oriole + GCA
Change-Id: I5b0eff64f2f044a56bc14cf5e1d92ec3463560a9
2021-05-04 19:39:32 +00:00
Sunil Ravi
788012640b Wifi: Move supplicant service init to wpa_supplicant
Bug: 186636898
Test: boot and wifi function is ok
Change-Id: Idb6ebe962e50408c907f9d961a6f75e3ceddf0f2
2021-05-04 17:38:38 +00:00
Jenny Ho
8201411a5b Allow setting charge start and stop levels when in Test Harness Mode
Bug: 180511460
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I02b64c1f386ba6fe299e63dfb8f12c18549c861f
2021-05-04 02:48:40 +00:00
Zhijun He
51d3d2e56f Remove unnecessary GPU clock access permissions
Test: Camera
Bug: 162236627
Change-Id: Icfbb56a9d282b69c780600ab621975fb9da2db42
2021-05-03 23:32:39 +00:00
Aaron Ding
254e03a21c do not mount the debugfs on user builds
keep debugfs on userdebug and factory builds

Bug: 184801854
Change-Id: I6b4b7428b011a87a93d48af63f8dafc2c5d96e23
Signed-off-by: Aaron Ding <aaronding@google.com>
2021-04-30 00:56:07 +00:00
Nicole Lee
7311968443 init: grant read permission of always-on log for others
Bug: 186619367
Change-Id: Ie70d9c97d95f4cc90bc3d66d1309087dc3f148e5
2021-04-29 20:42:44 +00:00
Rick Yiu
89f31f39c2 gs101: Change uclamp min value for camera
With a scheduler change that refers to uclamp value of a rq, we need
to change uclamp min value for camera to get better performance.

Bug: 170648224
Test: check fps in video recording
Change-Id: I29e55706b49d5182935209d1d6f3552fb7f5d821
2021-04-27 06:09:06 +00:00
Franklin He
8ac9fa6194 Add a boost to NNAPI DarwiNN HAL for better perf&power
See http://shortn/_X7vYHND2xN for testing with various NN models
faster execution of NNAPI results in less execution time and
in turn, less total power consumed.

Bug: 183576817
Test: adb push'd rc file to a device
      `cat /dev/cpuctl/nnapi-hal/cpu.uclamp.min` == 15.00
      ran MLPerf, got better scores

Change-Id: I398c3741fc46958f95a9b608a27b52da47c69597
2021-04-27 01:22:33 +00:00
Jenny Ho
9e468ac2f7 init.gs101.rc: add adaptive charge node permission
Bug: 185751788
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I9173d9e5ce00f6d5df1e4fe1ef20e7c073e90e19
2021-04-21 05:47:40 +00:00
Wenhao Wang
30ddea9d11 Add restorecon for new label (persist_ss_file)
We create a new label for /mnt/vendor/persist/ss.
So add restorecon for the label.

Bug: 173971240
Bug: 173032298
Test: Trusty storage tests
Change-Id: I98267ba6c4472c2c0ae186b576ffc18de86e0378
2021-04-20 17:20:49 +00:00
Stephane Lee
a6926e9abb Fix ODPM dynamic rail config via file by allowing writes to enabled_rails
Test: Ensure that power stats no longer reports an config error on boot
Bug: 185423551
Change-Id: I5315e31a54b8cbc40fc0f4f361e5b3b81a29ceb8
2021-04-16 14:46:10 +00:00
Max Shi
fc630f27e0 Configure permission for AOC reset sysfs node.
Bug: 184858369
Test: Verify system process can write to the node.
Change-Id: Ibe4fb8e773995d8f4ba0e68b71c127ae2bc4ddc0
2021-04-16 00:49:48 +00:00
Benjamin Schwartz
3cc937165b powerstats: Add GPS state residency
Bug: 181577366
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I0fa4356542a838618e712e9b0abbf02b99db7f3a
2021-04-15 05:08:16 +00:00
chenpaul
589e1d8d89 wifi - Give execute permission to data/vendor/wifi for pixelLogger
In hostapd, there have hostapd.android.rc and make /data/vendor/wifi
with permission 770 when the device boots up.

It will overwrite the permission from slider specific rc,
which makes this folder without "+x" permission.

In order to make Pixel Logger can write config files in this folder.
This change will make sure "/data/vendor/wifi" have +x permission

Bug: 159650456
Test: wifi is workable
      data/vendor/wifi with 771 permission
Change-Id: I5b396fc41a4eddefc04d43f8e3d276787d722726
2021-04-13 11:54:19 +00:00
Jenny Ho
fa30b5b9ff init.gs101.rc: set system ownership for P7 maxfg
Bug: 184780667
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: Ic1df561438aa197459f7b1bbd72bd1d905c156c8
2021-04-12 04:05:09 +00:00
Craig Dooley
2762231fdf Add the aoc persist folder
Bug: 184173298
Change-Id: Ia66797e2220ef4ba728b2eb21e123b36566adf1c
2021-04-08 17:27:55 +00:00
Adam Shih
561ff7a341 remove obsolete mobicore operations
Bug: 183935443
Test: boot to home with no related avc error
Change-Id: I808d08d7e5479bdd643caa8269a68a8691796986
2021-04-07 00:48:10 +00:00