From fb22d799d66663c05c5c85b746b563c74e58b721 Mon Sep 17 00:00:00 2001 From: "Ali K. Zadeh" Date: Thu, 11 Jul 2024 18:51:41 +0000 Subject: [PATCH 1/2] [caimito] Enable PA_KILL during PA_KILL_BOOST Currently, we enable PA_KILL always on camera launch. This CL puts this feature behind a power boost profile which can only be triggered from camera hal and is controlled by a mendel flag. Bug: 350594261 Test: adb logcat Flag: EXEMPT resource only update Change-Id: Id227bd35fda97d5b0cbdfe9e4df39eff2e565b7d --- perf/powerhint-caiman.json | 19 +------------------ perf/powerhint-komodo.json | 19 +------------------ perf/powerhint-ripcurrentpro.json | 19 +------------------ perf/powerhint-tokay.json | 19 +------------------ 4 files changed, 4 insertions(+), 72 deletions(-) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 52f47d8f..8d2bdd3c 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -579,16 +579,6 @@ "Type": "Property", "ResetOnInit": true }, - { - "Name": "PowerHALLaunch", - "Path": "vendor.powerhal.is_launch", - "Values": [ - "1", - "0" - ], - "Type": "Property", - "ResetOnInit": true - }, { "Name": "BigTjOffset", "Path": "/sys/devices/platform/100a0000.BIG/offset_enabled", @@ -1130,12 +1120,6 @@ "Duration": 5000, "Value": "1" }, - { - "PowerHint": "LAUNCH", - "Node": "PowerHALLaunch", - "Duration": 5000, - "Value": "1" - }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1423,9 +1407,8 @@ "Value": "0" }, { - "PowerHint": "CAMERA_LAUNCH", + "PowerHint": "CAMERA_PA_KILL_BOOST", "Node": "PA_KILL", - "EnableProperty": "vendor.powerhal.is_launch", "Duration": 0, "Value": "102400" }, diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index d9cd3f5a..26cc289e 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -579,16 +579,6 @@ "Type": "Property", "ResetOnInit": true }, - { - "Name": "PowerHALLaunch", - "Path": "vendor.powerhal.is_launch", - "Values": [ - "1", - "0" - ], - "Type": "Property", - "ResetOnInit": true - }, { "Name": "BigTjOffset", "Path": "/sys/devices/platform/100a0000.BIG/offset_enabled", @@ -1130,12 +1120,6 @@ "Duration": 5000, "Value": "1" }, - { - "PowerHint": "LAUNCH", - "Node": "PowerHALLaunch", - "Duration": 5000, - "Value": "1" - }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1423,9 +1407,8 @@ "Value": "0" }, { - "PowerHint": "CAMERA_LAUNCH", + "PowerHint": "CAMERA_PA_KILL_BOOST", "Node": "PA_KILL", - "EnableProperty": "vendor.powerhal.is_launch", "Duration": 0, "Value": "102400" }, diff --git a/perf/powerhint-ripcurrentpro.json b/perf/powerhint-ripcurrentpro.json index 9d8ceacf..cb48d792 100644 --- a/perf/powerhint-ripcurrentpro.json +++ b/perf/powerhint-ripcurrentpro.json @@ -569,16 +569,6 @@ "Type": "Property", "ResetOnInit": true }, - { - "Name": "PowerHALLaunch", - "Path": "vendor.powerhal.is_launch", - "Values": [ - "1", - "0" - ], - "Type": "Property", - "ResetOnInit": true - }, { "Name": "INTCAMFreq", "Path": "/sys/devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq", @@ -1056,12 +1046,6 @@ "Duration": 5000, "Value": "1" }, - { - "PowerHint": "LAUNCH", - "Node": "PowerHALLaunch", - "Duration": 5000, - "Value": "1" - }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1343,9 +1327,8 @@ "Value": "0" }, { - "PowerHint": "CAMERA_LAUNCH", + "PowerHint": "CAMERA_PA_KILL_BOOST", "Node": "PA_KILL", - "EnableProperty": "vendor.powerhal.is_launch", "Duration": 0, "Value": "102400" }, diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 52f47d8f..8d2bdd3c 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -579,16 +579,6 @@ "Type": "Property", "ResetOnInit": true }, - { - "Name": "PowerHALLaunch", - "Path": "vendor.powerhal.is_launch", - "Values": [ - "1", - "0" - ], - "Type": "Property", - "ResetOnInit": true - }, { "Name": "BigTjOffset", "Path": "/sys/devices/platform/100a0000.BIG/offset_enabled", @@ -1130,12 +1120,6 @@ "Duration": 5000, "Value": "1" }, - { - "PowerHint": "LAUNCH", - "Node": "PowerHALLaunch", - "Duration": 5000, - "Value": "1" - }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1423,9 +1407,8 @@ "Value": "0" }, { - "PowerHint": "CAMERA_LAUNCH", + "PowerHint": "CAMERA_PA_KILL_BOOST", "Node": "PA_KILL", - "EnableProperty": "vendor.powerhal.is_launch", "Duration": 0, "Value": "102400" }, From 87147bd1abc1576d2cdc8452eb8b1f4c77643abe Mon Sep 17 00:00:00 2001 From: Juan Yescas Date: Wed, 24 Jul 2024 22:22:02 -0700 Subject: [PATCH 2/2] 16kb: Set 16kb kernel for caimito targets When TARGET_BOOTS_16K is set to true for caimito targets, the 16kb kernel will be picked. Bug: 347110197 Test: $ source build/envsetup.sh $ lunch tokay_16k-trunk_staging-userdebug $ get_build_var TARGET_KERNEL_DIR device/google/caimito-kernels/6.1/trunk-12120393/16kb $ get_build_var RELEASE_KERNEL_TOKAY_DIR device/google/caimito-kernels/6.1/trunk-12120393 $ get_build_var KERNEL_MODULE_DIR device/google/caimito-kernels/6.1/trunk-12120393/16kb $ get_build_var TARGET_BOARD_KERNEL_HEADERS device/google/caimito-kernels/6.1/trunk-12120393/kernel-headers Flag: EXEMPT bugfix Change-Id: I1fc0f3aa778eb2e25d2d07d8cc9f26065aabb4bf --- device-caiman.mk | 3 +++ device-caimito-16k-common.mk | 20 ++++++++++++++++++++ device-komodo.mk | 3 +++ device-tokay.mk | 3 +++ 4 files changed, 29 insertions(+) create mode 100644 device-caimito-16k-common.mk diff --git a/device-caiman.mk b/device-caiman.mk index ff1b7d80..81cb85b0 100644 --- a/device-caiman.mk +++ b/device-caiman.mk @@ -27,6 +27,9 @@ $(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOA ifdef RELEASE_KERNEL_CAIMAN_DIR TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_CAIMAN_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_CAIMAN_DIR)/kernel-headers + +include device/google/caimito/device-caimito-16k-common.mk + else TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers diff --git a/device-caimito-16k-common.mk b/device-caimito-16k-common.mk new file mode 100644 index 00000000..b969354a --- /dev/null +++ b/device-caimito-16k-common.mk @@ -0,0 +1,20 @@ +# +# Copyright (C) 2024 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. +# + +ifeq ($(TARGET_BOOTS_16K),true) +# Configures the 16kb kernel directory. +TARGET_KERNEL_DIR := $(TARGET_KERNEL_DIR)/16kb +endif diff --git a/device-komodo.mk b/device-komodo.mk index 5b4f491a..4f1563af 100644 --- a/device-komodo.mk +++ b/device-komodo.mk @@ -27,6 +27,9 @@ $(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOA ifdef RELEASE_KERNEL_KOMODO_DIR TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_KOMODO_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_KOMODO_DIR)/kernel-headers + +include device/google/caimito/device-caimito-16k-common.mk + else TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers diff --git a/device-tokay.mk b/device-tokay.mk index 0d2c19a3..a02291d4 100644 --- a/device-tokay.mk +++ b/device-tokay.mk @@ -27,6 +27,9 @@ $(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOA ifdef RELEASE_KERNEL_TOKAY_DIR TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_TOKAY_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_TOKAY_DIR)/kernel-headers + +include device/google/caimito/device-caimito-16k-common.mk + else TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers