PowerHal: Support VR reload thermal config

Test: boot
Bug: 129495482
Change-Id: Iff12608a5d3d6a02495c1b01bc3391ac65f34194
This commit is contained in:
Martin Liu
2019-05-04 11:27:41 +08:00
parent e12f3fd46f
commit ef95a0b535
4 changed files with 5 additions and 519 deletions

View File

@@ -205,9 +205,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
android.hardware.power.stats@1.0-service.pixel
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
# health HAL
PRODUCT_PACKAGES += \
android.hardware.health@2.0-service.wahoo

View File

@@ -508,6 +508,9 @@ on property:init.svc.zygote=running
on property:init.svc.zygote=stopped
stop vendor.folio_daemon
on property:vendor.qcom.thermalcfg=*
restart vendor.thermal-engine
service vendor.thermal-engine /vendor/bin/thermal-engine -c ${vendor.qcom.thermalcfg:-/vendor/etc/thermal-engine.conf}
class hal
user root

View File

@@ -1,516 +0,0 @@
{
"Nodes": [
{
"Name": "CPULittleClusterMaxFreq",
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq",
"Values": [
"1900800",
"1555200",
"1478400",
"1248000"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "CPULittleClusterMinFreq",
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq",
"Values": [
"1900800",
"1555200",
"1512000",
"1478400",
"1134000",
"0"
],
"ResetOnInit": true
},
{
"Name": "CPUBigClusterMaxFreq",
"Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq",
"Values": [
"2457600",
"1958400",
"1574400",
"1344000",
"1267200"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "CPUBigClusterMinFreq",
"Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq",
"Values": [
"2457600",
"1574400",
"1420800",
"1344000",
"1132800",
"0"
],
"ResetOnInit": true
},
{
"Name": "GPUMaxFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/max_freq",
"Values": [
"342000000",
"414000000",
"515000000",
"710000000"
],
"ResetOnInit": true
},
{
"Name": "GPUMinFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/min_freq",
"Values": [
"515000000",
"414000000",
"257000000"
],
"ResetOnInit": true
},
{
"Name": "GPUBusMinFreq",
"Path": "/sys/class/devfreq/soc:qcom,gpubw/min_freq",
"Values": [
"11863",
"7759",
"0"
],
"ResetOnInit": true
},
{
"Name": "TASchedtuneBoost",
"Path": "/dev/stune/top-app/schedtune.boost",
"Values": [
"50",
"10"
],
"ResetOnInit": true
},
{
"Name": "CPUBWHystTriggerCount",
"Path": "/sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_trigger_count",
"Values": [
"0",
"3"
]
},
{
"Name": "CPUBWHistMemory",
"Path": "/sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory",
"Values": [
"0",
"20"
]
},
{
"Name": "CPUBWHystLength",
"Path": "/sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length",
"Values": [
"0",
"10"
]
},
{
"Name": "CPUBWMinFreq",
"Path": "/sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/min_freq",
"Values": [
"13763",
"5195",
"1525",
"762"
],
"ResetOnInit": true
},
{
"Name": "PMQoSCpuDmaLatency",
"Path": "/dev/cpu_dma_latency",
"Values": [
"44",
"100"
],
"HoldFd": true
},
{
"Name": "PowerHALMainState",
"Path": "vendor.powerhal.state",
"Values": [
"CAMERA_STREAMING",
"VR_SUSTAINED_PERFORMANCE",
"SUSTAINED_PERFORMANCE",
"VR_MODE",
""
],
"Type": "Property"
},
{
"Name": "PowerHALAudioState",
"Path": "vendor.powerhal.audio",
"Values": [
"AUDIO_LOW_LATENCY",
""
],
"Type": "Property"
},
{
"Name": "ThermalConfig",
"Path": "vendor.qcom.thermalcfg",
"Values": [
"/vendor/etc/thermal-engine-vr.conf",
"/vendor/etc/thermal-engine.conf"
],
"Type": "Property"
},
{
"Name": "PowerHALRenderingState",
"Path": "vendor.powerhal.rendering",
"Values": [
"EXPENSIVE_RENDERING",
""
],
"Type": "Property"
}
],
"Actions": [
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "PowerHALMainState",
"Duration": 0,
"Value": "SUSTAINED_PERFORMANCE"
},
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "CPUBigClusterMaxFreq",
"Duration": 0,
"Value": "1267200"
},
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "CPULittleClusterMaxFreq",
"Duration": 0,
"Value": "1248000"
},
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "342000000"
},
{
"PowerHint": "VR_MODE",
"Node": "PowerHALMainState",
"Duration": 0,
"Value": "VR_MODE"
},
{
"PowerHint": "VR_MODE",
"Node": "ThermalConfig",
"Duration": 0,
"Value": "/vendor/etc/thermal-engine-vr.conf"
},
{
"PowerHint": "VR_MODE",
"Node": "CPUBigClusterMaxFreq",
"Duration": 0,
"Value": "1574400"
},
{
"PowerHint": "VR_MODE",
"Node": "CPUBigClusterMinFreq",
"Duration": 0,
"Value": "1574400"
},
{
"PowerHint": "VR_MODE",
"Node": "CPULittleClusterMaxFreq",
"Duration": 0,
"Value": "1555200"
},
{
"PowerHint": "VR_MODE",
"Node": "CPULittleClusterMinFreq",
"Duration": 0,
"Value": "1555200"
},
{
"PowerHint": "VR_MODE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "515000000"
},
{
"PowerHint": "VR_MODE",
"Node": "GPUMinFreq",
"Duration": 0,
"Value": "515000000"
},
{
"PowerHint": "VR_MODE",
"Node": "GPUBusMinFreq",
"Duration": 0,
"Value": "11863"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "PowerHALMainState",
"Duration": 0,
"Value": "VR_MODE"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "ThermalConfig",
"Duration": 0,
"Value": "/vendor/etc/thermal-engine-vr.conf"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "CPUBigClusterMaxFreq",
"Duration": 0,
"Value": "1344000"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "CPUBigClusterMinFreq",
"Duration": 0,
"Value": "1344000"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "CPULittleClusterMaxFreq",
"Duration": 0,
"Value": "1478400"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "CPULittleClusterMinFreq",
"Duration": 0,
"Value": "1478400"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "414000000"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "GPUMinFreq",
"Duration": 0,
"Value": "414000000"
},
{
"PowerHint": "VR_SUSTAINED_PERFORMANCE",
"Node": "GPUBusMinFreq",
"Duration": 0,
"Value": "7759"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBigClusterMinFreq",
"Duration": 0,
"Value": "1132800"
},
{
"PowerHint": "INTERACTION",
"Node": "CPULittleClusterMinFreq",
"Duration": 0,
"Value": "1134000"
},
{
"PowerHint": "INTERACTION",
"Node": "TASchedtuneBoost",
"Duration": 0,
"Value": "50"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWHystTriggerCount",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWHystLength",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWHistMemory",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWMinFreq",
"Duration": 0,
"Value": "5195"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBigClusterMaxFreq",
"Duration": 5000,
"Value": "2457600"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBigClusterMinFreq",
"Duration": 5000,
"Value": "2457600"
},
{
"PowerHint": "LAUNCH",
"Node": "CPULittleClusterMinFreq",
"Duration": 5000,
"Value": "1900800"
},
{
"PowerHint": "LAUNCH",
"Node": "PMQoSCpuDmaLatency",
"Duration": 5000,
"Value": "44"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHystTriggerCount",
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHystLength",
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHistMemory",
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWMinFreq",
"Duration": 5000,
"Value": "13763"
},
{
"PowerHint": "CAMERA_LAUNCH",
"Node": "CPUBigClusterMaxFreq",
"Duration": 1000,
"Value": "2457600"
},
{
"PowerHint": "CAMERA_LAUNCH",
"Node": "CPUBigClusterMinFreq",
"Duration": 1000,
"Value": "2457600"
},
{
"PowerHint": "CAMERA_LAUNCH",
"Node": "CPULittleClusterMinFreq",
"Duration": 1000,
"Value": "1900800"
},
{
"PowerHint": "CAMERA_LAUNCH",
"Node": "PMQoSCpuDmaLatency",
"Duration": 1000,
"Value": "44"
},
{
"PowerHint": "CAMERA_STREAMING",
"Node": "PowerHALMainState",
"Duration": 0,
"Value": "CAMERA_STREAMING"
},
{
"PowerHint": "CAMERA_STREAMING",
"Node": "CPUBigClusterMaxFreq",
"Duration": 0,
"Value": "1958400"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPUBigClusterMaxFreq",
"Duration": 1000,
"Value": "2457600"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPUBigClusterMinFreq",
"Duration": 1000,
"Value": "2457600"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPULittleClusterMinFreq",
"Duration": 1000,
"Value": "1900800"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "PMQoSCpuDmaLatency",
"Duration": 1000,
"Value": "44"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPUBWHystTriggerCount",
"Duration": 1000,
"Value": "0"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPUBWHystLength",
"Duration": 1000,
"Value": "0"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPUBWHistMemory",
"Duration": 1000,
"Value": "0"
},
{
"PowerHint": "CAMERA_SHOT",
"Node": "CPUBWMinFreq",
"Duration": 1000,
"Value": "13763"
},
{
"PowerHint": "AUDIO_STREAMING",
"Node": "CPUBigClusterMinFreq",
"Duration": 2000,
"Value": "1420800"
},
{
"PowerHint": "AUDIO_STREAMING",
"Node": "PMQoSCpuDmaLatency",
"Duration": 2000,
"Value": "44"
},
{
"PowerHint": "AUDIO_LOW_LATENCY",
"Node": "PowerHALAudioState",
"Duration": 0,
"Value": "AUDIO_LOW_LATENCY"
},
{
"PowerHint": "AUDIO_LOW_LATENCY",
"Node": "PMQoSCpuDmaLatency",
"Duration": 0,
"Value": "44"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "CPULittleClusterMinFreq",
"Duration": 0,
"Value": "0"
}
]
}

View File

@@ -8,6 +8,8 @@ allow hal_power_default sysfs_devices_system_cpu:file rw_file_perms;
allow hal_power_default latency_device:chr_file rw_file_perms;
allow hal_power_default cgroup:dir search;
allow hal_power_default cgroup:file rw_file_perms;
allow hal_power_default sysfs_touch:file w_file_perms;
allow hal_power_default sysfs_touch:dir search;
# To get/set powerhal state property
set_prop(hal_power_default, power_prop)