summaryrefstree
path: root/bootimg/ramdisk/init.power.rc
blob: 4e28965a9b458d61872afd6f2145af30ba2fb368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Copyright (c) 2013, HTC Corp. 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 Code Aurora Forum, Inc. 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
# init PnPMgr node
    chmod 0664 /sys/power/pnpmgr/apps/media_mode
    chown mediacodec camera /sys/power/pnpmgr/apps/media_mode
    chown system /sys/power/pnpmgr/apps/activity_trigger
    chown system /sys/power/pnpmgr/apps/non_activity_trigger
    chown system /sys/power/pnpmgr/apps/profile
    chown system /sys/power/pnpmgr/launch_event
    chown system /sys/power/powersave
    chown system /sys/power/pnpmgr/cluster/big/user_perf_lvl
    chown system /sys/power/pnpmgr/cluster/big/user_lvl_to_min_freq
    chown system /sys/power/pnpmgr/cluster/big/hotplug/user_cpunum_max
    chown system /sys/power/pnpmgr/cluster/big/hotplug/user_cpunum_min
    chown system /sys/power/pnpmgr/cluster/little/user_perf_lvl
    chown system /sys/power/pnpmgr/cluster/little/user_lvl_to_min_freq
    chown system /sys/power/pnpmgr/cluster/little/hotplug/user_cpunum_max
    chown system /sys/power/pnpmgr/cluster/little/hotplug/user_cpunum_min
    chown system /sys/power/pnpmgr/touch_boost
    chown system /sys/power/pnpmgr/long_duration_touch_boost
    chown system /sys/power/wait_for_fb_status
    chmod 0664 /sys/power/pnpmgr/display/single_layer_yuv
    chown system /sys/power/pnpmgr/display/single_layer_yuv
    chmod 0664 /sys/power/pnpmgr/display/single_layer_rgb
    chown system /sys/power/pnpmgr/display/single_layer_rgb
    chmod 0664 /sys/power/pnpmgr/display/virtual_display
    chown system /sys/power/pnpmgr/display/virtual_display
    chmod 0664 /sys/power/pnpmgr/apps/call_sync
    chown system /sys/power/pnpmgr/apps/call_sync

    write /sys/power/pnpmgr/cluster/big/hotplug/mp_cpunum_max 4
    write /sys/power/pnpmgr/cluster/big/hotplug/mp_cpunum_min 1
    write /sys/power/pnpmgr/cluster/little/hotplug/mp_cpunum_max 4
    write /sys/power/pnpmgr/cluster/little/hotplug/mp_cpunum_min 0
    write /sys/power/pnpmgr/thermal/cpu_asn 0
    write /sys/power/pnpmgr/apps/activity_trigger "booting"
    write /sys/power/pnpmgr/long_duration_touch_boost_duration 3000
    write /sys/power/pnpmgr/touch_boost_duration 200

    write /dev/cpuset/cpu_exclusive 0
    write /dev/cpuset/foreground/cpus "0-7"
    write /dev/cpuset/foreground/boost/cpus "0-7"
    write /dev/cpuset/top-app/cpus "0-7"
    write /dev/cpuset/background/cpus "0-1"
    write /dev/cpuset/system-background/cpus "0-3"

# HTC SSD Battery - BEGIN
    chown system system /sys/class/power_supply/battery/full_level_dis_batt_chg
    chmod 0220 /sys/class/power_supply/battery/full_level_dis_batt_chg
    chown radio radio /sys/class/power_supply/battery/phone_call
    chmod 0660 /sys/class/power_supply/battery/phone_call
    chown media media /sys/class/power_supply/battery/play_music
    chmod 0220 /sys/class/power_supply/battery/play_music
    chown radio radio /sys/class/power_supply/battery/network_search
    chmod 0220 /sys/class/power_supply/battery/network_search
    chown system system /sys/class/power_supply/battery/navigation
    chmod 0220 /sys/class/power_supply/battery/navigation
    chown system system /sys/class/power_supply/battery/disable_limit_chg
    chmod 0220 /sys/class/power_supply/battery/disable_limit_chg
# HTC SSD Battery - END

    chown root system /sys/devices/system/cpu/cpu1/online
    chmod 0664 /sys/devices/system/cpu/cpu1/online
    chown root system /sys/devices/system/cpu/cpu2/online
    chmod 0664 /sys/devices/system/cpu/cpu2/online
    chown root system /sys/devices/system/cpu/cpu3/online
    chmod 0664 /sys/devices/system/cpu/cpu3/online
    chown root system /sys/devices/system/cpu/cpu4/online
    chmod 0664 /sys/devices/system/cpu/cpu4/online
    chown root system /sys/devices/system/cpu/cpu5/online
    chmod 0664 /sys/devices/system/cpu/cpu5/online
    chown root system /sys/devices/system/cpu/cpu6/online
    chmod 0664 /sys/devices/system/cpu/cpu6/online
    chown root system /sys/devices/system/cpu/cpu7/online
    chmod 0664 /sys/devices/system/cpu/cpu7/online
    chown root system /sys/power/pnpmgr/thermal/cpu_asn
    chmod 0664 /sys/power/pnpmgr/thermal/cpu_asn

    chown system system /sys/power/pnpmgr/apps/trace_trigger
    chmod 0664 /sys/power/pnpmgr/apps/trace_trigger

# Setup Launch event timeout vaule
	setprop persist.htc.multicore.timeout 1000
	setprop persist.htc.multicore.innerT 500

service pnpmgr /system/bin/pnpmgr
    class core
    user root

service thermal-monitor /system/bin/thermal-monitor
    class main
    user root

service memlock /system/bin/memlock
    class main
    cgroup bg
    user root

on property:init.svc.thermal-engine=stopped
    write /sys/power/pnpmgr/thermal/thermal_final_bcpu 999999999
    write /sys/power/pnpmgr/thermal/thermal_final_lcpu 999999999
    write /sys/power/pnpmgr/thermal/thermal_final_gpu 999999999
    write /sys/power/pnpmgr/thermal/thermal_batt 0
    write /sys/power/pnpmgr/cluster/big/cpu0/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/big/cpu1/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/big/cpu2/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/big/cpu3/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/little/cpu0/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/little/cpu1/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/little/cpu2/thermal_freq 999999999
    write /sys/power/pnpmgr/cluster/little/cpu3/thermal_freq 999999999

service clockd /system/bin/clockd
    class main
    user root

service qb_offmode_alarm /system/bin/qb_offmode_alarm
    class main
    user root
    disabled
    oneshot

service zchgd_offmode /system/bin/zchgd -pseudooffmode -autostop -poffmodewarn
    user root
    group root graphics
    disabled

service setfps /system/bin/sh /system/etc/setfps.sh
    user root
    disabled
    oneshot

on property:display.setfps=*
    start setfps