mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
wahoo: power: change node owner early to reduce permission denial log spam
PowerHAL (started in class hal) will try to reset nodes to their initial values, however the node permission is granted only upon boot_complete which leads some permission log spam. This CL is to address the logspam. Test: boot and do powerhint Bug: 62041945 Change-Id: I35ad8dfe23f35c829f50479ca951445afeb46b87
This commit is contained in:
@@ -385,6 +385,14 @@ on zygote-start
|
||||
# b/62837579 elabel directory
|
||||
mkdir /data/misc/elabel 0700 system system
|
||||
|
||||
# Setup permission for powerHAL
|
||||
chown system system /dev/stune/top-app/schedtune.boost
|
||||
chown system system /dev/cpu_dma_latency
|
||||
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
|
||||
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
|
||||
chown system system /sys/class/devfreq/soc:qcom,gpubw/min_freq
|
||||
chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/min_freq
|
||||
|
||||
on early-boot
|
||||
# wait for devices
|
||||
wait_for_prop sys.qcom.devup 1
|
||||
@@ -549,16 +557,9 @@ service vendor.per_proxy /vendor/bin/pm-proxy
|
||||
|
||||
on property:sys.post_boot.parsed=1
|
||||
# Setup permission for powerHAL
|
||||
chown system system /dev/stune/top-app/schedtune.boost
|
||||
chown system system /dev/cpu_dma_latency
|
||||
chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/min_freq
|
||||
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
|
||||
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
|
||||
chown system system /sys/class/devfreq/soc:qcom,gpubw/min_freq
|
||||
chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_trigger_count
|
||||
chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory
|
||||
chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length
|
||||
chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/min_freq
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
# Enable power setting and set sys.post_boot.parsed to 1
|
||||
|
||||
@@ -91,6 +91,7 @@ Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
|
||||
break;
|
||||
case PowerHint_1_0::SUSTAINED_PERFORMANCE:
|
||||
if (data && !mSustainedPerfModeOn) {
|
||||
ALOGD("SUSTAINED_PERFORMANCE ON");
|
||||
if (!mVRModeOn) { // Sustained mode only.
|
||||
mHintManager->DoHint("SUSTAINED_PERFORMANCE");
|
||||
} else { // Sustained + VR mode.
|
||||
@@ -99,6 +100,7 @@ Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
|
||||
}
|
||||
mSustainedPerfModeOn = true;
|
||||
} else if (!data && mSustainedPerfModeOn) {
|
||||
ALOGD("SUSTAINED_PERFORMANCE OFF");
|
||||
mHintManager->EndHint("VR_SUSTAINED_PERFORMANCE");
|
||||
mHintManager->EndHint("SUSTAINED_PERFORMANCE");
|
||||
if (mVRModeOn) { // Switch back to VR Mode.
|
||||
@@ -109,6 +111,7 @@ Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
|
||||
break;
|
||||
case PowerHint_1_0::VR_MODE:
|
||||
if (data && !mVRModeOn) {
|
||||
ALOGD("VR_MODE ON");
|
||||
if (!mSustainedPerfModeOn) { // VR mode only.
|
||||
mHintManager->DoHint("VR_MODE");
|
||||
} else { // Sustained + VR mode.
|
||||
@@ -117,6 +120,7 @@ Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
|
||||
}
|
||||
mVRModeOn = true;
|
||||
} else if (!data && mVRModeOn) {
|
||||
ALOGD("VR_MODE OFF");
|
||||
mHintManager->EndHint("VR_SUSTAINED_PERFORMANCE");
|
||||
mHintManager->EndHint("VR_MODE");
|
||||
if (mSustainedPerfModeOn) { // Switch back to sustained Mode.
|
||||
|
||||
@@ -96,8 +96,7 @@
|
||||
"Values": [
|
||||
"0",
|
||||
"3"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWHistMemory",
|
||||
@@ -105,8 +104,7 @@
|
||||
"Values": [
|
||||
"0",
|
||||
"20"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWHystLength",
|
||||
@@ -114,8 +112,7 @@
|
||||
"Values": [
|
||||
"0",
|
||||
"10"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWMinFreq",
|
||||
|
||||
Reference in New Issue
Block a user