From e3e61f15bc75a85ec2ee590ef1960259375b81dd Mon Sep 17 00:00:00 2001 From: Leo Liou Date: Fri, 17 Mar 2023 16:31:55 +0800 Subject: [PATCH 1/7] bluejay: conf: run ufs ffu script after boot complete The ufs script is to work for ffu preparing. If device's ufs has an old firmware, the script will copy the valid firmware into disk and wait for ffu update on bootloader. Bug: 273305212 Test: full build and test ffu update Change-Id: Ib5e2c57494ee22c33b93f1eda0e72049dcd12d16 Signed-off-by: Leo Liou --- device-bluejay.mk | 2 ++ storage/Android.bp | 27 +++++++++++++++++++++++++++ storage/storage.bluejay.rc | 7 +++++++ storage/ufs_firmware_update.sh | 19 +++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 storage/Android.bp create mode 100644 storage/storage.bluejay.rc create mode 100755 storage/ufs_firmware_update.sh diff --git a/device-bluejay.mk b/device-bluejay.mk index 6663f06..62e97f3 100644 --- a/device-bluejay.mk +++ b/device-bluejay.mk @@ -247,3 +247,5 @@ PRODUCT_PRODUCT_PROPERTIES ?= \ PRODUCT_PRODUCT_PROPERTIES += \ setupwizard.feature.enable_quick_start_flow_for_debug=true \ +# UFS: the script is used to select the corresponding firmware to run FFU. +PRODUCT_PACKAGES += ufs_firmware_update.sh diff --git a/storage/Android.bp b/storage/Android.bp new file mode 100644 index 0000000..595857a --- /dev/null +++ b/storage/Android.bp @@ -0,0 +1,27 @@ +// +// Copyright (C) 2017 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. + +package { + default_applicable_licenses: [ + "//device/google/bluejay:device_google_bluejay_license", + ], +} + +sh_binary { + name: "ufs_firmware_update.sh", + src: "ufs_firmware_update.sh", + init_rc: ["storage.bluejay.rc"], + vendor: true, +} diff --git a/storage/storage.bluejay.rc b/storage/storage.bluejay.rc new file mode 100644 index 0000000..9873325 --- /dev/null +++ b/storage/storage.bluejay.rc @@ -0,0 +1,7 @@ +on property:sys.boot_completed=1 + # Copy ufs firmware to disk + start ufs_firmware_update + +service ufs_firmware_update /vendor/bin/ufs_firmware_update.sh + disabled + oneshot diff --git a/storage/ufs_firmware_update.sh b/storage/ufs_firmware_update.sh new file mode 100755 index 0000000..d118115 --- /dev/null +++ b/storage/ufs_firmware_update.sh @@ -0,0 +1,19 @@ +#!/vendor/bin/sh +# +# The script belongs to the feature of UFS FFU via OTA: go/p23-ffu-ota +# Its purpose is to copy the corresponding firmware into partition for UFS FFU. + +ufs_dev="/dev/sys/block/bootdevice" +fw_dir="/vendor/firmware" +blk_dev="/dev/block/by-name/fips" + +vendor=$(cat ${ufs_dev}/vendor | tr -d "[:space:]") +model=$(cat ${ufs_dev}/model | tr -d "[:space:]") +rev=$(cat ${ufs_dev}/rev | tr -d "[:space:]") + +file=$(find ${fw_dir} -name "*${vendor}${model}${rev}*" | head -n 1) +if [ -n "$file" ]; then + # The first 4KB block at fips partition has been occupied, and unused space begins from 4 KB + # Refer to: go/pixel-mp-ffu-ota-1p + dd if="$file" of=$blk_dev bs=4k seek=1 +fi From a235af6ad280ad823d4ddbfbb3c368540ac9ebdb Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Tue, 7 Mar 2023 19:48:26 +0000 Subject: [PATCH 2/7] powerhint.json: Update uclamp_min hint to account for margin Upstream has fixed relationship between uclamp_min and margin which means uclamp_min value between 80-100% of capacity of the CPU is a valid value and will not cause upmigration. To keep the current hints in powerhint.json the same, we must update uclamp_min to be capacity_orig_of(medium_cpu) + 1. This change is dependent on uclamp vs fits margin in GKI, vendor modules. And an improvement in sched_pixel to ignore the 25% boost if the only reason to request the frequency is uclamp_min. To cater for the later - we multiply each uclamp_min value with 1.25 - except ones that look intentionally set around capacity boundaries. Bug: 261695590 Test: PtsUiBench Signed-off-by: Qais Yousef Change-Id: I873b6abe4b05f2d3c74fe7e84b634390be779506 --- powerhint.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/powerhint.json b/powerhint.json index 08e80e1..815cf78 100644 --- a/powerhint.json +++ b/powerhint.json @@ -143,7 +143,7 @@ "Name": "TAUClampBoost", "Path": "/proc/vendor_sched/ta_uclamp_min", "Values": [ - "553", + "692", "1" ], "ResetOnInit": true @@ -152,7 +152,7 @@ "Name": "FGUClampBoost", "Path": "/proc/vendor_sched/fg_uclamp_min", "Values": [ - "161", + "202", "0" ], "ResetOnInit": true @@ -161,8 +161,8 @@ "Name": "MLUclampBoost", "Path": "/proc/vendor_sched/nnapi_uclamp_min", "Values": [ - "180", - "512" + "225", + "640" ], "DefaultIndex": 0, "ResetOnInit": true @@ -541,13 +541,13 @@ "PowerHint": "LAUNCH", "Node": "TAUClampBoost", "Duration": 5000, - "Value": "553" + "Value": "692" }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", "Duration": 5000, - "Value": "161" + "Value": "202" }, { "PowerHint": "LAUNCH", @@ -1855,7 +1855,7 @@ "PowerHint": "ML_ACC", "Node": "MLUclampBoost", "Duration": 2000, - "Value": "512" + "Value": "640" } ], "AdpfConfig": [ @@ -1871,8 +1871,8 @@ "PID_Do": 500.0, "PID_Du": 0.0, "UclampMin_On": true, - "UclampMin_Init": 185, - "UclampMin_High": 384, + "UclampMin_Init": 232, + "UclampMin_High": 480, "UclampMin_Low": 2, "SamplingWindow_P": 1, "SamplingWindow_I": 0, @@ -1895,8 +1895,8 @@ "PID_Do": 500.0, "PID_Du": 0.0, "UclampMin_On": true, - "UclampMin_Init": 129, - "UclampMin_High": 384, + "UclampMin_Init": 162, + "UclampMin_High": 480, "UclampMin_Low": 2, "SamplingWindow_P": 1, "SamplingWindow_I": 0, @@ -1919,8 +1919,8 @@ "PID_Do": 500.0, "PID_Du": 0.0, "UclampMin_On": true, - "UclampMin_Init": 129, - "UclampMin_High": 384, + "UclampMin_Init": 162, + "UclampMin_High": 480, "UclampMin_Low": 2, "SamplingWindow_P": 1, "SamplingWindow_I": 0, @@ -1946,9 +1946,9 @@ "SamplingWindow_I": 1, "SamplingWindow_D": 1, "UclampMin_On": true, - "UclampMin_Init": 200, - "UclampMin_High": 157, - "UclampMin_Low": 157, + "UclampMin_Init": 250, + "UclampMin_High": 197, + "UclampMin_Low": 197, "ReportingRateLimitNs": 1, "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, @@ -1970,9 +1970,9 @@ "SamplingWindow_I": 1, "SamplingWindow_D": 1, "UclampMin_On": true, - "UclampMin_Init": 200, - "UclampMin_High": 42, - "UclampMin_Low": 42, + "UclampMin_Init": 250, + "UclampMin_High": 53, + "UclampMin_Low": 53, "ReportingRateLimitNs": 1, "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, @@ -1994,7 +1994,7 @@ "SamplingWindow_I": 1, "SamplingWindow_D": 1, "UclampMin_On": true, - "UclampMin_Init": 200, + "UclampMin_Init": 250, "UclampMin_High": 0, "UclampMin_Low": 0, "ReportingRateLimitNs": 1, From 771ba212e2b73e673fdbcfa3cc575f728a82d7e9 Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Thu, 13 Apr 2023 10:02:37 +0000 Subject: [PATCH 3/7] [Quickstart] Turn off QS on legacy Pixels Bug: 277898824 Change-Id: I2faa36894265e373b62c500928d24a0128f9fafb Test: manually test --- device-bluejay.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/device-bluejay.mk b/device-bluejay.mk index 603b33e..4d9ed6b 100644 --- a/device-bluejay.mk +++ b/device-bluejay.mk @@ -242,8 +242,3 @@ PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES ?= \ ro.com.google.ime.height_ratio=1.05 - -# Setup Wizard device-specific settings -PRODUCT_PRODUCT_PROPERTIES += \ - setupwizard.feature.enable_quick_start_flow_for_debug=true \ - From adbf67d1de3243dfb146304f48d98dc75d412caa Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Fri, 14 Apr 2023 01:13:36 +0000 Subject: [PATCH 4/7] Revert "[Quickstart] Turn off QS on legacy Pixels" Revert submission 22606975-turn off qs Reason for revert: confirm with team that this CL submit too early and need to rollback then submit again at 4/19. Reverted changes: /q/submissionid:22606975-turn+off+qs Change-Id: I24d478f4d49d0e1685e3ad797d6b3bc97967f1a6 --- device-bluejay.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device-bluejay.mk b/device-bluejay.mk index 4d9ed6b..603b33e 100644 --- a/device-bluejay.mk +++ b/device-bluejay.mk @@ -242,3 +242,8 @@ PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES ?= \ ro.com.google.ime.height_ratio=1.05 + +# Setup Wizard device-specific settings +PRODUCT_PRODUCT_PROPERTIES += \ + setupwizard.feature.enable_quick_start_flow_for_debug=true \ + From 647d2d0ae1ec240e0b580c2495a5a09e3817f30b Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Tue, 18 Apr 2023 09:30:46 +0000 Subject: [PATCH 5/7] Revert^2 "[Quickstart] Turn off QS on legacy Pixels" adbf67d1de3243dfb146304f48d98dc75d412caa Change-Id: I748aab3d3ac6f9877da107a804e390d85e67a3fa --- device-bluejay.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/device-bluejay.mk b/device-bluejay.mk index 226e5c4..161d807 100644 --- a/device-bluejay.mk +++ b/device-bluejay.mk @@ -243,9 +243,5 @@ PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES ?= \ ro.com.google.ime.height_ratio=1.05 -# Setup Wizard device-specific settings -PRODUCT_PRODUCT_PROPERTIES += \ - setupwizard.feature.enable_quick_start_flow_for_debug=true \ - # UFS: the script is used to select the corresponding firmware to run FFU. PRODUCT_PACKAGES += ufs_firmware_update.sh From c1440fc558cb27033e966bb44cf4c98cb5ea4322 Mon Sep 17 00:00:00 2001 From: Speth Chang Date: Wed, 19 Apr 2023 06:22:26 +0000 Subject: [PATCH 6/7] Enable P23 multicam framework on bluejay Bug: 275279662 Test: build pass Test: go/p23_multicam_enablement_checklist Change-Id: I7958fda43f90bed917ae7bd0f50705ee2551b855 --- device-bluejay.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device-bluejay.mk b/device-bluejay.mk index 603b33e..eaa0c50 100644 --- a/device-bluejay.mk +++ b/device-bluejay.mk @@ -77,7 +77,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_PROPERTY_OVERRIDES += \ persist.vendor.camera.extended_launch_boost=1 \ persist.vendor.camera.raise_buf_allocation_priority=1 \ - persist.vendor.camera.fixed_fps_range_boost=1 + persist.vendor.camera.fixed_fps_range_boost=1 \ + vendor.camera.multicam.enable_p23_multicam=true # Display Config PRODUCT_COPY_FILES += \ From 83fc0d5f61b736b7106123119584d26905fc5f79 Mon Sep 17 00:00:00 2001 From: Cyan_Hsieh Date: Thu, 20 Apr 2023 18:43:34 +0800 Subject: [PATCH 7/7] Add device mk OWNERS Bug: 278167548 Change-Id: Id74de9d2d1de889bb72ff83e06a38f3715b4fd0a --- OWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OWNERS b/OWNERS index 1451bd8..79003ba 100644 --- a/OWNERS +++ b/OWNERS @@ -1 +1,4 @@ per-file powerhint.json = jychen@google.com,jenhaochen@google.com,wvw@google.com,joaodias@google.com + +# per-file for Pixel device makefiles, see go/pixel-device-mk-owner-checklist for details. +per-file *.mk,*/BoardConfig.mk=file:device/google/gs-common:master:/OWNERS