2020-04-17 07:47:23 -04:00
|
|
|
# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are
|
|
|
|
# met:
|
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# * Redistributions in binary form must reproduce the above
|
|
|
|
# copyright notice, this list of conditions and the following
|
|
|
|
# disclaimer in the documentation and/or other materials provided
|
|
|
|
# with the distribution.
|
|
|
|
# * Neither the name of The Linux Foundation nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived
|
|
|
|
# from this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
|
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
|
|
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
|
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
|
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
|
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
on init
|
2020-04-13 16:58:04 -04:00
|
|
|
wait /dev/block/platform/soc/1d84000.ufshc
|
|
|
|
symlink /dev/block/platform/soc/1d84000.ufshc /dev/block/bootdevice
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:58:04 -04:00
|
|
|
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2019-12-26 20:39:08 -05:00
|
|
|
# Add a cpuset for the camera daemon
|
|
|
|
mkdir /dev/cpuset/camera-daemon
|
|
|
|
write /dev/cpuset/camera-daemon/cpus 0-7
|
|
|
|
write /dev/cpuset/camera-daemon/mems 0
|
|
|
|
chown cameraserver cameraserver /dev/cpuset/camera-daemon
|
|
|
|
chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks
|
|
|
|
chmod 0660 /dev/cpuset/camera-daemon/tasks
|
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
on fs
|
2020-08-17 05:45:32 -04:00
|
|
|
mount_all --early
|
2020-04-13 16:58:04 -04:00
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
restorecon_recursive /mnt/vendor/persist
|
|
|
|
mkdir /mnt/vendor/persist/data 0700 system system
|
|
|
|
mkdir /mnt/vendor/persist/audio 0755 system system
|
|
|
|
mkdir /mnt/vendor/persist/camera 0777 root root
|
|
|
|
|
|
|
|
on late-fs
|
2020-04-13 16:58:04 -04:00
|
|
|
wait_for_prop hwservicemanager.ready true
|
|
|
|
exec_start wait_for_keymaster
|
2020-08-17 05:45:32 -04:00
|
|
|
mount_all --late
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
on post-fs-data
|
|
|
|
mkdir /data/vendor/nnhal 0700 system system
|
|
|
|
mkdir /data/vendor/nfc 0770 nfc nfc
|
|
|
|
mkdir /data/vendor/thermal 0771 root system
|
|
|
|
mkdir /data/vendor/thermal/config 0771 root system
|
|
|
|
|
|
|
|
on boot
|
|
|
|
start rmt_storage
|
|
|
|
start rfs_access
|
2020-04-13 16:58:04 -04:00
|
|
|
|
2019-10-04 08:30:12 -04:00
|
|
|
# Set thermal mode to evaluation
|
2019-12-26 20:39:08 -05:00
|
|
|
chown system system /sys/class/thermal/thermal_message/sconfig
|
2019-10-04 08:30:12 -04:00
|
|
|
write /sys/class/thermal/thermal_message/sconfig 10
|
2019-12-26 20:39:08 -05:00
|
|
|
|
|
|
|
on property:sys.boot_completed=1
|
2020-04-13 16:58:04 -04:00
|
|
|
# Setup runtime cpusets
|
2020-04-17 07:47:23 -04:00
|
|
|
write /dev/cpuset/top-app/cpus 0-7
|
2020-10-25 08:28:26 -04:00
|
|
|
write /dev/cpuset/foreground/cpus 0-6
|
|
|
|
write /dev/cpuset/background/cpus 0-1
|
|
|
|
write /dev/cpuset/system-background/cpus 0-3
|
2018-04-13 14:07:56 -04:00
|
|
|
write /dev/cpuset/restricted/cpus 0-3
|
2020-04-13 16:58:04 -04:00
|
|
|
|
2020-08-25 10:46:37 -04:00
|
|
|
# Apply settings for sm6150
|
|
|
|
# Set the default IRQ affinity to the silver cluster. When a
|
|
|
|
# CPU is isolated/hotplugged, the IRQ affinity is adjusted
|
|
|
|
# to one of the CPU from the default IRQ affinity mask.
|
|
|
|
write /proc/irq/default_smp_affinity 3f
|
|
|
|
|
|
|
|
# Core control parameters on silver
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/not_preferred "0 0 0 0 1 1"
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/min_cpus 4
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres 60
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres 40
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms 100
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster 0
|
|
|
|
write /sys/devices/system/cpu/cpu0/core_ctl/task_thres 8
|
|
|
|
write /sys/devices/system/cpu/cpu6/core_ctl/enable 0
|
|
|
|
|
|
|
|
# Setting b.L scheduler parameters
|
|
|
|
write /proc/sys/kernel/sched_downmigrate 65
|
|
|
|
write /proc/sys/kernel/sched_upmigrate 71
|
|
|
|
write /proc/sys/kernel/sched_group_downmigrate 85
|
|
|
|
write /proc/sys/kernel/sched_group_upmigrate 100
|
|
|
|
write /proc/sys/kernel/sched_walt_rotate_big_tasks 1
|
|
|
|
|
|
|
|
# colocation v3 settings
|
|
|
|
write /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz 740000
|
|
|
|
|
|
|
|
# configure governor settings for little cluster
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "schedutil"
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 0
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 0
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq 1248000
|
2020-10-21 13:22:37 -04:00
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 576000
|
2020-08-25 10:46:37 -04:00
|
|
|
|
|
|
|
# configure governor settings for big cluster
|
|
|
|
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor "schedutil"
|
|
|
|
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 0
|
|
|
|
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 0
|
|
|
|
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq 1324600
|
2020-10-21 13:22:37 -04:00
|
|
|
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq 652800
|
2020-08-25 10:46:37 -04:00
|
|
|
|
|
|
|
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
|
|
|
|
write /sys/devices/system/cpu/cpu6/sched_load_boost -6
|
|
|
|
write /sys/devices/system/cpu/cpu7/sched_load_boost -6
|
|
|
|
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load 85
|
|
|
|
|
2020-10-21 13:22:37 -04:00
|
|
|
write /sys/module/cpu_boost/parameters/input_boost_freq "0:1248000"
|
|
|
|
write /sys/module/cpu_boost/parameters/input_boost_ms 40
|
2020-09-09 05:52:37 -04:00
|
|
|
|
|
|
|
# Set allocstall_threshold to 0
|
|
|
|
# Set swappiness to 100
|
|
|
|
write /sys/module/vmpressure/parameters/allocstall_threshold 0
|
|
|
|
write /proc/sys/vm/swappiness 100
|
|
|
|
|
|
|
|
# Enable ZRAM on boot_complete
|
|
|
|
swapon_all /vendor/etc/fstab.qcom
|
2020-08-25 10:46:37 -04:00
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
service vendor.pd_mapper /vendor/bin/pd-mapper
|
|
|
|
class core
|
|
|
|
user system
|
|
|
|
group system
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
service vendor.per_mgr /vendor/bin/pm-service
|
|
|
|
class core
|
|
|
|
user system
|
|
|
|
group system
|
|
|
|
ioprio rt 4
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
service vendor.per_proxy /vendor/bin/pm-proxy
|
|
|
|
class core
|
|
|
|
user system
|
|
|
|
group system
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
disabled
|
|
|
|
|
|
|
|
on property:init.svc.vendor.per_mgr=running
|
|
|
|
start vendor.per_proxy
|
|
|
|
|
|
|
|
on property:sys.shutdown.requested=*
|
|
|
|
stop vendor.per_proxy
|
|
|
|
|
|
|
|
on charger
|
2020-04-13 17:43:49 -04:00
|
|
|
wait /dev/block/platform/soc/1da4000.ufshc/by-name/system
|
|
|
|
mount ext4 /dev/block/platform/soc/1da4000.ufshc/by-name/system / ro barrier=1
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:58:04 -04:00
|
|
|
wait /dev/block/platform/soc/1da4000.ufshc/by-name/persist
|
2020-04-13 17:43:49 -04:00
|
|
|
mount ext4 /dev/block/bootdevice/by-name/persist /mnt/vendor/persist nosuid nodev barrier=1
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:58:04 -04:00
|
|
|
start vendor.hvdcp_opti
|
|
|
|
start vendor.thermal-engine
|
2020-04-13 17:43:49 -04:00
|
|
|
start vendor.qcom-post-boot
|
2020-04-13 16:58:04 -04:00
|
|
|
start vendor.power_off_alarm
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:58:04 -04:00
|
|
|
service vendor.thermal-engine /vendor/bin/thermal-engine
|
2020-04-17 07:47:23 -04:00
|
|
|
class main
|
2020-04-13 16:58:04 -04:00
|
|
|
user root
|
|
|
|
socket thermal-send-client stream 0666 system system
|
|
|
|
socket thermal-recv-client stream 0660 system system
|
|
|
|
socket thermal-recv-passive-client stream 0666 system system
|
|
|
|
socket thermal-send-rule stream 0660 system system
|
|
|
|
group root
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:23:56 -04:00
|
|
|
service vendor.hvdcp_opti /vendor/bin/hvdcp_opti
|
|
|
|
class main
|
|
|
|
user root
|
|
|
|
group system wakelock
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:58:04 -04:00
|
|
|
service vendor.remosaic_daemon /vendor/bin/remosaic_daemon
|
2020-04-17 07:47:23 -04:00
|
|
|
class late_start
|
2020-04-13 16:58:04 -04:00
|
|
|
user camera
|
|
|
|
group camera
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2020-04-13 16:58:04 -04:00
|
|
|
service vendor.nv_mac /vendor/bin/nv_mac
|
2019-08-15 16:03:38 -04:00
|
|
|
class main
|
2020-04-13 16:22:58 -04:00
|
|
|
user system
|
|
|
|
group system inet net_admin wifi net_raw
|
|
|
|
oneshot
|