From 71aed7699b6fd3ccb77d5b6fe9fdfbff4bdde772 Mon Sep 17 00:00:00 2001 From: jiabin Date: Fri, 25 May 2018 12:38:42 -0700 Subject: [PATCH 01/20] Remove valid mask of microphone characteristics. Bug: 79272216 Test: run cts Change-Id: I58d948eab5eb830f81bdacbb63bb48defcecbf79 --- audio_platform_info_tavil.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/audio_platform_info_tavil.xml b/audio_platform_info_tavil.xml index 0194019..862613f 100644 --- a/audio_platform_info_tavil.xml +++ b/audio_platform_info_tavil.xml @@ -121,18 +121,24 @@ + + + + + + - - - Date: Thu, 26 Jul 2018 13:47:13 -0700 Subject: [PATCH 02/20] Set runtime readahead to 128KiB Reduce readahead to 128KiB to reduce thrashing under memory pressure. Bug: 110908295 Bug: 111855179 Test: Boot Change-Id: I449d2733bc836ed7661653efb2400fc031a76644 --- init-common.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init-common.rc b/init-common.rc index 356c9d8..0dcc3f0 100644 --- a/init-common.rc +++ b/init-common.rc @@ -10,11 +10,11 @@ on late-fs on property:sys.boot_completed=1 # end boot time fs tune - write /sys/block/sda/queue/read_ahead_kb 1024 + write /sys/block/sda/queue/read_ahead_kb 128 write /sys/block/sda/queue/nr_requests 128 write /sys/block/sda/queue/iostats 1 - write /sys/block/dm-0/queue/read_ahead_kb 512 - write /sys/block/dm-1/queue/read_ahead_kb 512 + write /sys/block/dm-0/queue/read_ahead_kb 128 + write /sys/block/dm-1/queue/read_ahead_kb 128 on property:sys.boot_completed=1 && property:ro.build.type=user write /proc/sys/kernel/modules_disabled 1 From 698cbe59e17716ecba6d262a13e7edf240898f48 Mon Sep 17 00:00:00 2001 From: Vinay Kalia Date: Mon, 13 Aug 2018 10:55:54 -0700 Subject: [PATCH 03/20] power profile: update "ambient.on" power numbers BUG: 112540522 Test: Compile Change-Id: I340cc28ec2cf2d90a9971e0715d79fe5fb9b7d89 --- .../overlay/frameworks/base/core/res/res/xml/power_profile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/walleye/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/walleye/overlay/frameworks/base/core/res/res/xml/power_profile.xml index a7b93b9..31fc93d 100644 --- a/walleye/overlay/frameworks/base/core/res/res/xml/power_profile.xml +++ b/walleye/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -169,7 +169,7 @@ - 23.69 + 19 131.397 From bd3a2939fdffeca6290b5d96645bc6cbc927b653 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Wed, 29 Aug 2018 16:03:10 -0700 Subject: [PATCH 04/20] Move wake-up delay to overlay Change-Id: Iea116c938be12b338eb70f489caecaa351bc0966 Fixes: 112757556 Test: manual, unlock with fingerprint, no flash observed --- .../overlay/frameworks/base/core/res/res/values/config.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/walleye/overlay/frameworks/base/core/res/res/values/config.xml b/walleye/overlay/frameworks/base/core/res/res/values/config.xml index 93d1a80..bae87f1 100644 --- a/walleye/overlay/frameworks/base/core/res/res/values/config.xml +++ b/walleye/overlay/frameworks/base/core/res/res/values/config.xml @@ -186,6 +186,10 @@ true + + 50 + true From 5a4052dfd84407557ad9ff7f8f958c2afa56e610 Mon Sep 17 00:00:00 2001 From: Vincent Palomares Date: Wed, 28 Nov 2018 14:55:00 -0800 Subject: [PATCH 05/20] Upgrading Walleye's thermal HAL version to 2.0. Also increasing thermal-engine skin shutdown threshold to let the framework shutdown gracefully (see b/119221890). Bug: 118689758 Test: adb shell dumpsys hardware_properties adb shell su 0 lshal debug android.hardware.thermal@2.0::IThermal/default pts -m PtsThermalHalTestCases vts -m VtsHalThermalV1_0Target vts -m VtsHalThermalV2_0Target Change-Id: I089c54c722089f12affae488c81c039405839b5e Signed-off-by: Vincent Palomares --- device-walleye.mk | 3 + thermal-engine.conf | 4 +- thermal_info_config.json | 204 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 thermal_info_config.json diff --git a/device-walleye.mk b/device-walleye.mk index 46d86c2..e1dec8d 100644 --- a/device-walleye.mk +++ b/device-walleye.mk @@ -37,3 +37,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ persist.traced.enable=1 +# Thermal HAL +PRODUCT_COPY_FILES += \ + device/google/muskie/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json diff --git a/thermal-engine.conf b/thermal-engine.conf index ef41dad..4e89521 100755 --- a/thermal-engine.conf +++ b/thermal-engine.conf @@ -72,8 +72,8 @@ action_info 3 algo_type monitor sampling 1000 sensor back_therm -thresholds 56000 -thresholds_clr 55000 +thresholds 58000 +thresholds_clr 57000 actions shutdown action_info 1 diff --git a/thermal_info_config.json b/thermal_info_config.json new file mode 100644 index 0000000..3fe5489 --- /dev/null +++ b/thermal_info_config.json @@ -0,0 +1,204 @@ +{ + "Sensors":[ + { + "Name":"tsens_tz_sensor1", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor2", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor4", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor3", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor7", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor8", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor9", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor10", + "Type":"CPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"tsens_tz_sensor13", + "Type":"GPU", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + 95.0, + "NAN", + "NAN", + 125.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"battery", + "Type":"BATTERY", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + 60.0 + ], + "VrThreshold":"NAN", + "Multiplier":0.001 + }, + { + "Name":"usb_port_temp", + "Type":"USB_PORT", + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":0.1 + }, + { + "Name":"back_therm", + "Type":"SKIN", + "HotThreshold":[ + "NAN", + 40.0, + 47.0, + 50.0, + 52.0, + 54.0, + 56.0 + ], + "HotHysteresis":[ + 0.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0 + ], + "VrThreshold":52.0, + "Multiplier":1.0, + "Monitor":true + } + ], + "CoolingDevices":[ + { + "Name":"thermal-cpufreq-0", + "Type":"CPU" + }, + { + "Name":"thermal-cpufreq-1", + "Type":"CPU" + } + ] +} From 8a9343109c789b2c148c64e7782923e20424da32 Mon Sep 17 00:00:00 2001 From: Petri Gynther Date: Mon, 4 Feb 2019 21:31:57 -0800 Subject: [PATCH 06/20] Remove unsupported gcc and kcfi kernel modules code Change-Id: I03af46d61cfa847882dad2bf11586c696d74961f --- device-common.mk | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/device-common.mk b/device-common.mk index 35126e3..41f1b82 100644 --- a/device-common.mk +++ b/device-common.mk @@ -79,15 +79,7 @@ PRODUCT_COPY_FILES += \ include device/google/wahoo/device.mk # Kernel modules -ifeq (,$(filter-out walleye_gcc, $(TARGET_PRODUCT))) -# if TARGET_PRODUCT == *_gcc -BOARD_VENDOR_KERNEL_MODULES += \ - device/google/wahoo-kernel/gcc/synaptics_dsx_core_htc.ko \ - device/google/wahoo-kernel/gcc/synaptics_dsx_rmi_dev_htc.ko \ - device/google/wahoo-kernel/gcc/synaptics_dsx_fw_update_htc.ko \ - device/google/wahoo-kernel/gcc/htc_battery.ko \ - device/google/wahoo-kernel/gcc/wlan.ko -else ifeq (,$(filter-out walleye_kasan, $(TARGET_PRODUCT))) +ifeq (,$(filter-out walleye_kasan, $(TARGET_PRODUCT))) # if TARGET_PRODUCT == *_kasan BOARD_VENDOR_KERNEL_MODULES += \ device/google/wahoo-kernel/kasan/synaptics_dsx_core_htc.ko \ @@ -95,14 +87,6 @@ BOARD_VENDOR_KERNEL_MODULES += \ device/google/wahoo-kernel/kasan/synaptics_dsx_fw_update_htc.ko \ device/google/wahoo-kernel/kasan/htc_battery.ko \ device/google/wahoo-kernel/kasan/wlan.ko -else ifeq (,$(filter-out walleye_kcfi, $(TARGET_PRODUCT))) -# if TARGET_PRODUCT == *_kcfi -BOARD_VENDOR_KERNEL_MODULES += \ - device/google/wahoo-kernel/kcfi/synaptics_dsx_core_htc.ko \ - device/google/wahoo-kernel/kcfi/synaptics_dsx_rmi_dev_htc.ko \ - device/google/wahoo-kernel/kcfi/synaptics_dsx_fw_update_htc.ko \ - device/google/wahoo-kernel/kcfi/htc_battery.ko \ - device/google/wahoo-kernel/kcfi/wlan.ko else ifeq (,$(filter-out walleye_kernel_debug_memory, $(TARGET_PRODUCT))) # if TARGET == walleye_kernel_debug_memory BOARD_VENDOR_KERNEL_MODULES += \ From 08e352d88b0ad3f6e3e085ccdd25314b0287b16f Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 8 Jan 2019 11:01:01 -0800 Subject: [PATCH 07/20] Boottime: remove all block-related tunes including readahead size With a request size fix, 2MB-sized readahead would not be a way to gain boottime. taimen - PVT - Hynix 128GB - boot_complete timestamp (avg of 100 loop) Base [1] : 10.943 New [2] : 10.7495 taimen - PVT - Hynix 128GB - boot_complete timestamp + fastboot -w (avg of 100 loop) Base [1] : 32.5857 New [2] : 31.7474 [1] w/o this CL, revert commit 7c37954411e9 ("mm: readahead back to 128KB") [2] w/ this CL, keep commit 7c37954411e9 ("mm: readahead back to 128KB") Bug: 122246531 Bug: 120757803 Change-Id: I2c3236b0b0cd4f2a8610a1af64de694f8a4d7997 Signed-off-by: Jaegeuk Kim --- init-common.rc | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/init-common.rc b/init-common.rc index 0dcc3f0..f0434e7 100644 --- a/init-common.rc +++ b/init-common.rc @@ -1,21 +1,3 @@ -on late-fs - # boot time fs tune - write /sys/block/sda/queue/iostats 0 - write /sys/block/sda/queue/scheduler cfq - write /sys/block/sda/queue/iosched/slice_idle 0 - write /sys/block/sda/queue/read_ahead_kb 2048 - write /sys/block/sda/queue/nr_requests 256 - write /sys/block/dm-0/queue/read_ahead_kb 2048 - write /sys/block/dm-1/queue/read_ahead_kb 2048 - -on property:sys.boot_completed=1 - # end boot time fs tune - write /sys/block/sda/queue/read_ahead_kb 128 - write /sys/block/sda/queue/nr_requests 128 - write /sys/block/sda/queue/iostats 1 - write /sys/block/dm-0/queue/read_ahead_kb 128 - write /sys/block/dm-1/queue/read_ahead_kb 128 - on property:sys.boot_completed=1 && property:ro.build.type=user write /proc/sys/kernel/modules_disabled 1 From fd9d3d109dd569855d1e78e32f692041f9e45838 Mon Sep 17 00:00:00 2001 From: Bill Yi Date: Mon, 25 Feb 2019 12:02:53 -0800 Subject: [PATCH 08/20] Remove iperf libraries TEST: flashed taimen device Change-Id: I467e72e4323e20643e5a3bb40b82e889306193f9 --- self-extractors/extract-lists.txt | 3 --- self-extractors/qcom/staging/device-partial.mk | 3 --- 2 files changed, 6 deletions(-) diff --git a/self-extractors/extract-lists.txt b/self-extractors/extract-lists.txt index 099f866..4ec19ed 100644 --- a/self-extractors/extract-lists.txt +++ b/self-extractors/extract-lists.txt @@ -26,7 +26,6 @@ system/lib64/lib-imsvtextutils.so \ system/lib64/lib-imsvt.so \ system/lib64/lib-imsvtutils.so \ - system/lib64/libiperf.so \ system/lib64/librcc.so \ system/lib/com.qualcomm.qti.imsrtpservice@1.0.so \ system/lib/libdiag_system.so \ @@ -36,8 +35,6 @@ system/lib/lib-imsvtextutils.so \ system/lib/lib-imsvt.so \ system/lib/lib-imsvtutils.so \ - system/lib/libiperf.so \ system/lib/librcc.so \ - system/xbin/iperf3 \ " ;; diff --git a/self-extractors/qcom/staging/device-partial.mk b/self-extractors/qcom/staging/device-partial.mk index 49293f3..b0c2f16 100644 --- a/self-extractors/qcom/staging/device-partial.mk +++ b/self-extractors/qcom/staging/device-partial.mk @@ -35,7 +35,6 @@ PRODUCT_COPY_FILES := \ vendor/qcom/walleye/proprietary/lib64/lib-imsvtextutils.so:system/lib64/lib-imsvtextutils.so:qcom \ vendor/qcom/walleye/proprietary/lib64/lib-imsvt.so:system/lib64/lib-imsvt.so:qcom \ vendor/qcom/walleye/proprietary/lib64/lib-imsvtutils.so:system/lib64/lib-imsvtutils.so:qcom \ - vendor/qcom/walleye/proprietary/lib64/libiperf.so:system/lib64/libiperf.so:qcom \ vendor/qcom/walleye/proprietary/lib64/librcc.so:system/lib64/librcc.so:qcom \ vendor/qcom/walleye/proprietary/com.qualcomm.qti.imsrtpservice@1.0.so:system/lib/com.qualcomm.qti.imsrtpservice@1.0.so:qcom \ vendor/qcom/walleye/proprietary/libdiag_system.so:system/lib/libdiag_system.so:qcom \ @@ -45,6 +44,4 @@ PRODUCT_COPY_FILES := \ vendor/qcom/walleye/proprietary/lib-imsvtextutils.so:system/lib/lib-imsvtextutils.so:qcom \ vendor/qcom/walleye/proprietary/lib-imsvt.so:system/lib/lib-imsvt.so:qcom \ vendor/qcom/walleye/proprietary/lib-imsvtutils.so:system/lib/lib-imsvtutils.so:qcom \ - vendor/qcom/walleye/proprietary/libiperf.so:system/lib/libiperf.so:qcom \ vendor/qcom/walleye/proprietary/librcc.so:system/lib/librcc.so:qcom \ - vendor/qcom/walleye/proprietary/iperf3:system/xbin/iperf3:qcom \ From c2644e78f0d7c58b24e58361bd2feec8856b04fc Mon Sep 17 00:00:00 2001 From: Yiwen Chen Date: Tue, 5 Mar 2019 21:14:09 -0800 Subject: [PATCH 09/20] Enable ramping ringer by default for walleye devices. Bug: 120789399 Test: Tested on device Change-Id: I3e27d75cbe68b23e2b328282e1460bd979f0ecca --- .../SettingsProvider/res/values/defaults.xml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml diff --git a/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml new file mode 100644 index 0000000..79aec49 --- /dev/null +++ b/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -0,0 +1,22 @@ + + + + + true + From 92400286d45382b9e25b771170f1476656761cbf Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 11 Mar 2019 23:18:27 +0000 Subject: [PATCH 10/20] Revert "Boottime: remove all block-related tunes including readahead size" This reverts commit 08e352d88b0ad3f6e3e085ccdd25314b0287b16f. Reason for revert: boottime regression found by b/126431810 Change-Id: Ie9b9f05bfff86518fe59fdd06d1a33f423567184 --- init-common.rc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/init-common.rc b/init-common.rc index f0434e7..0dcc3f0 100644 --- a/init-common.rc +++ b/init-common.rc @@ -1,3 +1,21 @@ +on late-fs + # boot time fs tune + write /sys/block/sda/queue/iostats 0 + write /sys/block/sda/queue/scheduler cfq + write /sys/block/sda/queue/iosched/slice_idle 0 + write /sys/block/sda/queue/read_ahead_kb 2048 + write /sys/block/sda/queue/nr_requests 256 + write /sys/block/dm-0/queue/read_ahead_kb 2048 + write /sys/block/dm-1/queue/read_ahead_kb 2048 + +on property:sys.boot_completed=1 + # end boot time fs tune + write /sys/block/sda/queue/read_ahead_kb 128 + write /sys/block/sda/queue/nr_requests 128 + write /sys/block/sda/queue/iostats 1 + write /sys/block/dm-0/queue/read_ahead_kb 128 + write /sys/block/dm-1/queue/read_ahead_kb 128 + on property:sys.boot_completed=1 && property:ro.build.type=user write /proc/sys/kernel/modules_disabled 1 From 1afc16e62adaa3f0a7825b88867d85b45fdb714a Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Tue, 4 Dec 2018 10:12:00 +0800 Subject: [PATCH 11/20] Enable prebuilt ELF file checks This commits sets PRODUCT_CHECK_ELF_FILES to true so that all prebuilts are checked while building muskie products. Bug: 119086738 Test: make check-elf-files Change-Id: Idd69e6959f7cbf7e84178300cc64d89b4118806f --- device-common.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device-common.mk b/device-common.mk index 41f1b82..f848de1 100644 --- a/device-common.mk +++ b/device-common.mk @@ -146,3 +146,5 @@ PRODUCT_PROPERTY_OVERRIDES += \ # NFC/camera interaction workaround - DO NOT COPY TO NEW DEVICES PRODUCT_PROPERTY_OVERRIDES += \ ro.camera.notify_nfc=1 + +PRODUCT_CHECK_ELF_FILES := true From 0edb398ed622c9928d3af6bed802a38da354a8f7 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Mon, 1 Apr 2019 08:48:58 -0700 Subject: [PATCH 12/20] Walleye: Enable ext4 share dup blocks Resolve adb remount and system image build issues by enabling BOARD_EXT4_SHARE_DUP_BLOCKS := true, which also adds extra partition space for expansion. Test: lunch wahoo-userdebug && m -j500 && flashall && boot Test: adb-remount-test.sh Bug: 120448575 Bug: 128876541 Bug: 129471772 Cc: Orion Hodson Change-Id: I19f49a09f8105ee30606c4f0f1423a06a71deb73 --- walleye/BoardConfig.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/walleye/BoardConfig.mk b/walleye/BoardConfig.mk index 89f83bd..cf98414 100644 --- a/walleye/BoardConfig.mk +++ b/walleye/BoardConfig.mk @@ -33,3 +33,5 @@ BOARD_LISA_TARGET_SCRIPTS := device/google/wahoo/lisa/ # VTS DTBO Verification. This kernel cmdline parameter should be added by the bootloader # for all future devices. BOARD_KERNEL_CMDLINE += androidboot.dtbo_idx=3 + +BOARD_EXT4_SHARE_DUP_BLOCKS := true From cf92b79ba9b0c25d743ed175575d5412dfccf7c6 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Tue, 2 Apr 2019 08:19:51 +0800 Subject: [PATCH 13/20] thermal: adjust usb overheat warning threshold Bug: 128945620 Test: Verified usb overheat warning Change-Id: I8f0dc4d7fc7a29a8fad73d43db4d4efb8582fb2f --- thermal_info_config.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/thermal_info_config.json b/thermal_info_config.json index 3fe5489..25f95d0 100644 --- a/thermal_info_config.json +++ b/thermal_info_config.json @@ -159,11 +159,21 @@ "NAN", "NAN", "NAN", - "NAN", + "70.0", "NAN" ], + "HotHysteresis":[ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 5.0, + 0.0 + ], "VrThreshold":"NAN", - "Multiplier":0.1 + "Multiplier":0.1, + "Monitor":true }, { "Name":"back_therm", From f18b74e23e5fa9bb6a2c6f6ce23dbbf81863ae74 Mon Sep 17 00:00:00 2001 From: Martin Liu Date: Sat, 4 May 2019 21:45:09 +0800 Subject: [PATCH 14/20] PowerHal: walleye: Support VR reload thermal config Test: boot Bug: 129495482 Change-Id: Ib445c75448bf3633a80d9cd305a7b437850e0927 --- device-common.mk | 3 + powerhint.json | 517 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 520 insertions(+) create mode 100644 powerhint.json diff --git a/device-common.mk b/device-common.mk index f848de1..2e9e54e 100644 --- a/device-common.mk +++ b/device-common.mk @@ -135,6 +135,9 @@ PRODUCT_COPY_FILES += \ device/google/muskie/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \ device/google/muskie/thermal-engine-vr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-vr.conf +PRODUCT_COPY_FILES += \ + device/google/muskie/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json + # Wifi configuration file PRODUCT_COPY_FILES += \ device/google/muskie/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini diff --git a/powerhint.json b/powerhint.json new file mode 100644 index 0000000..462a5aa --- /dev/null +++ b/powerhint.json @@ -0,0 +1,517 @@ +{ + "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", + "ResetOnInit": true + }, + { + "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" + } + ] +} From 4d902802e6762f870902e2d3eb13cc1fb2082587 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Tue, 7 May 2019 22:04:53 +0000 Subject: [PATCH 15/20] Revert "PowerHal: walleye: Support VR reload thermal config" This reverts commit f18b74e23e5fa9bb6a2c6f6ce23dbbf81863ae74. Reason for revert: b/132193648 Change-Id: I4f70a769560e010f7c397cad774a8c82cb1135dc --- device-common.mk | 3 - powerhint.json | 517 ----------------------------------------------- 2 files changed, 520 deletions(-) delete mode 100644 powerhint.json diff --git a/device-common.mk b/device-common.mk index 2e9e54e..f848de1 100644 --- a/device-common.mk +++ b/device-common.mk @@ -135,9 +135,6 @@ PRODUCT_COPY_FILES += \ device/google/muskie/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \ device/google/muskie/thermal-engine-vr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-vr.conf -PRODUCT_COPY_FILES += \ - device/google/muskie/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json - # Wifi configuration file PRODUCT_COPY_FILES += \ device/google/muskie/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini diff --git a/powerhint.json b/powerhint.json deleted file mode 100644 index 462a5aa..0000000 --- a/powerhint.json +++ /dev/null @@ -1,517 +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", - "ResetOnInit": true - }, - { - "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" - } - ] -} From f297f7176ce8ca8eb2964dd05bf8f925f882f353 Mon Sep 17 00:00:00 2001 From: Martin Liu Date: Sat, 4 May 2019 21:45:09 +0800 Subject: [PATCH 16/20] PowerHal: walleye: Support VR reload thermal config Test: boot Bug: 129495482 Change-Id: I264c65b038b4c14ca96698feb8929f97dcbbe4ce --- device-common.mk | 3 + powerhint.json | 517 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 520 insertions(+) create mode 100644 powerhint.json diff --git a/device-common.mk b/device-common.mk index f848de1..2e9e54e 100644 --- a/device-common.mk +++ b/device-common.mk @@ -135,6 +135,9 @@ PRODUCT_COPY_FILES += \ device/google/muskie/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \ device/google/muskie/thermal-engine-vr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-vr.conf +PRODUCT_COPY_FILES += \ + device/google/muskie/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json + # Wifi configuration file PRODUCT_COPY_FILES += \ device/google/muskie/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini diff --git a/powerhint.json b/powerhint.json new file mode 100644 index 0000000..462a5aa --- /dev/null +++ b/powerhint.json @@ -0,0 +1,517 @@ +{ + "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", + "ResetOnInit": true + }, + { + "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" + } + ] +} From bd646819230e0d1be92d7224c94ad91f7cdb76ff Mon Sep 17 00:00:00 2001 From: Yiwen Chen Date: Tue, 4 Jun 2019 23:04:48 -0700 Subject: [PATCH 17/20] Switch back default vibrate for calls setting for walleye devices Bug: 130741987 Test: Tested on device Change-Id: I5f087bb8b1c6c3364d2d3bf026aab0783350e9dd --- .../base/packages/SettingsProvider/res/values/defaults.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml index 79aec49..4114c28 100644 --- a/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml +++ b/walleye/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -18,5 +18,5 @@ --> - true + false From 73ec7fa018734d2f56f9e1704ea9f4c3ad1503dd Mon Sep 17 00:00:00 2001 From: Vincent Palomares Date: Mon, 19 Nov 2018 17:27:04 -0800 Subject: [PATCH 18/20] muskie: MNH mitigation monitor. Bug: 119689840 Test: Tested manually using a dummy cooling device Change-Id: I27bbf7e4c1c5a67f3f0d36fce13651a7702c2168 Signed-off-by: Vincent Palomares --- thermal-engine.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/thermal-engine.conf b/thermal-engine.conf index 4e89521..fa98894 100755 --- a/thermal-engine.conf +++ b/thermal-engine.conf @@ -59,6 +59,15 @@ thresholds_clr 49000 51000 53000 actions cluster0+cluster1+gpu+report cluster0+cluster1+gpu+report cluster0+cluster1+gpu+report action_info 1094400+1190400+414000000+1 883200+902400+342000000+1 300000+300000+257000000+1 +[MNH-MONITOR] +algo_type monitor +sampling 2000 +sensor back_therm +thresholds 50000 52000 +thresholds_clr 49000 51000 +actions mnh mnh +action_info 3 4 + [BATTERY-MONITOR] algo_type monitor sampling 2000 From 5dedbb6e7f2158d7ef2e74ba9715af775ff2ffd1 Mon Sep 17 00:00:00 2001 From: Kumar Anand Date: Fri, 14 Jun 2019 13:13:28 -0700 Subject: [PATCH 19/20] wifi - Include Extended Supported Rates (50) IE in scan Updates g_probe_req_ie_bitmap_1 so that Extended Supported Rates (50) IE is included in Probe Request (Scanning). This is needed to solve IOT issues with certain APs. Bug: 122378191 Test: basic function test (sta, hotspot, p2p) pass Test: Check sniffer, probe request has Extended Supported Rates (50) Change-Id: Ic6fd7ca52ce7304c222c3742609c77a644c170f7 --- WCNSS_qcom_cfg.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WCNSS_qcom_cfg.ini b/WCNSS_qcom_cfg.ini index 9f945f1..3397494 100644 --- a/WCNSS_qcom_cfg.ini +++ b/WCNSS_qcom_cfg.ini @@ -313,7 +313,7 @@ g_enable_probereq_whitelist_ies=1 # g_probe_req_ie_bitmap_0=0x00000000 #[] (default) # g_probe_req_ie_bitmap_1=0x80000009 #[32, 35, 63] g_probe_req_ie_bitmap_0=0x0000000B -# g_probe_req_ie_bitmap_1=0x00000000 +g_probe_req_ie_bitmap_1=0x00040000 # g_probe_req_ie_bitmap_2=0x00000000 # g_probe_req_ie_bitmap_3=0x00000000 # g_probe_req_ie_bitmap_4=0x00000000 From f0a2c6de3afefc780fc20878a5e785ff5e1f7126 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 3 Jun 2019 15:30:17 -0700 Subject: [PATCH 20/20] Dark boot on dark theme. Bug: 113028175 Bug: 134157796 Test: Build and flash walleye with the matching bootloader change. Check serial log regarding the start of vendor.darkboot and vendor.darkboot_clear services when toggling dark theme in Settings. Also read the value via `dd bs=1 skip=14408 if=/dev/block/sdd1 count=32 | xxd` to confirm the change. Test: Trigger a factory reset via Settings. Check the value in /misc after the reset. Change-Id: Ie8504cec4358576890cc395de8df1679fa52fa01 --- init-common.rc | 25 +++++++++++++++++ recovery/Android.bp | 38 ++++++++++++++++++++++++++ recovery/recovery_ui.cpp | 58 ++++++++++++++++++++++++++++++++++++++++ walleye/BoardConfig.mk | 5 ++++ 4 files changed, 126 insertions(+) create mode 100644 recovery/Android.bp create mode 100644 recovery/recovery_ui.cpp diff --git a/init-common.rc b/init-common.rc index 0dcc3f0..f10721d 100644 --- a/init-common.rc +++ b/init-common.rc @@ -48,3 +48,28 @@ on property:persist.vendor.charge.stop.level=* && property:sys.all.modules.ready on property:persist.vendor.charge.start.level=* && property:sys.all.modules.ready=1 write /sys/module/htc_battery/parameters/charge_start_level ${persist.vendor.charge.start.level} + +# Write the dark theme magic (`theme-dark`, or 0x7468656d652d6461726b in hex string) to /misc +# partition. Offset 12360 (0x3048) in vendor space is effectively offset 14408 (0x3848) in /misc +# partition. +service vendor.darkboot /vendor/bin/misc_writer --vendor-space-offset 12360 --hex-string 0x7468656d652d6461726b + disabled + oneshot + +# Clear the 10-byte dark theme magic in /misc partition. Offset 0 in vendor space is effectively +# offset 2048 in /misc partition. +service vendor.darkboot_clear /vendor/bin/misc_writer --vendor-space-offset 12360 --hex-string 0x00000000000000000000 + disabled + oneshot + +# Set the dark boot flag on dark mode (UiModeManager.MODE_NIGHT_YES == 2). +on property:persist.sys.theme=2 + start vendor.darkboot + +# Clear the dark theme flag on light mode (UiModeManager.MODE_NIGHT_NO == 1) or auto mode +# (UiModeManager.MODE_NIGHT_AUTO == 0). +on property:persist.sys.theme=1 + start vendor.darkboot_clear + +on property:persist.sys.theme=0 + start vendor.darkboot_clear diff --git a/recovery/Android.bp b/recovery/Android.bp new file mode 100644 index 0000000..fffe848 --- /dev/null +++ b/recovery/Android.bp @@ -0,0 +1,38 @@ +// +// Copyright (C) 2019 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +cc_library_static { + name: "librecovery_ui_walleye", + owner: "google", + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + "-pedantic", + ], + srcs: [ + "recovery_ui.cpp", + ], + + static_libs: [ + "libbootloader_message", + ], + + shared_libs: [ + "libbase", + "librecovery_ui", + ], +} diff --git a/recovery/recovery_ui.cpp b/recovery/recovery_ui.cpp new file mode 100644 index 0000000..0ac214f --- /dev/null +++ b/recovery/recovery_ui.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include +#include +#include + +// Wipes the provisioned flag as part of data wipe. +static bool WipeProvisionedFlag() { + // Must be consistent with the one in init.hardware.rc (10-byte `theme-dark`). The magic is at + // 0x3048 in vendor space, or (0x800 + 0x3048) since the start of /misc. + const std::string wipe_str(10, '\x00'); + constexpr size_t kProvisionedFlagOffsetInVendorSpace = 0x3048; + if (std::string err; !WriteMiscPartitionVendorSpace( + wipe_str.data(), wipe_str.size(), kProvisionedFlagOffsetInVendorSpace, &err)) { + LOG(ERROR) << "Failed to write wipe string: " << err; + return false; + } + LOG(INFO) << "Provisioned flag wiped successful"; + return true; +} + +class WalleyeDevice : public Device { + public: + WalleyeDevice(ScreenRecoveryUI* ui) : Device(ui) {} + + // Hook to wipe user data not stored in /data. + bool PostWipeData() override { + // Try to do everything but report a failure if anything wasn't successful. + bool total_success = true; + auto ui = GetUI(); + ui->Print("Wiping provisioned flag...\n"); + if (!WipeProvisionedFlag()) { + total_success = false; + } + return total_success; + } +}; + +Device* make_device() { + return new WalleyeDevice(new ScreenRecoveryUI); +} diff --git a/walleye/BoardConfig.mk b/walleye/BoardConfig.mk index cf98414..88b4896 100644 --- a/walleye/BoardConfig.mk +++ b/walleye/BoardConfig.mk @@ -35,3 +35,8 @@ BOARD_LISA_TARGET_SCRIPTS := device/google/wahoo/lisa/ BOARD_KERNEL_CMDLINE += androidboot.dtbo_idx=3 BOARD_EXT4_SHARE_DUP_BLOCKS := true + +TARGET_RECOVERY_UI_LIB := \ + librecovery_ui_walleye \ + libbootloader_message \ + libfstab