Commit 5881ece0 authored by ssizon's avatar ssizon Committed by Romain Hunault
Browse files

FP3: Add Sensors Support(1/2)

Add Power HIDL implementation
Remove gamed
parent 06a07e1a
...@@ -93,6 +93,8 @@ BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 ...@@ -93,6 +93,8 @@ BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USES_METADATA_PARTITION := true BOARD_USES_METADATA_PARTITION := true
TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USES_MKE2FS := true TARGET_USES_MKE2FS := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
# Partitions # Partitions
BOARD_FLASH_BLOCK_SIZE := 131072 BOARD_FLASH_BLOCK_SIZE := 131072
...@@ -187,6 +189,12 @@ TARGET_PROVIDES_QTI_TELEPHONY_JAR := true ...@@ -187,6 +189,12 @@ TARGET_PROVIDES_QTI_TELEPHONY_JAR := true
TARGET_USES_OLD_MNC_FORMAT := true TARGET_USES_OLD_MNC_FORMAT := true
ENABLE_VENDOR_RIL_SERVICE := true ENABLE_VENDOR_RIL_SERVICE := true
# Enable sensor multi HAL
USE_SENSOR_MULTI_HAL := true
#Enable peripheral manager
TARGET_PER_MGR_ENABLED := true
# Recovery # Recovery
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/recovery.fstab TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/recovery.fstab
......
sensors.ssc.so
<?xml version="1.0" encoding="utf-8" ?>
<!--
/* Copyright (c) 2017, 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.
*/
-->
<Powerhint>
<Hint type="0x0E00"> <!--preview-->
<Resource opcode="0x41400000" value="0x4" /> <!-- B CPU - above_hispeed_delay of 40 ms -->
<Resource opcode="0x41410000" value="0x5F" /> <!-- B CPU - go hispeed load 95 -->
<Resource opcode="0x41414000" value="0x22C"/> <!-- B CPU - hispeed freq of 556 MHz -->
<Resource opcode="0x41420000" value="0x5A" /> <!-- B CPU - target load of 90 -->
<Resource opcode="0x41400100" value="0x4" /> <!-- L CPU - above_hispeed_delay of 40 ms -->
<Resource opcode="0x41410100" value="0x5F" /> <!-- L CPU - go hispeed load 95 -->
<Resource opcode="0x41414100" value="0x22C"/> <!-- L CPU - hispeed freq of 556 MHz- -->
<Resource opcode="0x41420100" value="0x5A" /> <!-- L CPU - target load of 90 -->
<Resource opcode="0x41810000" value="0x9C4"/> <!-- CPUBW low power ceil mpbs of 2500 -->
<Resource opcode="0x41814000" value="0x32" /> <!-- CPUBW low power io percent of 50 -->
</Hint>
<Hint type="0x0A00"> <!--video encode 30 fps-->
<Resource opcode="0x41400000" value="0x4" /> <!-- B CPU - above_hispeed_delay of 40 ms -->
<Resource opcode="0x41410000" value="0x5F" /> <!-- B CPU - go hispeed load 95 -->
<Resource opcode="0x41414000" value="0x326"/> <!-- B CPU - hispeed freq of 806 MHz -->
<Resource opcode="0x41420000" value="0x5A" /> <!-- B CPU - target load of 90 -->
<Resource opcode="0x41400100" value="0x4" /> <!-- L CPU - above_hispeed_delay of 40 ms -->
<Resource opcode="0x41410100" value="0x5F" /> <!-- L CPU - go hispeed load 95 -->
<Resource opcode="0x41414100" value="0x22C"/> <!-- L CPU - hispeed freq of 556 MHz- -->
<Resource opcode="0x41420100" value="0x5A" /> <!-- L CPU - target load of 90 -->
<Resource opcode="0x41810000" value="0x9C4"/> <!-- CPUBW low power ceil mpbs of 2500 -->
<Resource opcode="0x41814000" value="0x32" /> <!-- CPUBW low power io percent of 50 -->
<Resource opcode="0x4180C000" value="0x0" /> <!-- CPUBW disable hysteresis -->
<Resource opcode="0x41820000" value="0xA" /> <!-- CPUBW sample_ms of 10ms -->
<Resource opcode="0x41438100" value="0x0" /> <!-- L CPU - disable ignore_hispeed_notif -->
<Resource opcode="0x41438000" value="0x0" /> <!-- B CPU - disable ignore_hispeed_notif -->
</Hint>
<Hint type="0x0B00"> <!--video decode-->
<Resource opcode="0x41400100" value="0x4" /> <!-- L CPU - Above Hispeed Delay of 40ms -->
<Resource opcode="0x41410100" value="0x5F" /> <!-- L CPU - Go Hispeed Delay of 95 -->
<Resource opcode="0x41414100" value="0x2D9"/> <!-- L CPU - Hispeed Freq of 768 MHz -->
<Resource opcode="0x41420100" value="0x5A" /> <!-- L CPU - Target Loads of 90 -->
<Resource opcode="0x41400000" value="0x4" /> <!-- B CPU - Above Hispeed Delay of 40ms -->
<Resource opcode="0x41410000" value="0x5F" /> <!-- B CPU - Go Hispeed Load of 95 -->
<Resource opcode="0x41414000" value="0x2D9"/> <!-- B CPU - Hispeed Freq of 729 MHz -->
<Resource opcode="0x41420000" value="0x5A" /> <!-- B CPU - Target Load of 90 -->
</Hint>
<Hint type="0x0F00"> <!--sustained performance-->
<Resource opcode="0x40800000" value="0x0"/> <!-- B CPU - Cluster min freq uncapped -->
<Resource opcode="0x40800100" value="0x0"/> <!-- L CPU - Cluster min freq uncapped -->
<Resource opcode="0x40804000" value="0x4E0"/> <!-- B CPU - Cluster max freq ~1.2 GHz -->
<Resource opcode="0x40804100" value="0x4E0"/> <!-- L CPU - Cluster max freq ~1.2 Ghz -->
<Resource opcode="0x4280C000" value="0xB4"/> <!-- GPU - min freq 180 Mhz -->
<Resource opcode="0x42810000" value="0x156"/> <!-- GPU - max freq 342 Mhz -->
<Resource opcode="0x42814000" value="0x0"/> <!-- GPUBW freq uncapped -->
</Hint>
<Hint type="0x1000"> <!--vr mode-->
<Resource opcode="0x40800000" value="0x579"/> <!-- B CPU - Cluster min freq ~1.4 Ghz -->
<Resource opcode="0x40800100" value="0x579"/> <!-- L CPU - Cluster min freq ~1.4 Ghz -->
<Resource opcode="0x40804000" value="0x579"/> <!-- B CPU - Cluster max freq ~1.4 Ghz -->
<Resource opcode="0x40804100" value="0x579"/> <!-- L CPU - Cluster max freq ~1.4 Ghz -->
<Resource opcode="0x4280C000" value="0x203"/> <!-- GPU - min freq 510 Mhz -->
<Resource opcode="0x42810000" value="0x203"/> <!-- GPU - max freq 510 Mhz -->
<Resource opcode="0x42814000" value="0x1E4F"/> <!-- GPUBW freq 775 Mhz-->
</Hint>
<Hint type="0x1001"> <!--vr mode sustained performance-->
<Resource opcode="0x40800000" value="0x4E0"/> <!-- B CPU - Cluster min freq ~1.2 Ghz -->
<Resource opcode="0x40800100" value="0x4E0"/> <!-- L CPU - Cluster min freq ~1.2 Ghz -->
<Resource opcode="0x40804000" value="0x4E0"/> <!-- B CPU - Cluster max freq ~1.2 Ghz -->
<Resource opcode="0x40804100" value="0x4E0"/> <!-- L CPU - Cluster max freq ~1.2 Ghz -->
<Resource opcode="0x4280C000" value="0x156"/> <!-- GPU - min freq 342 Mhz -->
<Resource opcode="0x42810000" value="0x156"/> <!-- GPU - max freq 342 Mhz -->
<Resource opcode="0x42814000" value="0x1E4F"/> <!-- GPUBW freq 775 Mhz -->
</Hint>
</Powerhint>
...@@ -325,6 +325,15 @@ PRODUCT_COPY_FILES += \ ...@@ -325,6 +325,15 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \ $(LOCAL_PATH)/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
$(LOCAL_PATH)/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy $(LOCAL_PATH)/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
# Sensors
PRODUCT_PACKAGES += \
sensors.FP3 \
android.hardware.sensors@1.0-impl \
android.hardware.sensors@1.0-service
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
# Fingerprint # Fingerprint
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service android.hardware.biometrics.fingerprint@2.1-service
...@@ -334,6 +343,10 @@ PRODUCT_PACKAGES += \ ...@@ -334,6 +343,10 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/bin/init.qti.qseecomd.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.qseecomd.sh $(LOCAL_PATH)/rootdir/bin/init.qti.qseecomd.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.qseecomd.sh
# Powerhint configuration file
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/powerhint.xml:system/etc/powerhint.xml
# Enable vndk-sp Libraries # Enable vndk-sp Libraries
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
libgui_vendor \ libgui_vendor \
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> </hal>
<!-- <hal format="hidl"> <hal format="hidl">
<name>android.hardware.sensors</name> <name>android.hardware.sensors</name>
<transport>hwbinder</transport> <transport>hwbinder</transport>
<version>1.0</version> <version>1.0</version>
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
<name>ISensors</name> <name>ISensors</name>
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> --> </hal>
<hal format="hidl"> <hal format="hidl">
<name>android.hardware.soundtrigger</name> <name>android.hardware.soundtrigger</name>
<transport>hwbinder</transport> <transport>hwbinder</transport>
...@@ -664,7 +664,7 @@ ...@@ -664,7 +664,7 @@
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> --> </hal> -->
<!-- <hal format="hidl"> <hal format="hidl">
<name>vendor.lineage.power</name> <name>vendor.lineage.power</name>
<transport>hwbinder</transport> <transport>hwbinder</transport>
<version>1.0</version> <version>1.0</version>
...@@ -672,7 +672,7 @@ ...@@ -672,7 +672,7 @@
<name>ILineagePower</name> <name>ILineagePower</name>
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> --> </hal>
<hal format="hidl"> <hal format="hidl">
<name>vendor.lineage.trust</name> <name>vendor.lineage.trust</name>
<transport>hwbinder</transport> <transport>hwbinder</transport>
......
...@@ -686,17 +686,17 @@ service vendor.dataadpl /system/vendor/bin/adpl ...@@ -686,17 +686,17 @@ service vendor.dataadpl /system/vendor/bin/adpl
group radio oem_2901 diag usb net_admin group radio oem_2901 diag usb net_admin
disabled disabled
# service vendor.sensors /vendor/bin/sscrpcd service vendor.sensors /vendor/bin/sscrpcd
# class core class core
# user system user system
# group system group system
# disabled disabled
# service vendor.sensors.qti /vendor/bin/sensors.qti service vendor.sensors.qti /vendor/bin/sensors.qti
# class core class core
# user system user system
# group system group system
# disabled disabled
on property:ro.vendor.use_data_netmgrd=false on property:ro.vendor.use_data_netmgrd=false
# netmgr not supported on specific target # netmgr not supported on specific target
......
...@@ -157,13 +157,6 @@ service perfd /system/vendor/bin/perfd ...@@ -157,13 +157,6 @@ service perfd /system/vendor/bin/perfd
user root user root
disabled disabled
service gamed /system/vendor/bin/gamed
class main
user system
group system
disabled
socket gamed seqpacket 0640 system system
service thermal-engine /system/vendor/bin/thermal-engine service thermal-engine /system/vendor/bin/thermal-engine
class main class main
user root user root
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment