universal7885: switch to pixel thermal hal

Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
roynatech2544 2021-12-06 14:17:43 +09:00
commit a94e055586
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
9 changed files with 131 additions and 9 deletions

View file

@ -1,2 +1,3 @@
soong_namespace {
imports: ["hardware/google/interfaces"],
}

View file

@ -0,0 +1,103 @@
{
"Sensors": [
{
"Name": "BIG",
"Type": "CPU",
"HotThreshold": [
"NAN",
"NAN",
"NAN",
91.0,
"NAN",
"NAN",
115.0
],
"VrThreshold": "NAN",
"Multiplier": 0.001
},
{
"Name": "LITTLE",
"Type": "CPU",
"HotThreshold": [
"NAN",
"NAN",
"NAN",
91.0,
"NAN",
"NAN",
115.0
],
"VrThreshold": "NAN",
"Multiplier": 0.001
},
{
"Name": "G3D",
"Type": "GPU",
"HotThreshold": [
"NAN",
"NAN",
"NAN",
91.0,
"NAN",
"NAN",
115.0
],
"VrThreshold": "NAN",
"Multiplier": 0.001
},
{
"Name": "ac",
"Type": "USB_PORT",
"HotThreshold": [
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"60.0",
"NAN"
],
"HotHysteresis": [
0.0,
0.0,
0.0,
0.0,
0.0,
5.0,
0.0
],
"VrThreshold": "NAN",
"Multiplier": 0.001,
"Monitor": true
},
{
"Name": "battery",
"Type": "BATTERY",
"HotThreshold": [
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
60.0
],
"VrThreshold": "NAN",
"Multiplier": 0.001
}
],
"CoolingDevices": [
{
"Name": "thermal-cpufreq-0",
"Type": "CPU"
},
{
"Name": "thermal-cpufreq-1",
"Type": "CPU"
},
{
"Name": "thermal-gpufreq-0",
"Type": "GPU"
}
]
}

View file

@ -10,6 +10,7 @@ type gps_device, dev_type;
# /dev/goodix_fp
type goodix_device, dev_type;
type thermal_link_device, dev_type;
# device.te
type efs_block_device, dev_type;

View file

@ -223,6 +223,10 @@
/(vendor|system/vendor)/firmware(/.*)? u:object_r:vendor_firmware_file:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.samsung-libperfmgr u:object_r:hal_power_default_exec:s0
# Thermal
/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0
/dev/thermal/(/.*)? u:object_r:thermal_link_device:s0
# SamsungParts
/(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.battery@1\.0-service u:object_r:hal_battery_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.flashlight@1\.0-service u:object_r:hal_flashlight_default_exec:s0

View file

@ -1,8 +1,11 @@
# /acct/tasks
allow hal_thermal_default cgroup:file getattr;
# /sys/devices/virtual/thermal/
allow hal_thermal_default sysfs_thermal:dir r_dir_perms;
allow hal_thermal_default sysfs_thermal:file r_file_perms;
r_dir_file(hal_thermal_default, sysfs_virtual)
allow hal_thermal_default sysfs_thermal:file rw_file_perms;
allow hal_thermal_default sysfs_thermal:lnk_file r_file_perms;
allow hal_thermal_default thermal_link_device:dir r_dir_perms;
allow hal_thermal_default proc_stat:file r_file_perms;
allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
hal_client_domain(hal_thermal_default, hal_power);
get_prop(hal_thermal_default, vendor_thermal_prop)

View file

@ -18,3 +18,4 @@ vendor_internal_prop(rild_prop)
vendor_internal_prop(vendor_secureos_prop)
vendor_internal_prop(vendor_tzdaemon_prop)
vendor_internal_prop(vendor_tztsdaemon_prop)
vendor_internal_prop(vendor_thermal_prop)

View file

@ -51,6 +51,9 @@ vendor.wlbtd. u:object_r:vendor_wlbtd_prop:s0
# Wlan
vendor.wlan. u:object_r:vendor_wlan_prop:s0
# Thermal
vendor.thermal. u:object_r:vendor_thermal_prop:s0
# Hwc
hwc.exynos.vsync_mode u:object_r:vendor_hwc_prop:s0

View file

@ -17,3 +17,6 @@ set_prop(vendor_init, persist_data_wda_prop)
set_prop(vendor_init, persist_rmnet_prop)
get_prop(vendor_init, system_prop)
get_prop(vendor_init, vendor_radio_prop)
allow vendor_init thermal_link_device:dir r_dir_perms;
allow vendor_init thermal_link_device:lnk_file r_file_perms;

View file

@ -274,10 +274,13 @@ PRODUCT_SOONG_NAMESPACES += \
hardware/google/pixel \
hardware/samsung/aidl/power-libperfmgr
# Thermal
# Thermal HAL
PRODUCT_PACKAGES += \
android.hardware.thermal@1.0-impl \
android.hardware.thermal@1.0-service
android.hardware.thermal@2.0-service.pixel \
thermal_symlinks
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
# Vibrator
PRODUCT_PACKAGES += \