From da7e85e6c05a2683e8d5643d2a304415ca68c5fd Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Tue, 9 Jan 2024 08:52:07 +0000 Subject: [PATCH 01/64] Update display dim configuration To extend battery life, modify the display dim configuration to enter the dimming state more aggressively. The screen should dim at minimum(20 seconds, timeout * 0.33) before the screen actually timing out. Screen timeout (secs) | Dim duration before | Dim duration After 15 3 4.95 30 6 9.9 60 7 19.8 120 7 20 300 7 20 600 7 20 Bug: 315246849 Test: Build & Verify the dim duration with each setting. Change-Id: I79939290b6a355cf41d43f54a653c533ea833d26 --- overlay/frameworks/base/core/res/res/values/config.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 0c741670..611baa06 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -314,4 +314,11 @@ 100% + + + 20000 + + + 33% From cda0de8c3bf3ccf86e917ac95ee02e3d61eecc6a Mon Sep 17 00:00:00 2001 From: Wesley Lee Date: Fri, 19 Jan 2024 17:37:08 -0800 Subject: [PATCH 02/64] enable Zuma AV1 HDR editing Bug: 345301797 Change-Id: I06ceeaadd67e5c3bf5118ab33217b2fcfb554b2b Signed-off-by: Wesley Lee --- media_codecs_bo_c2.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/media_codecs_bo_c2.xml b/media_codecs_bo_c2.xml index 443c27e4..af97b43d 100644 --- a/media_codecs_bo_c2.xml +++ b/media_codecs_bo_c2.xml @@ -65,6 +65,7 @@ + From fe63fa4236d0b978c0e365356f9b59853f7f3360 Mon Sep 17 00:00:00 2001 From: Jerry Huang Date: Wed, 12 Jun 2024 16:50:38 +0800 Subject: [PATCH 03/64] zuma: video: change to use c2 "default" AIDL service Bug: 322920559 Change-Id: Ia2e6cac052bc0ee417e179f61804eada9ae87bf5 --- device.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 542fdc9e..fe5876e8 100644 --- a/device.mk +++ b/device.mk @@ -321,6 +321,7 @@ PRODUCT_VENDOR_PROPERTIES += ro.surface_flinger.prime_shader_cache.ultrahdr=1 DEVICE_MANIFEST_FILE := \ device/google/zuma/manifest.xml +BOARD_USE_CODEC2_AIDL := V1 ifneq (,$(filter aosp_%,$(TARGET_PRODUCT))) DEVICE_MANIFEST_FILE += \ device/google/zuma/manifest_media_aosp.xml @@ -812,12 +813,19 @@ PRODUCT_COPY_FILES += \ device/google/zuma/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \ PRODUCT_PROPERTY_OVERRIDES += \ - debug.stagefright.c2-poolmask=458752 \ debug.c2.use_dmabufheaps=1 \ media.c2.dmabuf.padding=512 \ debug.stagefright.ccodec_delayed_params=1 \ ro.vendor.gpu.dataspace=1 +ifneq ($(BOARD_USE_CODEC2_AIDL), ) +PRODUCT_PROPERTY_OVERRIDES += \ + debug.stagefright.c2-poolmask=1507328 +else +PRODUCT_PROPERTY_OVERRIDES += \ + debug.stagefright.c2-poolmask=458752 +endif + # Create input surface on the framework side PRODUCT_PROPERTY_OVERRIDES += \ debug.stagefright.c2inputsurface=-1 \ From cf0619c40d0ae4cf7d768bafa294a1bc4b4de5ab Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Mon, 17 Jun 2024 11:13:53 -0700 Subject: [PATCH 04/64] Remove CopyEfsTest from test mapping treehugger does not have any test suite setup for zuma target, and CopyEfsTest should only be run on zuma targets. So remove from test mapping to unbreak tests. Test: th Bug: 347396961 Change-Id: I079d24cae4808d3370c3821412640f7fef1d0cc7 --- CopyEfsTest/TEST_MAPPING | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 CopyEfsTest/TEST_MAPPING diff --git a/CopyEfsTest/TEST_MAPPING b/CopyEfsTest/TEST_MAPPING deleted file mode 100644 index 37a720b5..00000000 --- a/CopyEfsTest/TEST_MAPPING +++ /dev/null @@ -1,8 +0,0 @@ -{ - "postsubmit": [ - { - "name": "CopyEfsTest" - } - ] -} - From 579a541f268f8a7b2baa553ed66bd11118151bc9 Mon Sep 17 00:00:00 2001 From: YiKai Peng Date: Thu, 20 Jun 2024 02:31:16 +0000 Subject: [PATCH 05/64] zuma: wlc: add authstart permission Bug: 348272247 Test: Build/Flash Flag: EXEMPT bugfix Change-Id: I881dd032c7dbcc8bca55c1346e02d21b1f2c0145 Signed-off-by: YiKai Peng --- conf/init.zuma.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index f0cbf01c..3e0a2e76 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -257,6 +257,7 @@ on init chown system system /sys/class/power_supply/wireless/device/version chown system system /sys/class/power_supply/wireless/device/features chown system system /sys/class/power_supply/wireless/device/authtype + chown system system /sys/class/power_supply/wireless/device/authstart # Adaptive charge chown system system /sys/class/power_supply/battery/charge_deadline From 763984677a0630a2100b150c057c3d128a8f6c3d Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Tue, 18 Jun 2024 15:55:03 -0700 Subject: [PATCH 06/64] Only copy efs files to /data if device is 16K page size Test: Boot device, test dev options Bug: 341216848 Change-Id: I0bf328b8ff90e125dcbca5261fb8dd4e0ad458d8 --- conf/init.efs.16k.rc | 9 ++------- conf/init.efs.4k.rc | 2 +- conf/init.persist.rc | 1 + 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc index 72ae9894..89e2b57f 100644 --- a/conf/init.efs.16k.rc +++ b/conf/init.efs.16k.rc @@ -6,7 +6,7 @@ service copy_efs_files_to_data /vendor/bin/copy_efs_files_to_data oneshot disabled -on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=ext4 +on post-fs-data && property:ro.boot.hardware.cpu.pagesize=16384 mkdir /data/vendor/copied 0775 radio system restorecon_recursive /data/vendor/copied exec_start copy_efs_files_to_data @@ -15,12 +15,7 @@ on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=ex restorecon_recursive /data/vendor/ss setprop ro.vendor.persist.status mounted -on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=f2fs - mount_all /vendor/etc/fstab.efs - mount_all /vendor/etc/fstab.persist - setprop ro.vendor.persist.status mounted - -on post-fs-data && property:ro.boot.flash.locked=1 +on late-fs && property:ro.boot.hardware.cpu.pagesize=4096 mount_all /vendor/etc/fstab.efs mount_all /vendor/etc/fstab.persist setprop ro.vendor.persist.status mounted diff --git a/conf/init.efs.4k.rc b/conf/init.efs.4k.rc index 506c7220..60a07a9c 100644 --- a/conf/init.efs.4k.rc +++ b/conf/init.efs.4k.rc @@ -1,4 +1,4 @@ -on post-fs-data +on late-fs mount_all /vendor/etc/fstab.efs mount_all /vendor/etc/fstab.persist setprop ro.vendor.persist.status mounted diff --git a/conf/init.persist.rc b/conf/init.persist.rc index 7852c78e..4a4c3ff3 100644 --- a/conf/init.persist.rc +++ b/conf/init.persist.rc @@ -31,6 +31,7 @@ on property:ro.vendor.persist.status=mounted mkdir /mnt/vendor/persist/data/tz 0700 system system mkdir /mnt/vendor/persist/touch 0770 system system +on property:ro.fstype.data=* && property:ro.vendor.persist.status=mounted # Proxy for Secure Storage mkdir /data/vendor/rebootescrow 0770 hsm hsm mkdir /data/vendor/ss 0770 root system From 73a68dd6d3794ed8a4e791f2c86c4e55a61ea2aa Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Thu, 20 Jun 2024 21:04:40 -0700 Subject: [PATCH 07/64] Mount persist partition in early-init The graphics hal might need to access /persist early in the boot process. So mount persist early for 4K devices. Test: boot 4K device Bug: 338504890 Change-Id: I4b2a0a61ebaff5d85a4daac445d81ae3d21aa9c3 --- conf/init.efs.16k.rc | 8 +++++--- conf/init.efs.4k.rc | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc index 89e2b57f..e39ac23f 100644 --- a/conf/init.efs.16k.rc +++ b/conf/init.efs.16k.rc @@ -15,8 +15,10 @@ on post-fs-data && property:ro.boot.hardware.cpu.pagesize=16384 restorecon_recursive /data/vendor/ss setprop ro.vendor.persist.status mounted -on late-fs && property:ro.boot.hardware.cpu.pagesize=4096 - mount_all /vendor/etc/fstab.efs - mount_all /vendor/etc/fstab.persist +on early-init && property:ro.boot.hardware.cpu.pagesize=4096 + mount_all /vendor/etc/fstab.persist --early setprop ro.vendor.persist.status mounted +on late-fs && property:ro.boot.hardware.cpu.pagesize=4096 + mount_all /vendor/etc/fstab.efs --early + diff --git a/conf/init.efs.4k.rc b/conf/init.efs.4k.rc index 60a07a9c..8b48bdfb 100644 --- a/conf/init.efs.4k.rc +++ b/conf/init.efs.4k.rc @@ -1,4 +1,6 @@ -on late-fs - mount_all /vendor/etc/fstab.efs - mount_all /vendor/etc/fstab.persist +on early-init + mount_all /vendor/etc/fstab.persist --early setprop ro.vendor.persist.status mounted + +on late-fs + mount_all /vendor/etc/fstab.efs --early From 3319a13fee54590f80c66c116a579322dc99b2d6 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Fri, 21 Jun 2024 18:43:45 -0700 Subject: [PATCH 08/64] Change CopyEfsTest to test contents 4k mode devices no longer set up redirection, so the old test would fail now. Instead, this tests that the contents of the copied partitions will match. Since the partitions are mounted and could change, we work off of a copy. Change-Id: Ia98517bb4ede9cb3416132e815da9b87728423a6 Signed-off-by: Daniel Rosenberg Flag: TEST_ONLY Bug: 347744178 Test: atest CopyEfsTest --- .../src/com/android/test/CopyEfsTest.java | 83 ++++++++----------- 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/CopyEfsTest/src/com/android/test/CopyEfsTest.java index b00ef2fc..290ac24e 100644 --- a/CopyEfsTest/src/com/android/test/CopyEfsTest.java +++ b/CopyEfsTest/src/com/android/test/CopyEfsTest.java @@ -19,12 +19,15 @@ package com.android.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; +import org.junit.Before; +import org.junit.After; import android.platform.test.annotations.AppModeFull; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; import com.android.tradefed.testtype.junit4.DeviceTestRunOptions; +import com.android.tradefed.util.CommandResult; import com.android.tradefed.util.RunUtil; import org.junit.Test; @@ -36,62 +39,46 @@ import java.io.StringReader; @RunWith(DeviceJUnit4ClassRunner.class) public class CopyEfsTest extends BaseHostJUnit4Test { + @Before + public void setUp() throws Exception { + getDevice().enableAdbRoot(); - + getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test"); + getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/dump"); + } @Test @AppModeFull public void copyEfsTest() throws Exception { + assumeTrue(getDevice().executeShellCommand("getconf PAGESIZE").trim().equals("4096")); - getDevice().enableAdbRoot(); - - // This test can be run on OEM unlocked device only as unlocking bootloader requires - // manual intervention. - String result = getDevice().getProperty("ro.boot.flash.locked"); - assumeTrue("0".equals(result)); - final String dataFstype = getFsTypeFor("/data"); - assertTrue(!dataFstype.isEmpty()); - if (!dataFstype.equals("ext4")) { - getDevice().executeShellCommand("cmd recovery wipe ext4"); - RunUtil.getDefault().sleep(10000); - // Wait for 2 mins device to be online againg - getDevice().waitForDeviceOnline(120000); - getDevice().enableAdbRoot(); - } - assertEquals("ext4", getFsTypeFor("/data")); - String dataBlockDev = getBlockDevFor("/data"); - assertEquals(dataBlockDev, getBlockDevFor("/mnt/vendor/efs")); - assertEquals(dataBlockDev, getBlockDevFor("/mnt/vendor/efs_backup")); - assertEquals(dataBlockDev, getBlockDevFor("/mnt/vendor/modem_userdata")); + testDumpF2FS("efs"); + testDumpF2FS("efs_backup"); + testDumpF2FS("modem_userdata"); } - private String[] getMountInfo(String mountPoint) throws Exception { - String result = getDevice().executeShellCommand("cat /proc/mounts"); - BufferedReader br = new BufferedReader(new StringReader(result)); - String line; - while ((line = br.readLine()) != null) { - final String[] fields = line.split(" "); - final String device = fields[0]; - final String partition = fields[1]; - final String fsType = fields[2]; - if (partition.equals(mountPoint)) { - return fields; - } - } - return null; + private void testDumpF2FS(String name) throws Exception { + getDevice().executeShellV2Command(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name)); + CommandResult r = getDevice().executeShellV2Command(String.format("dump.f2fs -rfPo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); + assertEquals(r.getExitCode().intValue(), 0); + r = getDevice().executeShellV2Command(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); + assertEquals(r.getExitCode().intValue(), 0); + assertEquals("", getDevice().executeShellCommand("diff -rq /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump")); + // Remove timestamps at positions 6 and 7, because ls on device does not support --time-style + // Remove totals because on disk block usage may change depending on filesystem + String ls_cmd = "ls -alLnR /data/local/tmp/efs_test/%s | awk {\'$6=\"\";$7=\"\";if ($1 != \"total\"){print $0'}"; + String mnt_ls = getDevice().executeShellCommand(String.format(ls_cmd, "mnt")); + String dump_ls = getDevice().executeShellCommand(String.format(ls_cmd, "dump")); + assertEquals(mnt_ls, dump_ls); + getDevice().executeShellCommand("umount -r /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*"); + getDevice().executeShellCommand("rm /data/local/tmp/efs_test/" + name + ".img"); } - private String getFsTypeFor(String mountPoint) throws Exception { - String[] result = getMountInfo(mountPoint); - if (result == null) { - return ""; - } - return result[2]; - } - private String getBlockDevFor(String mountPoint) throws Exception { - String[] result = getMountInfo(mountPoint); - if (result == null) { - return ""; - } - return result[0]; + + @After + public void tearDown() throws Exception { + getDevice().executeShellCommand("umount -r /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test"); } } From dca09aa056490ed25d96111eee419c29da5c1e77 Mon Sep 17 00:00:00 2001 From: Julien Desprez Date: Tue, 25 Jun 2024 02:58:28 +0000 Subject: [PATCH 09/64] Tag CopyEfsTest as device-pixel-tests This will allow to run the tests out of the pixel tests set rather than the super large device-tests set. Which will save build resources. Flag: TEST_ONLY Change-Id: I7d902662dff05dfdc88808c5647793ff5bde6107 Test: presubmit Bug: 342232954 --- CopyEfsTest/Android.bp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CopyEfsTest/Android.bp b/CopyEfsTest/Android.bp index 52c5de4e..9b7a4592 100644 --- a/CopyEfsTest/Android.bp +++ b/CopyEfsTest/Android.bp @@ -30,6 +30,9 @@ java_test_host { "compatibility-host-util", "compatibility-tradefed", ], - test_suites: ["device-tests"], + test_suites: [ + "device-tests", + "device-pixel-tests" + ], test_config: "AndroidTest.xml", } From 92d50a76d30f819558083076227b00b32cdfb067 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Tue, 25 Jun 2024 23:44:07 +0000 Subject: [PATCH 10/64] Enable usb state update via udc sysfs Bug: 339241080 Test: tested on Shiba Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update Change-Id: I203e06e4416c5811ded7b7aaccbe7680693f2080 --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index a3f0420f..301b15d4 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -318,4 +318,7 @@ 100% + + + true From 48c79683bcac4b697cfa08949dfa4c4c7daed683 Mon Sep 17 00:00:00 2001 From: liangjlee Date: Thu, 27 Jun 2024 02:01:10 +0800 Subject: [PATCH 11/64] zuma: Include power/power.mk Bug: 331612600 Flag: EXEMPT (bug 337358613) Change-Id: I370cd115855b43d890dd488de65572593b238efb Signed-off-by: liangjlee --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 542fdc9e..7814d623 100644 --- a/device.mk +++ b/device.mk @@ -26,6 +26,7 @@ include device/google/gs-common/storage/storage.mk include device/google/gs-common/thermal/dump/thermal.mk include device/google/gs-common/thermal/thermal_hal/device.mk include device/google/gs-common/performance/perf.mk +include device/google/gs-common/power/power.mk include device/google/gs-common/pixel_metrics/pixel_metrics.mk include device/google/gs-common/soc/freq.mk include device/google/gs-common/gps/dump/log.mk From 12f2e5525734df0d4acb9856335d1ed5b9ed5f2b Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Wed, 26 Jun 2024 22:55:52 +0000 Subject: [PATCH 12/64] Use absolute path for udc device Avoid search in /sys/class/udc directory Bug: 339241080 Test: tested on Shiba Flag: EXEMPT bugfix Change-Id: Iad74cae0d6ad6887d79d705dc8478f1b44532503 --- usb/gadget/UsbGadget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h index 7f2d18b5..90e5bece 100644 --- a/usb/gadget/UsbGadget.h +++ b/usb/gadget/UsbGadget.h @@ -74,7 +74,7 @@ constexpr char kProcInterruptsPath[] = "/proc/interrupts"; constexpr char kProcIrqPath[] = "/proc/irq/"; constexpr char kSmpAffinityList[] = "/smp_affinity_list"; #ifndef UDC_PATH -#define UDC_PATH "/sys/class/udc/11210000.dwc3/" +#define UDC_PATH "/sys/devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3/" #endif static MonitorFfs monitorFfs(kGadgetName); From 94babd7bcc26906280f9cf082609d51f19c1b435 Mon Sep 17 00:00:00 2001 From: liangjlee Date: Thu, 27 Jun 2024 02:01:10 +0800 Subject: [PATCH 13/64] zuma: Include power/power.mk Bug: 331612600 Flag: EXEMPT (bug 337358613) Change-Id: I370cd115855b43d890dd488de65572593b238efb Signed-off-by: liangjlee --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index f6164ebb..4f09180b 100644 --- a/device.mk +++ b/device.mk @@ -26,6 +26,7 @@ include device/google/gs-common/storage/storage.mk include device/google/gs-common/thermal/dump/thermal.mk include device/google/gs-common/thermal/thermal_hal/device.mk include device/google/gs-common/performance/perf.mk +include device/google/gs-common/power/power.mk include device/google/gs-common/pixel_metrics/pixel_metrics.mk include device/google/gs-common/soc/freq.mk include device/google/gs-common/gps/dump/log.mk From 98f2222e27fc6a57b3731107050757192d5788ff Mon Sep 17 00:00:00 2001 From: Juan Yescas Date: Wed, 26 Jun 2024 21:34:18 -0700 Subject: [PATCH 14/64] 16kb: Use PRODUCT_BOOTS_16K to select the proper rc file and fstab The build flag PRODUCT_BOOTS_16K will be used to select the proper efs rc file and fstab: - When PRODUCT_BOOTS_16K := true, 16k rc files and fstab will be used. - When PRODUCT_BOOTS_16K := false, 4k rc files and fstab will be used. Bug: 346868433 Test: Built Pixel 8 targets $ source build/envsetup.sh $ lunch husky_pgagnostic-trunk_staging-userdebug $ get_build_var DEVICE_PAGE_AGNOSTIC $ get_build_var TARGET_KERNEL_DIR device/google/shusky-kernels/6.1/trunk-12010727/16kb $ get_build_var TARGET_BOARD_KERNEL_HEADERS device/google/shusky-kernels/6.1/trunk-12010727/kernel-headers $ get_build_var PRODUCT_BOOTS_16K true $ get_build_var TARGET_RW_FILE_SYSTEM_TYPE ext4 $ get_build_var TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE ext4 Flag: EXEMPT bugfix Change-Id: I4dba20518925a176f1e1e66596e2bb1e8ade7c26 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 542fdc9e..fde03f30 100644 --- a/device.mk +++ b/device.mk @@ -361,7 +361,7 @@ PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.rc \ device/google/zuma/conf/init.persist.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.persist.rc -ifeq (true,$(filter $(DEVICE_PAGE_AGNOSTIC) $(PRODUCT_16K_DEVELOPER_OPTION),true)) +ifeq (true,$(filter $(PRODUCT_BOOTS_16K) $(PRODUCT_16K_DEVELOPER_OPTION),true)) PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc \ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data \ From bf9f082f67119b0984eb3b6d8383d7d02d54272e Mon Sep 17 00:00:00 2001 From: Juan Yescas Date: Tue, 2 Jul 2024 18:14:47 -0700 Subject: [PATCH 15/64] 16kb: Use TARGET_BOOTS_16K to select the efs config files Test: Build and test pgagnostic targets Bug: 350529323 Bug: 346868433 Flag: EXEMPT bugfix Change-Id: I1e0bea52de09fe3c9ee2f52b0803882456943833 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 15c20c8e..e8544f5b 100644 --- a/device.mk +++ b/device.mk @@ -362,7 +362,7 @@ PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.rc \ device/google/zuma/conf/init.persist.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.persist.rc -ifeq (true,$(filter $(PRODUCT_BOOTS_16K) $(PRODUCT_16K_DEVELOPER_OPTION),true)) +ifeq (true,$(filter $(TARGET_BOOTS_16K) $(PRODUCT_16K_DEVELOPER_OPTION),true)) PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc \ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data \ From 84d08775112daec71779eb4909e1f71d02053f56 Mon Sep 17 00:00:00 2001 From: Mike McTernan Date: Thu, 4 Jul 2024 15:47:51 +0100 Subject: [PATCH 16/64] APC/TUI: remove support for APC Flag: EXEMPT build file change Bug: 351151445 Test: m && test on device Change-Id: I927fd5063cd12b94d63fff3057ae54cee75e908d --- device.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/device.mk b/device.mk index e8544f5b..6d421fc9 100644 --- a/device.mk +++ b/device.mk @@ -82,7 +82,6 @@ PRODUCT_SOONG_NAMESPACES += \ vendor/google_devices/common/chre/host/hal \ vendor/google/whitechapel/tools \ vendor/google/interfaces \ - vendor/google_devices/common/proprietary/confirmatioui_hal \ vendor/google_nos/host/android \ vendor/google_nos/test/system-test-harness \ vendor/google/camera @@ -864,8 +863,6 @@ PRODUCT_PACKAGES_DEBUG += \ trusty_stats_test \ trusty-coverage-controller \ -include device/google/gs101/confirmationui/confirmationui.mk - # Trusty Metrics Daemon PRODUCT_SOONG_NAMESPACES += \ vendor/google/trusty/common From f1eb38d1698bb282e676302e2530fcbdbc3d6ea7 Mon Sep 17 00:00:00 2001 From: Jeremy Kemp Date: Wed, 22 May 2024 09:54:58 +0100 Subject: [PATCH 17/64] Add Mali OpenCL ICD to PRODUCT_PACKAGES Bug: 324057328 Test: clpeak Change-Id: I4ca9b0d9854d6b94e128d40eba0910a1303a0a96 --- device.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index de9d31c1..1380cac6 100644 --- a/device.mk +++ b/device.mk @@ -269,9 +269,18 @@ PRODUCT_PACKAGES += \ csffw_image_prebuilt__firmware_prebuilt_ttux_mali_csffw.bin \ libGLES_mali \ vulkan.mali \ - libOpenCL \ libgpudataproducer +# Install the OpenCL ICD Loader +PRODUCT_SOONG_NAMESPACES += external/OpenCL-ICD-Loader +PRODUCT_PACKAGES += \ + libOpenCL \ + mali_icd__customer_pixel_opencl-icd_ARM.icd +ifeq ($(DEVICE_IS_64BIT_ONLY),false) +PRODUCT_PACKAGES += \ + mali_icd__customer_pixel_opencl-icd_ARM32.icd +endif + ifeq ($(USE_SWIFTSHADER),true) PRODUCT_PACKAGES += \ libEGL_angle \ From 044dead5b6a89094a6872240de5a3e605f6d959c Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Thu, 27 Jun 2024 18:14:28 -0700 Subject: [PATCH 18/64] Run fsck in CopyEfsTest We're copying from a live r/w image, so the picture we get may be a bit distorted. Running fsck over the image first should help with reliability, but f2fs does some fixes on mount as well, so we mount and unmount the image before running dump.f2fs. Change-Id: Ibb15388c55b6f909a1d1b849f9760f248644d9e9 Signed-off-by: Daniel Rosenberg Bug: 349120101 Test: atest CopyEfsTest Flag: TEST_ONLY --- .../src/com/android/test/CopyEfsTest.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/CopyEfsTest/src/com/android/test/CopyEfsTest.java index 290ac24e..23152fc3 100644 --- a/CopyEfsTest/src/com/android/test/CopyEfsTest.java +++ b/CopyEfsTest/src/com/android/test/CopyEfsTest.java @@ -59,26 +59,39 @@ public class CopyEfsTest extends BaseHostJUnit4Test { } private void testDumpF2FS(String name) throws Exception { - getDevice().executeShellV2Command(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name)); - CommandResult r = getDevice().executeShellV2Command(String.format("dump.f2fs -rfPo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); + getDevice().executeShellCommand(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name)); + + // The device was mounted r/w. To get a clean image, we run fsck, and then mount to allow mount time fixes to happen. + // We can then dump and mount read only to ensure the contents should be the same. + getDevice().executeShellCommand(String.format("fsck.f2fs -f /data/local/tmp/efs_test/%s.img", name, name)); + CommandResult r = getDevice().executeShellV2Command(String.format("mount /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); + assertEquals(r.getExitCode().intValue(), 0); + r = getDevice().executeShellV2Command("umount /data/local/tmp/efs_test/mnt"); + assertEquals(r.getExitCode().intValue(), 0); + + r = getDevice().executeShellV2Command(String.format("dump.f2fs -rfPo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); assertEquals(r.getExitCode().intValue(), 0); r = getDevice().executeShellV2Command(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); assertEquals(r.getExitCode().intValue(), 0); + assertEquals("", getDevice().executeShellCommand("diff -rq /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump")); // Remove timestamps at positions 6 and 7, because ls on device does not support --time-style // Remove totals because on disk block usage may change depending on filesystem - String ls_cmd = "ls -alLnR /data/local/tmp/efs_test/%s | awk {\'$6=\"\";$7=\"\";if ($1 != \"total\"){print $0'}"; + String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlLnR . | awk {'$6=\"\";$7=\"\";if ($1 != \"total\"){print $0}'}"; String mnt_ls = getDevice().executeShellCommand(String.format(ls_cmd, "mnt")); + assertEquals(getDevice().executeShellCommand("echo $?"), "0\n"); String dump_ls = getDevice().executeShellCommand(String.format(ls_cmd, "dump")); + assertEquals(getDevice().executeShellCommand("echo $?"), "0\n"); assertEquals(mnt_ls, dump_ls); - getDevice().executeShellCommand("umount -r /data/local/tmp/efs_test/mnt"); + + getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt"); getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*"); getDevice().executeShellCommand("rm /data/local/tmp/efs_test/" + name + ".img"); } @After public void tearDown() throws Exception { - getDevice().executeShellCommand("umount -r /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt"); getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test"); } } From 4caa08f2cc04a8a64574a7efaaf1dd8667dd1201 Mon Sep 17 00:00:00 2001 From: Dmitry Skiba Date: Fri, 28 Jun 2024 21:12:06 +0000 Subject: [PATCH 19/64] Reland "Restrict kcompactd thread to middle/little cores." This reverts commit 721a8358c65e1c884364ac2a8b3d8cca84a82c18. Reason for revert: 24Q3 has been cut, relanding the original commit ef68e9b578e27a07f57b5df1890cf949bbc20eec. Change-Id: I7882ebafd66d126df9ccbe2124617fbf4ed73eb5 Bug: 347272991 --- conf/init.zuma.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 3e0a2e76..e30abdab 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -735,6 +735,9 @@ on property:sys.boot_completed=1 # Set kswapd affinity write /sys/kernel/vendor_mm/kswapd_cpu_affinity ff + # Set kcompactd affinity + write /sys/kernel/vendor_mm/kcompactd_cpu_affinity ff + # Adjust watermark level write /proc/sys/vm/watermark_scale_factor 200 From 354b984c0d59d9bf1751b61189d8b7bf3eeb5580 Mon Sep 17 00:00:00 2001 From: Vilas Bhat Date: Mon, 1 Jul 2024 22:01:54 +0000 Subject: [PATCH 20/64] 16k: Move logic from device/google/shusky/BoardConfig-shusky-common.mk to zuma/BoardConfig-16k-common.mk The makefile logic in device/google/shusky/BoardConfig-shusky-common.mk is identical to the logic required for akita. Hence, this logic is moved to device/google/zuma/BoardConfig-16k-common.mk to avoid duplicating the file for akita. Bug: 349877551 Test: $ lunch shiba-trunk_staging-userdebug $ get_build_var TARGET_KERNEL_DIR_16K device/google/shusky-kernels/5.15/trunk-12022168/16kb $ get_build_var BOARD_KERNEL_PATH_16K device/google/shusky-kernels/5.15/trunk-12022168/16kb/Image.lz4 $ get_build_var BOARD_16K_OTA_USE_INCREMENTAL true $ get_build_var BOARD_16K_OTA_MOVE_VENDOR true Flag: EXEMPT bugfix Change-Id: Ibd060eae8f4e97ae8ff800f765e2310c984e5796 --- BoardConfig-16k-common.mk | 38 ++++++++++++++++++++++++++++++++++++++ BoardConfig-common.mk | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 BoardConfig-16k-common.mk diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk new file mode 100644 index 00000000..f7bee9d1 --- /dev/null +++ b/BoardConfig-16k-common.mk @@ -0,0 +1,38 @@ +# +# 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 + +else ifeq ($(PRODUCT_16K_DEVELOPER_OPTION),true) +# Configures the 16kb kernel and modules for OTA updates. +TARGET_KERNEL_DIR_16K := $(TARGET_KERNEL_DIR)/16kb +BOARD_KERNEL_PATH_16K := $(TARGET_KERNEL_DIR_16K)/Image.lz4 + +BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/vendor_kernel_boot.modules.load) +BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/system_dlkm.modules.load) +BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/vendor_dlkm.modules.load) +BOARD_KERNEL_MODULES_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(TARGET_KERNEL_DIR_16K)/$(notdir $(module))) +BOARD_PREBUILT_DTBOIMAGE_16KB := $(TARGET_KERNEL_DIR_16K)/dtbo.img + +# Zuma targets use exynos-bcm_dbg.ko module instead of bcm_dbg.ko. +BOARD_KERNEL_MODULES_16K := $(filter-out %/bcm_dbg.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(notdir $(module))) + +BOARD_16K_OTA_USE_INCREMENTAL := true +BOARD_16K_OTA_MOVE_VENDOR := true +endif diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 692d2c62..2ebd3197 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -16,6 +16,9 @@ include build/make/target/board/BoardConfigMainlineCommon.mk include build/make/target/board/BoardConfigPixelCommon.mk +# Include settings for 16k developer option, if enabled +include device/google/zuma/BoardConfig-16k-common.mk + # Should be uncommented after fixing vndk-sp violation is fixed. PRODUCT_FULL_TREBLE_OVERRIDE := true From a39d3b0832ef6b8f29eee1595c0acb7c175f1112 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Mon, 3 Jun 2024 12:57:45 +0000 Subject: [PATCH 21/64] init.zuma.rc: Apply sched tuning to improve sched latencies Bug: 340860065 Flag: NONE not supported for init.rc scripts Signed-off-by: Qais Yousef Change-Id: Iac58746eba35820bab69ef742a1078b93e9bbad8 --- conf/init.zuma.rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index f98001b3..13e835ab 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -770,6 +770,12 @@ on property:sys.boot_completed=1 write /dev/cpuset/camera-daemon/cpus 0-8 setprop vendor.powerhal.init 1 + # Setup scheduler parameters + write /proc/vendor_sched/min_granularity_ns 1000000 + write /proc/vendor_sched/latency_ns 8000000 + write /proc/vendor_sched/max_load_balance_interval 1 + write /proc/vendor_sched/enable_hrtick 1 + # Setup final cpu.uclamp write /proc/vendor_sched/groups/ta/uclamp_min 1 write /proc/vendor_sched/groups/fg/uclamp_min 0 From 569092bc54ca24da867d981918f97f8642253c66 Mon Sep 17 00:00:00 2001 From: Vishvam Mazumdar Date: Mon, 17 Jun 2024 20:54:55 +0000 Subject: [PATCH 22/64] Defaultly enable cpu idle histogram stats collection for dumpstate. This change is to allow the CPU Idle Histogram Stats to be dumped in bugreports so that there is more insight into the idle behavior of devices in the field. Test: Build/Flash Test: Collect histogram log Bug: 344908619 Flag: EXEMPT bugfix Change-Id: Ib6e4772737a8c1f22ac8ba31c40099baeab43853 Signed-off-by: Vishvam Mazumdar --- conf/init.zuma.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index f98001b3..c4ad2d7d 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -360,6 +360,9 @@ on init chown root system /sys/devices/platform/16490000.gsa-ns/log_main chown root system /sys/devices/platform/16490000.gsa-ns/log_intermediate + # Enable CPU Idle histograms + write /sys/kernel/metrics/cpuidle_histogram/enable 1 + on init && property:ro.boot.hardware.cpu.pagesize=4096 write /sys/block/zram0/comp_algorithm lz77eh From 5a0aedaec90f2fd016fc971c6026a1917a4131bb Mon Sep 17 00:00:00 2001 From: Vishvam Mazumdar Date: Tue, 4 Jun 2024 18:17:45 +0000 Subject: [PATCH 23/64] Add CPU Idle Histogram Stats to dumpstate board file. This change is to allow the CPU Idle Histogram Stats to be dumped in bugreports so that there is more insight into the idle behavior of devices in the field. Test: Build/Flash Test: adb bugreport Bug: 344908619 Flag: EXEMPT bugfix Change-Id: I9c31b4fbaf8adb35df27f4d19a7bf87ac33b05d3 Signed-off-by: Vishvam Mazumdar --- dumpstate/dump_power.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 5af853fc..6b755a0c 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -941,9 +941,21 @@ void dumpIrqDurationCounts() { } } +void dumpCpuIdleHistogramStats() { + const char* cpuIdleHistogramTitle = "CPU Idle Histogram"; + const char* cpuIdleHistogramFile = "/sys/kernel/metrics/cpuidle_histogram/" + "cpuidle_histogram"; + const char* cpuClusterHistogramTitle = "CPU Cluster Histogram"; + const char* cpuClusterHistogramFile = "/sys/kernel/metrics/" + "cpuidle_histogram/cpucluster_histogram"; + dumpFileContent(cpuIdleHistogramTitle, cpuIdleHistogramFile); + dumpFileContent(cpuClusterHistogramTitle, cpuClusterHistogramFile); +} + int main() { dumpPowerStatsTimes(); dumpAcpmStats(); + dumpCpuIdleHistogramStats(); dumpPowerSupplyStats(); dumpMaxFg(); dumpPowerSupplyDock(); From ca3e5096da56ee0254a980fa8b50159ef48b2b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kosi=C5=84ski?= Date: Wed, 10 Jul 2024 22:12:30 +0000 Subject: [PATCH 24/64] Delete PDX sockets for legacy VR services. Remove irrelevant copy and paste content. None of the zuma devices ever included these services and these sockets are not doing anything. Bug: 234559097 Test: presubmit Flag: EXEMPT dead code removal Change-Id: I8664262708b89016227d7df076e7c8d70a53de07 --- conf/init.zuma.rc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index e30abdab..9bd86bd0 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -138,16 +138,6 @@ on init write /sys/class/net/rmnet6/queues/rx-0/rps_cpus fe write /sys/class/net/rmnet7/queues/rx-0/rps_cpus fe - # Create UDS structure for base VR services. - mkdir /dev/socket/pdx 0775 system system - mkdir /dev/socket/pdx/system 0775 system system - mkdir /dev/socket/pdx/system/buffer_hub 0775 system system - mkdir /dev/socket/pdx/system/performance 0775 system system - mkdir /dev/socket/pdx/system/vr 0775 system system - mkdir /dev/socket/pdx/system/vr/display 0775 system system - mkdir /dev/socket/pdx/system/vr/pose 0775 system system - mkdir /dev/socket/pdx/system/vr/sensors 0775 system system - # Boot time 183626384 write /proc/vendor_sched/groups/ta/uclamp_min 221 write /proc/vendor_sched/groups/ta/prefer_idle 1 From 86d54846b639c4223ed82fbc1a33af11a90448ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Wagner?= Date: Wed, 10 Jul 2024 13:22:49 +0000 Subject: [PATCH 25/64] Increase the max core index for protected TLS allocations to 4 Pixel has removed unnecessary allocation padding, and we now pass dEQP with a maximum physical core index setting of 4, which allows the driver to utilize 2 GPU cores (1001b) in the extreme tests. Bug: 221255664 Test: HK3 atest CtsDeqpTestCases -- --module-arg 'CtsDeqpTestCases:include-filter:dEQP-VK.protected_memory.*' Flag: EXEMPT bugfix Change-Id: I96a38a6070968100ce3adf01da7235a807bf31ab --- device.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/device.mk b/device.mk index de9d31c1..9fd8cc89 100644 --- a/device.mk +++ b/device.mk @@ -289,11 +289,10 @@ PRODUCT_VENDOR_PROPERTIES += \ endif # Mali Configuration Properties -# b/221255664 prevents setting PROTECTED_MAX_CORE_COUNT=2 PRODUCT_VENDOR_PROPERTIES += \ vendor.mali.platform.config=/vendor/etc/mali/platform.config \ vendor.mali.debug.config=/vendor/etc/mali/debug.config \ - vendor.mali.base_protected_max_core_count=1 \ + vendor.mali.base_protected_max_core_count=4 \ vendor.mali.base_protected_tls_max=67108864 \ vendor.mali.platform_agt_frequency_khz=24576 From f4be9acaabc8904bab799528e535f68c9ca0c079 Mon Sep 17 00:00:00 2001 From: Herbert Xue Date: Mon, 15 Jul 2024 15:57:36 +0800 Subject: [PATCH 26/64] Add soong config variable for PowerAnomalySitril Set the variable is true when USE_LASSEN_OEMHOOK is true and BOARD_WITHOUT_RADIO is not true. Flag: EXEMPT bugfix Bug: 325857852 Test: lunch akita-trunk_staging-userdebug && m ConnectivityMonitor Change-Id: I44df84ade1c8394a562b523264d5f3f08cb5b5b3 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 63617d8b..31caf878 100644 --- a/device.mk +++ b/device.mk @@ -230,6 +230,7 @@ USE_LASSEN_OEMHOOK := true # The "power-anomaly-sitril" is added into PRODUCT_SOONG_NAMESPACES when # $(USE_LASSEN_OEMHOOK) is true and $(BOARD_WITHOUT_RADIO) is not true. ifneq ($(BOARD_WITHOUT_RADIO),true) + $(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true) PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril endif From c97e120d74723d60f7635b5d04fae6611b6c59dc Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 17 Jul 2024 16:00:38 +0000 Subject: [PATCH 27/64] copy_efs_files_to_data.sh: handle symlinks Temporary fix, until dump.f2fs is fixed to handle these as well. Bug: 352567354 Change-Id: I3fd1815cfca6438a61a26f8afaada77b771e871c Flag: BUGFIX Test: husky:/ # getconf PAGE_SIZE 16384 husky:/ # ls -l /mnt/vendor/persist/ss/ total 3044 lrwxrwxrwx 1 system system 55 2024-07-17 15:12 0 -> /dev/block/platform/13200000.ufs/by-name/trusty_persist -rwxrwxrwx 1 system system 55 2024-07-17 15:12 0_backup -rw-r-x--- 1 system system 3106816 2024-07-17 15:12 nsp --- copy_efs_files_to_data.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh index 2ac9e462..96c3a386 100644 --- a/copy_efs_files_to_data.sh +++ b/copy_efs_files_to_data.sh @@ -2,7 +2,7 @@ CHECKPOINT_DIR=/data/vendor/copied -BIN_DIR=/vendor/bin +export BIN_DIR=/vendor/bin $BIN_DIR/mkdir -p $CHECKPOINT_DIR @@ -21,12 +21,12 @@ function copy_files_to_data() echo "Failed to $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device" return fi - mv $tmpdir $build_checkpoint + $BIN_DIR/mv $tmpdir $build_checkpoint if [ $? -ne 0 ]; then echo "mv $tmpdir $build_checkpoint" return fi - fsync `dirname $build_checkpoint` + $BIN_DIR/fsync `dirname $build_checkpoint` fi echo "Successfully copied $mount_point to $build_checkpoint" } @@ -36,3 +36,10 @@ copy_files_to_data "/dev/block/by-name/efs_backup" "/mnt/vendor/efs_backup" copy_files_to_data "/dev/block/by-name/modem_userdata" "/mnt/vendor/modem_userdata" copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist" + +# TODO(b/352567354): fixup symlinks until dump.f2fs is fixed +a=$($BIN_DIR/cat /data/vendor/copied/persist/ss/0) +$BIN_DIR/mv /data/vendor/copied/persist/ss/0 /data/vendor/copied/persist/ss/0_backup +$BIN_DIR/ln -s $a /data/vendor/copied/persist/ss/0 + +$BIN_DIR/fsync /data/vendor/copied From 8bb0da99a978bd6c56ba52f4f630a43356a273ae Mon Sep 17 00:00:00 2001 From: Pawan Wagh Date: Thu, 18 Jul 2024 04:46:43 +0000 Subject: [PATCH 28/64] Disable incremental boot_otas Boot otas for 16kb developer option are failing on builds signed with release keys are failing due verification issues. Turning off the incremental otas Test: atest Enable16KbTest Bug: 339658378 Change-Id: Idfc3efc796b599de66ddc52cbee37ca3d74d11b6 --- BoardConfig-16k-common.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk index f7bee9d1..0571d7a5 100644 --- a/BoardConfig-16k-common.mk +++ b/BoardConfig-16k-common.mk @@ -33,6 +33,5 @@ BOARD_PREBUILT_DTBOIMAGE_16KB := $(TARGET_KERNEL_DIR_16K)/dtbo.img BOARD_KERNEL_MODULES_16K := $(filter-out %/bcm_dbg.ko,$(BOARD_KERNEL_MODULES_16K)) BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(notdir $(module))) -BOARD_16K_OTA_USE_INCREMENTAL := true BOARD_16K_OTA_MOVE_VENDOR := true endif From 70087f4c9e48369d553c1bb9b7d4cdf84c669464 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Fri, 19 Jul 2024 01:06:09 +0000 Subject: [PATCH 29/64] Revert "Enable usb state update via udc sysfs" Revert submission 27445245-339241080 Reason for revert: break husky-next-user (linux) build 12111903 Reverted changes: /q/submissionid:27445245-339241080 Bug: 339241080 Change-Id: I95e08c1959b64551a1c15963c13d7c4cdb7bce46 --- overlay/frameworks/base/core/res/res/values/config.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 301b15d4..a3f0420f 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -318,7 +318,4 @@ 100% - - - true From 77b55efb0f718c253b79de80cdf967e71c4c0a02 Mon Sep 17 00:00:00 2001 From: Robert Luo Date: Fri, 19 Jul 2024 10:00:20 +0800 Subject: [PATCH 30/64] [Pixel RR] Apply reviewed default permissions Pregrantting below permissions: READ_CONTACTS WRITE_CONTACTS READ_CALL_LOG Flag: EXEMPT add pregranted permission in b/337725984, b/337802920 Bug: 337725984, 337802920 Test: presubmit Change-Id: Ie9d3558991557dff92f38cf37b0c7b43d822afb5 --- default-permissions.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/default-permissions.xml b/default-permissions.xml index 00959c8f..58dd84cb 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -167,5 +167,12 @@ + + + + + + + From 7e6d2aa3259b9ea36d13e4491036498f80fba8ae Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 9 Jul 2024 00:01:01 +0000 Subject: [PATCH 31/64] DisplayPort: add DisplayPort Max Resolution and FEC/DSC stats paths for zuma devices Bug: 343602691 Flag: EXEMPT bugfix Test: Built Android Change-Id: Ia0882aa8a3750e4f3bf96c3f94f843b18356f046 --- pixelstats/service.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index eaac5207..e5cd5814 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -123,6 +123,23 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = { "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/sink_count_invalid_failures", "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/link_unstable_failures", }, + .DisplayPortDSCStatsPaths = { + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/fec_dsc_supported", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/fec_dsc_not_supported", + }, + .DisplayPortMaxResolutionStatsPaths = { + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_other", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1366_768", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1440_900", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1600_900", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1920_1080", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_2560_1080", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_2560_1440", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_3440_1440", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_3840_2160", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_5120_2880", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_7680_4320", + }, .HDCPStatsPaths = { "/sys/devices/platform/hdcp/hdcp2_success_count", "/sys/devices/platform/hdcp/hdcp2_fallback_count", From e18057e16e4d20c421f08426eb28a8d6b667534c Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Mon, 3 Jun 2024 12:59:39 +0000 Subject: [PATCH 32/64] BoardConfig-common.mk: Enable Lazy RCU Bug: 340860065 Flag: EXEMPT this is a boot time parameter Signed-off-by: Qais Yousef Change-Id: I1d45f155db9537ff176c50d36bf9c4ccb00317a5 --- BoardConfig-common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 2ebd3197..abc4803a 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -38,7 +38,7 @@ TARGET_CPU_VARIANT_RUNTIME := cortex-a55 BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10870000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y BOARD_KERNEL_CMDLINE += cgroup_disable=memory -BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all +BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all rcutree.enable_rcu_lazy BOARD_KERNEL_CMDLINE += swiotlb=1024 BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4 From 26f76a3da4859e64034118157df16e6bac1c1e06 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Wed, 31 Jul 2024 00:39:08 +0000 Subject: [PATCH 33/64] init.zuma.rc: Disable teo util awareness completely Bug: 355085234 Flag: EXEMPT boot time init script configuration Signed-off-by: Qais Yousef Change-Id: Id5e92a6bc7d949b89f657364ca392287430255b5 --- conf/init.zuma.rc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 38c82829..9395c7c9 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -12,8 +12,7 @@ on init # Set teo as cpu idle governor write /sys/devices/system/cpu/cpuidle/current_governor teo - # Disable util-awareness for mids and bigs - write /proc/vendor_sched/teo_util_threshold "2 1024 1024" + write /proc/vendor_sched/teo_util_threshold "1024 1024 1024" # Boot time fs tuning write /sys/block/sda/queue/scheduler bfq From 22eeae1c3a53d37d301ebb4fd64e190b33f5b6af Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 18 Jul 2024 09:15:04 +0000 Subject: [PATCH 34/64] Upgrade IDisplay to V13 Bug: 315496839 Flag: EXEMPT bugfix Test: build pass Change-Id: I960990b161b82e497d5e1f3b891d6cde09384d87 --- device_framework_matrix_product.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 895ce99b..ead4cd93 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -114,7 +114,7 @@ com.google.hardware.pixel.display - 12 + 13 IDisplay default From 8cd5a64cd7aa45682b749e008e75eb66801b0890 Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Fri, 2 Aug 2024 09:14:34 +0000 Subject: [PATCH 35/64] 16k: Ignore 16k kernel settings if 16kb folder doesn't exist to avoid build breakage with test kernel prebuilts (e.g. ag/28525733) that doesn't have 16kb artifacts in it. Bug: 349877551 Flag: EXEMPT bugfix Change-Id: I2f6c1f3365f624502366b883dbcd1066ed166cdb --- BoardConfig-16k-common.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk index 0571d7a5..4b9c64ab 100644 --- a/BoardConfig-16k-common.mk +++ b/BoardConfig-16k-common.mk @@ -14,6 +14,8 @@ # limitations under the License. # +ifneq ($(wildcard $(TARGET_KERNEL_DIR)/16kb/),) + ifeq ($(TARGET_BOOTS_16K),true) # Configures the 16kb kernel directory. TARGET_KERNEL_DIR := $(TARGET_KERNEL_DIR)/16kb @@ -35,3 +37,5 @@ BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$( BOARD_16K_OTA_MOVE_VENDOR := true endif + +endif From 48b994ba165838840d42b5fef44f9f730ccdee88 Mon Sep 17 00:00:00 2001 From: Kyle Tso Date: Mon, 5 Aug 2024 18:41:26 +0800 Subject: [PATCH 36/64] dumpstate: Modify dumpTcpc path and content Ported from I248fb250b94cbd4078e7f3c44da83f62002b53fb with some modifications. Bug: 357537483 Test: checked the content in dumpstate Flag: EXEMPT bugfix Change-Id: I06ce369b90d8ba0ff2ee31723890001c37db9227 Signed-off-by: Kyle Tso --- dumpstate/dump_power.cpp | 66 ++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 6b755a0c..0cbbf72d 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -260,53 +260,47 @@ void dumpLogBufferTcpm() { } void dumpTcpc() { - int ret; - const char* max77759TcpcHead = "TCPC"; - const char* i2cSubDirMatch = "i2c-"; - const char* directory = "/sys/devices/platform/10d60000.hsi2c/"; - const char* max77759Tcpc [][2] { - {"registers:", "/i2c-max77759tcpc/registers"}, - {"frs:", "/i2c-max77759tcpc/frs"}, - {"auto_discharge:", "/i2c-max77759tcpc/auto_discharge"}, - {"bcl2_enabled:", "/i2c-max77759tcpc/bcl2_enabled"}, - {"cc_toggle_enable:", "/i2c-max77759tcpc/cc_toggle_enable"}, - {"containment_detection:", "/i2c-max77759tcpc/containment_detection"}, - {"containment_detection_status:", "/i2c-max77759tcpc/containment_detection_status"}, + const char* max77759TcpcHead = "TCPC Device Attributes"; + const char* directory = "/sys/class/typec/port0/device"; + const char* max77759Tcpc [] { + "auto_discharge", + "bc12_enabled", + "cc_toggle_enable", + "contaminant_detection", + "contaminant_detection_status", + "frs", + "irq_hpd_count", + "non_compliant_reasons", + "sbu_pullup", + "update_sdp_enum_timeout", + "usb_limit_accessory_current", + "usb_limit_accessory_enable", + "usb_limit_sink_current", + "usb_limit_sink_enable", + "usb_limit_source_enable", }; - std::vector files; std::string content; + std::string tcpcRegistersPath(std::string(directory) + "/registers"); + + dumpFileContent("TCPC Registers", tcpcRegistersPath.c_str()); printTitle(max77759TcpcHead); - ret = getFilesInDir(directory, &files); - if (ret < 0) { - for (auto &tcpcVal : max77759Tcpc) - printf("%s\n", tcpcVal[0]); - return; - } - - for (auto &file : files) { - for (auto &tcpcVal : max77759Tcpc) { - printf("%s ", tcpcVal[0]); - if (std::string::npos == std::string(file).find(i2cSubDirMatch)) { - continue; - } - - std::string fileName = directory + file + "/" + std::string(tcpcVal[1]); - - if (!android::base::ReadFileToString(fileName, &content)) { - continue; - } - - printf("%s\n", content.c_str()); - } + for (auto& tcpcVal : max77759Tcpc) { + std::string filename = std::string(directory) + "/" + std::string(tcpcVal); + printf("%s: ", tcpcVal); + android::base::ReadFileToString(filename, &content); + if (!content.empty() && (content.back() == '\n' || content.back() == '\r')) + content.pop_back(); + printf("%s\n", content.c_str()); } + printf("\n"); } void dumpPdEngine() { const char* pdEngine [][2] { - {"PD Engine", "/dev/logbuffer_usbpd"}, + {"Logbuffer TCPC", "/dev/logbuffer_usbpd"}, {"PPS-google_cpm", "/dev/logbuffer_cpm"}, {"PPS-dc", "/dev/logbuffer_pca9468"}, }; From 5c12ee203985b43228c1cc62e29a4344122ab87d Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Mon, 5 Aug 2024 13:04:56 +0000 Subject: [PATCH 37/64] Revert "init.zuma.rc: Disable teo util awareness completely" Revert submission 28549770-disable-teo-util-threshold Reason for revert: Causes increase in Late Present frames Reverted changes: /q/submissionid:28549770-disable-teo-util-threshold Bug: 356992601 Bug: 356967550 Signed-off-by: Qais Yousef Change-Id: I0aaca9b1369ffeb08a06e987001a336577223650 --- conf/init.zuma.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 9395c7c9..38c82829 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -12,7 +12,8 @@ on init # Set teo as cpu idle governor write /sys/devices/system/cpu/cpuidle/current_governor teo - write /proc/vendor_sched/teo_util_threshold "1024 1024 1024" + # Disable util-awareness for mids and bigs + write /proc/vendor_sched/teo_util_threshold "2 1024 1024" # Boot time fs tuning write /sys/block/sda/queue/scheduler bfq From dd57f0973df6f900b54977f95651496a16d4e1a1 Mon Sep 17 00:00:00 2001 From: samou Date: Tue, 6 Aug 2024 02:38:18 +0000 Subject: [PATCH 38/64] Remove BCL from thermal Flag: EXEMPT tuning changes Bug: 349935208 Change-Id: Ib14b34e8185bdbb71c84a4de4ac104282af71d3c Signed-off-by: samou --- conf/init.zuma.rc | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index f98001b3..e5126806 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -985,33 +985,6 @@ on property:vendor.thermal.link_ready=1 write /sys/devices/virtual/pmic/mitigation/clock_div/cpu2_clk_div 0x1 write /sys/devices/platform/cpupm/cpupm/cpd_cl1 1 #Enable power down write /sys/devices/platform/cpupm/cpupm/cpd_cl2 1 #Enable power down - chown system system /dev/thermal/tz-by-name/soc/mode - chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soc/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soc/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_hyst # Thermal chown system system /dev/thermal/tz-by-name/soc_therm/trip_point_0_temp chown system system /dev/thermal/tz-by-name/soc_therm/trip_point_0_hyst From 5126f46c8a10784bd262422400007385dfc75576 Mon Sep 17 00:00:00 2001 From: Herbert Xue Date: Thu, 8 Aug 2024 15:49:52 +0800 Subject: [PATCH 39/64] Control the build path of mali_csffw.bin Flag: EXEMPT bugfix Bug: 357770476 Test: 1. lunch akita-trunk_staging-eng 2. m csffw_image_prebuilt__firmware_prebuilt_ttux_mali_csffw.bin Change-Id: I80d2820f24dadf09ada1e090e9588bd8a0e7c453 --- device.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device.mk b/device.mk index 305db863..38083308 100644 --- a/device.mk +++ b/device.mk @@ -259,8 +259,13 @@ USE_SWIFTSHADER := false # HWUI TARGET_USES_VULKAN = true +ifeq (,$(realpath $(TOPDIR)vendor/arm/mali/valhall/Android.bp)) +PRODUCT_SOONG_NAMESPACES += \ + vendor/google_devices/zuma/prebuilts/firmware/gpu +else PRODUCT_SOONG_NAMESPACES += \ vendor/arm/mali/valhall +endif $(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM)) $(call soong_config_set,arm_gralloc,soc,$(TARGET_BOARD_PLATFORM)) From 13756199db371c79ddce88ec860c4dc7d5caff25 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Thu, 8 Aug 2024 21:39:02 +0000 Subject: [PATCH 40/64] Revert^2 "Enable usb state update via udc sysfs" This reverts commit 70087f4c9e48369d553c1bb9b7d4cdf84c669464. Reason for revert: fix breakage in next build with build-time flag in selinux policy. Bug: 339241080 Test: tested on Shiba trunk_staging and next builds Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update Change-Id: Ifb7764be792494810388858b8672ac7793ed0d42 --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index cbe1b6f3..5a009fe3 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -325,4 +325,7 @@ 33% + + + true From e06a2b30e256e857c0901d38b7f0857970ea14ac Mon Sep 17 00:00:00 2001 From: Spade Lee Date: Tue, 30 Jul 2024 09:19:14 +0000 Subject: [PATCH 41/64] dump_power: zuma: add FG dump registers path Bug: 355756379 Test: adb bugreport verify ok Flag: EXEMPT bugfix Change-Id: I653a2d0bebe340a16917c30fa2c883f250456aa3 Signed-off-by: Spade Lee --- dumpstate/dump_power.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 0cbbf72d..1bb47279 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -198,6 +198,7 @@ void dumpMaxFg() { const char *maxfg [][2] = { {"Power supply property maxfg", "/sys/class/power_supply/maxfg/uevent"}, + {"maxfg registers", "/sys/class/power_supply/maxfg/registers_dump"}, {"m5_state", "/sys/class/power_supply/maxfg/m5_model_state"}, {"maxfg logbuffer", "/dev/logbuffer_maxfg"}, {"maxfg_monitor logbuffer", "/dev/logbuffer_maxfg_monitor"}, @@ -206,6 +207,8 @@ void dumpMaxFg() { const char *maxfgFlip [][2] = { {"Power supply property maxfg_base", "/sys/class/power_supply/maxfg_base/uevent"}, {"Power supply property maxfg_flip", "/sys/class/power_supply/maxfg_flip/uevent"}, + {"maxfg_base registers", "/sys/class/power_supply/maxfg_base/registers_dump"}, + {"maxfg_secondary registers", "/sys/class/power_supply/maxfg_secondary/registers_dump"}, {"m5_state", "/sys/class/power_supply/maxfg_base/m5_model_state"}, {"maxfg_base", "/dev/logbuffer_maxfg_base"}, {"maxfg_flip", "/dev/logbuffer_maxfg_flip"}, From 3725da4142438ec09e19a8d47cf15fb6634b23c8 Mon Sep 17 00:00:00 2001 From: Herbert Xue Date: Tue, 13 Aug 2024 11:27:21 +0800 Subject: [PATCH 42/64] Control the modules built from vendor/google_devices/zuma/prebuilts/gpu For PDK build, the "vendor/arm" path doesn't exist. The modules will be built from vendor/google_devices/zuma/prebuilts/gpu. Flag: EXEMPT bugfix Bug: 357770476 Test: 1. lunch akita-trunk_staging-eng 2. m libGLES_mali vulkan.mali libOpenCL libgpudataproducer Change-Id: I97631ffdc98b77b747f0abbc7e376d8fbe2a576d --- device.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 38083308..d10f2692 100644 --- a/device.mk +++ b/device.mk @@ -259,9 +259,11 @@ USE_SWIFTSHADER := false # HWUI TARGET_USES_VULKAN = true +# "vendor/arm" doesn't exist in PDK build ifeq (,$(realpath $(TOPDIR)vendor/arm/mali/valhall/Android.bp)) PRODUCT_SOONG_NAMESPACES += \ - vendor/google_devices/zuma/prebuilts/firmware/gpu + vendor/google_devices/zuma/prebuilts/firmware/gpu \ + vendor/google_devices/zuma/prebuilts/gpu else PRODUCT_SOONG_NAMESPACES += \ vendor/arm/mali/valhall From 07a17f736e75476d49eda582d284b3a7f5119daa Mon Sep 17 00:00:00 2001 From: samou Date: Fri, 12 Jul 2024 08:12:28 +0000 Subject: [PATCH 43/64] bcl: support thismeal binary Test: ./dump_power Flag: EXEMPT refactor Bug: 349935208 Change-Id: I74f565133d39ece19b29a036d7b236a754b422d3 Signed-off-by: samou --- dumpstate/Android.bp | 1 + dumpstate/dump_power.cpp | 19 +++++++++++++++++++ dumpstate/dump_power.rc | 3 +++ 3 files changed, 23 insertions(+) create mode 100644 dumpstate/dump_power.rc diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp index 8960ac43..71cc1d2c 100644 --- a/dumpstate/Android.bp +++ b/dumpstate/Android.bp @@ -24,6 +24,7 @@ cc_binary { ], vendor: true, relative_install_path: "dump", + init_rc: ["dump_power.rc"], } sh_binary { diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 5af853fc..c736e5fb 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -21,7 +21,9 @@ #include #include #include +#include #include +#include #include #include @@ -632,10 +634,27 @@ void dumpGvoteables() { void dumpMitigation() { const char *mitigationList [][2] { + {"LastmealCSV" , "/data/vendor/mitigation/lastmeal.csv"}, {"Lastmeal" , "/data/vendor/mitigation/lastmeal.txt"}, {"Thismeal" , "/data/vendor/mitigation/thismeal.txt"}, }; + /* parsing thismeal.bin */ + int status; + int pid = fork(); + if (pid < 0) { + printf("Fork failed for parsing thismeal.bin.\n"); + exit(EXIT_FAILURE); + } else if (pid == 0) { + execl("/vendor/bin/hw/battery_mitigation", "battery_mitigation", "-d", nullptr); + exit(EXIT_SUCCESS); + } + waitpid(pid, &status, 0); + + if (WIFSIGNALED(status)) { + printf("Failed to parse thismeal.bin.(killed by: %d)\n", WTERMSIG(status)); + } + for (auto &row : mitigationList) { if (!isValidFile(row[1])) printTitle(row[0]); diff --git a/dumpstate/dump_power.rc b/dumpstate/dump_power.rc new file mode 100644 index 00000000..ec2aead9 --- /dev/null +++ b/dumpstate/dump_power.rc @@ -0,0 +1,3 @@ +on init + # for parsing thismeal.bin + chown system system /vendor/bin/hw/battery_mitigation From 9da8594109c205ffed3be2b853f653d79bb9f181 Mon Sep 17 00:00:00 2001 From: samou Date: Mon, 12 Aug 2024 12:47:16 +0000 Subject: [PATCH 44/64] bcl: correct ocp threshold Flag: EXEMPT refactor Bug: 349935208 Change-Id: I2922ca198d6a47f613ecc2c9902256112457fe31 Signed-off-by: samou --- conf/init.zuma.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index e5126806..e59092a6 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -980,6 +980,9 @@ on property:vendor.thermal.link_ready=1 write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_cpu2_lvl 12000 write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_gpu_lvl 9000 write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_tpu_lvl 8500 + write /sys/devices/virtual/pmic/mitigation/triggered_lvl/ocp_cpu2_lvl 12000 + write /sys/devices/virtual/pmic/mitigation/triggered_lvl/ocp_gpu_lvl 12000 + write /sys/devices/virtual/pmic/mitigation/triggered_lvl/ocp_tpu_lvl 12000 write /sys/devices/virtual/pmic/mitigation/clock_div/tpu_clk_div 0x1 write /sys/devices/virtual/pmic/mitigation/clock_div/gpu_clk_div 0x1 write /sys/devices/virtual/pmic/mitigation/clock_div/cpu2_clk_div 0x1 From 89957321186bf1286d01552f2cda950a95781499 Mon Sep 17 00:00:00 2001 From: Ji Soo Shin Date: Fri, 16 Aug 2024 09:39:32 +0000 Subject: [PATCH 45/64] persist.sys.hdcp_checking: make default drm-only In case of always, we always enable hdcp regardless of drm status. Bug: 359951297 Flag: EXEMPT bugfix Change-Id: I04b5174be296d93a9f898929706785d50116d7a7 Signed-off-by: Ji Soo Shin --- conf/init.zuma.usb.rc | 2 +- device.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/init.zuma.usb.rc b/conf/init.zuma.usb.rc index 88e187be..d89601bb 100644 --- a/conf/init.zuma.usb.rc +++ b/conf/init.zuma.usb.rc @@ -425,7 +425,7 @@ on property:persist.vendor.usb.displayport.enabled=0 write /sys/class/typec/port0/port0.0/mode1/active "no" on property:persist.sys.hdcp_checking=always - write /sys/module/exynos_hdcp2/parameters/max_ver 2 + write /sys/module/exynos_hdcp2/parameters/max_ver 3 on property:persist.sys.hdcp_checking="drm-only" write /sys/module/exynos_hdcp2/parameters/max_ver 2 diff --git a/device.mk b/device.mk index 305db863..709a8e69 100644 --- a/device.mk +++ b/device.mk @@ -224,7 +224,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ endif PRODUCT_PROPERTY_OVERRIDES += \ - persist.sys.hdcp_checking=always + persist.sys.hdcp_checking=drm-only USE_LASSEN_OEMHOOK := true # The "power-anomaly-sitril" is added into PRODUCT_SOONG_NAMESPACES when From a9271c85edfa1abe11afa58739b1bc59da808d7d Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Mon, 15 Jul 2024 18:14:18 -0700 Subject: [PATCH 46/64] Add -L to copy_efs_files_to_data.sh This flag preserves symlinks on the copied images. With support for this flag, we no longer need to fix up symlinks after the fact. Bug: 352567354 Test: atest EfsCopyEfsTest Flag: EXEMPT bug fix Change-Id: If26e38856672f6a4b6c55b7921b3aa6268ca9964 --- copy_efs_files_to_data.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh index 96c3a386..9d293aef 100644 --- a/copy_efs_files_to_data.sh +++ b/copy_efs_files_to_data.sh @@ -16,9 +16,9 @@ function copy_files_to_data() if [ ! -e $build_checkpoint ]; then $BIN_DIR/rm -rf $tmpdir $BIN_DIR/mkdir -p $tmpdir - $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device + $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device if [ $? -ne 0 ]; then - echo "Failed to $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device" + echo "Failed to $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device" return fi $BIN_DIR/mv $tmpdir $build_checkpoint @@ -37,9 +37,4 @@ copy_files_to_data "/dev/block/by-name/modem_userdata" "/mnt/vendor/modem_userda copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist" -# TODO(b/352567354): fixup symlinks until dump.f2fs is fixed -a=$($BIN_DIR/cat /data/vendor/copied/persist/ss/0) -$BIN_DIR/mv /data/vendor/copied/persist/ss/0 /data/vendor/copied/persist/ss/0_backup -$BIN_DIR/ln -s $a /data/vendor/copied/persist/ss/0 - $BIN_DIR/fsync /data/vendor/copied From 507675bc2c7738f067b5b410cfeb5c7c9ad1dade Mon Sep 17 00:00:00 2001 From: Ankit Goyal Date: Wed, 28 Aug 2024 22:56:25 -0700 Subject: [PATCH 47/64] Delete mapper4 manifest Bug: 362183626 Flag: EXEMPT manifest update Test: Boot to home on shiba Change-Id: Ibb66f97523545a2228c443aa8a08d1d853ed0ccd --- manifest.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/manifest.xml b/manifest.xml index 69a1bcdd..5728c90b 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,4 @@ - - android.hardware.graphics.mapper - passthrough - 4.0 - - IMapper - default - - android.hardware.boot IBootControl/default From fd92ecb65c5315b331e27b447fa48cab17266f8c Mon Sep 17 00:00:00 2001 From: David Li Date: Thu, 29 Aug 2024 11:06:25 +0000 Subject: [PATCH 48/64] audio: set util_clamp_min for s/w spatializer to avoid glitches - power measurement result is on b/262803152#comment5 Bug: 355912013 Test: spatial audio Flag: EXEMPT bugfix Change-Id: I324288f219b2fecbc0ae4f3ce3c11ea6e93f4b2e --- device.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device.mk b/device.mk index 2e3f7712..280e0fd8 100644 --- a/device.mk +++ b/device.mk @@ -578,6 +578,9 @@ PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2 PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2 PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000 +# Set util_clamp_min for s/w spatializer +PRODUCT_PROPERTY_OVERRIDES += audio.spatializer.effect.util_clamp_min=300 + # Calliope firmware overwrite #PRODUCT_COPY_FILES += \ device/google/zuma/firmware/calliope_dram.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_dram.bin \ From e739e3b25408b6ea1823321ef1efc54cd9427a25 Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Thu, 29 Aug 2024 14:32:33 +0000 Subject: [PATCH 49/64] Restore preferred_idle_mask to the default setting The preferred_idle_mask is changed during boot time, but it does not restore to the default setitng as in powerhint, so some node may keep the wrong value when framework restarts. Bug: 248621289 Test: build pass Flag: NONE init rc file change does not support flags Change-Id: I892b99b79ff2dd9c02cc874026b43b06bded6f59 --- conf/init.zuma.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 8bc0b76d..a5005e94 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -742,9 +742,9 @@ on property:sys.boot_completed=1 write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/cancel_boot_freq 1 # Restore prefer idle - write /proc/vendor_sched/groups/ta/preferred_idle_mask_low 0x1ff - write /proc/vendor_sched/groups/ta/preferred_idle_mask_mid 0x1ff - write /proc/vendor_sched/groups/ta/preferred_idle_mask_high 0x1ff + write /proc/vendor_sched/groups/ta/preferred_idle_mask_low 0xff + write /proc/vendor_sched/groups/ta/preferred_idle_mask_mid 0xff + write /proc/vendor_sched/groups/ta/preferred_idle_mask_high 0xff write /proc/vendor_sched/groups/fg/preferred_idle_mask_low 0x1ff write /proc/vendor_sched/groups/fg/preferred_idle_mask_mid 0x1ff write /proc/vendor_sched/groups/fg/preferred_idle_mask_high 0x1ff From 7d3cb7808cdb3ce8caac7d583626396fc809bcbe Mon Sep 17 00:00:00 2001 From: Herbert Xue Date: Tue, 27 Aug 2024 19:06:28 +0800 Subject: [PATCH 50/64] Control GoogleDialer built from zuma/proprietary/GoogleDialer For PDK build, the "vendor/unbundled_google" path doesn't exist. "GoogleDialer" will be built from vendor/google_devices/zuma/proprietary/GoogleDialer. Flag: EXEMPT bugfix Bug: 358012156 Test: export USES_GOOGLE_DIALER_CARRIER_SETTINGS=true; m GoogleDialer Change-Id: If2aab058f23cebc5a25862c69deda508f5f9c37e --- device.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device.mk b/device.mk index 2e3f7712..a5b161c4 100644 --- a/device.mk +++ b/device.mk @@ -241,6 +241,8 @@ $(call soong_config_set, vendor_ril_google_feature, use_lassen_modem, true) ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true) USE_GOOGLE_DIALER := true USE_GOOGLE_CARRIER_SETTINGS := true +# GoogleDialer in PDK build with "USES_GOOGLE_DIALER_CARRIER_SETTINGS=true" +PRODUCT_SOONG_NAMESPACES += vendor/google_devices/zuma/proprietary/GoogleDialer endif ifeq ($(USES_GOOGLE_PREBUILT_MODEM_SVC),true) From 75edad5f451a33015483bafd747fa9f12cc327dc Mon Sep 17 00:00:00 2001 From: kellyhung Date: Fri, 23 Aug 2024 13:07:30 +0800 Subject: [PATCH 51/64] Add soong config use_google_qns in device/google/zuma/device.mk Bug: 360757079 Test: lunch r11-trunk_staging-userdebug; m grilservice Flag: EXEMPT bugfix Change-Id: Id783f65e12bc93d7db308d15b8440e6ea5007906 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 2e3f7712..71a9da30 100644 --- a/device.mk +++ b/device.mk @@ -232,6 +232,7 @@ USE_LASSEN_OEMHOOK := true ifneq ($(BOARD_WITHOUT_RADIO),true) $(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true) PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril + $(call soong_config_set,grilservice,use_google_qns,true) endif # Use for GRIL From 6aabc9bd28d12250d38cdc2ee6d7695d34a659a5 Mon Sep 17 00:00:00 2001 From: Herbert Xue Date: Mon, 19 Aug 2024 16:19:20 +0800 Subject: [PATCH 52/64] Control the "init_dpm.sh" to be built in zuma devices Flag: EXEMPT bugfix Bug: 360757643 Test: lunch husky-trunk_staging-eng && m init_dpm.sh Change-Id: Ie9822ca65d875c120bc38707aee54353aac5a8b5 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 71a9da30..c8fb9766 100644 --- a/device.mk +++ b/device.mk @@ -80,6 +80,7 @@ PRODUCT_SOONG_NAMESPACES += \ device/google/zuma \ device/google/zuma/powerstats \ vendor/google_devices/common/chre/host/hal \ + vendor/google_devices/zuma/proprietary/debugpolicy \ vendor/google/whitechapel/tools \ vendor/google/interfaces \ vendor/google_nos/host/android \ From 20b924373fa7ed0540e8a5a48d27ed6495b44a4e Mon Sep 17 00:00:00 2001 From: Charlie Yang Date: Wed, 4 Sep 2024 11:02:52 +0000 Subject: [PATCH 53/64] Revert "Add soong config use_google_qns in device/google/zuma/de..." Revert submission 28947244-grilservice Reason for revert: b/363911795 Reverted changes: /q/submissionid:28947244-grilservice Change-Id: Iec8b16c4322a6e1a245c4bca22802ab29fe042a5 --- device.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/device.mk b/device.mk index 71a9da30..2e3f7712 100644 --- a/device.mk +++ b/device.mk @@ -232,7 +232,6 @@ USE_LASSEN_OEMHOOK := true ifneq ($(BOARD_WITHOUT_RADIO),true) $(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true) PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril - $(call soong_config_set,grilservice,use_google_qns,true) endif # Use for GRIL From 5c936367086f55cd8a31d4c6584ef283283d9334 Mon Sep 17 00:00:00 2001 From: carmenyip Date: Tue, 27 Aug 2024 08:18:41 +0000 Subject: [PATCH 54/64] extended_log: update directory permissions for zuma Bug: 336638376 Test: $ cd data/vendor/radio $ ls -la Flag: NONE changing directory permissions only Change-Id: I89d003f286868fa2a593aa627e8d89a721395d79 --- conf/init.zuma.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index a5005e94..55f764e3 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -394,7 +394,7 @@ on post-fs-data mkdir /data/vendor/radio/logs/always-on 777 system radio # Modem extended log folder - mkdir /data/vendor/radio/extended_logs 0770 radio system + mkdir /data/vendor/radio/extended_logs 0771 radio system # Log Mask Library Mask storage paths mkdir /data/vendor/radio/log_masks 777 system system From 87bf601c9cd6c55b45a1c00f0b61aab37e1de077 Mon Sep 17 00:00:00 2001 From: Ocean Chen Date: Wed, 4 Sep 2024 16:00:25 +0800 Subject: [PATCH 55/64] Switch from the BFQ to the mq-deadline I/O scheduler The mq-deadline I/O scheduler is more stable than BFQ. Additionally, the boot time is shorter with the mq-deadline I/O scheduler. It only changes the scheduler on new kernel. Bug: 186902601 Test: forrest build Change-Id: I51605b32afb4340d416fe4923570bb3f4af24ab8 Signed-off-by: Ocean Chen --- conf/init.zuma.rc | 5 +---- device.mk | 8 ++++++++ storage/5.15/init.zuma.storage.rc | 3 +++ storage/6.1/init.zuma.storage.rc | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 storage/5.15/init.zuma.storage.rc create mode 100644 storage/6.1/init.zuma.storage.rc diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index f0cbf01c..dfa42b3e 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -1,3 +1,4 @@ +import /vendor/etc/init/hw/init.zuma.storage.rc import /vendor/etc/init/hw/init.zuma.usb.rc import android.hardware.drm@1.2-service.widevine.rc import init.exynos.sensorhub.rc @@ -15,10 +16,6 @@ on init # Disable util-awareness for mids and bigs write /proc/vendor_sched/teo_util_threshold "2 1024 1024" - # Boot time fs tuning - write /sys/block/sda/queue/scheduler bfq - write /sys/block/sda/queue/iosched/slice_idle 0 - chown system system /proc/vendor_sched/groups/bg/set_task_group chown system system /proc/vendor_sched/groups/cam/set_task_group chown system system /proc/vendor_sched/groups/fg/set_task_group diff --git a/device.mk b/device.mk index 542fdc9e..e31c0d39 100644 --- a/device.mk +++ b/device.mk @@ -380,6 +380,14 @@ PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.freq.userdebug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.freq.userdebug.rc endif +ifneq (,$(filter 5.%, $(TARGET_LINUX_KERNEL_VERSION))) +PRODUCT_COPY_FILES += \ + device/google/zuma/storage/5.15/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc +else +PRODUCT_COPY_FILES += \ + device/google/zuma/storage/6.1/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc +endif + # Recovery files PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.zuma.rc diff --git a/storage/5.15/init.zuma.storage.rc b/storage/5.15/init.zuma.storage.rc new file mode 100644 index 00000000..7df260de --- /dev/null +++ b/storage/5.15/init.zuma.storage.rc @@ -0,0 +1,3 @@ +on init + write /sys/block/sda/queue/scheduler bfq + write /sys/block/sda/queue/iosched/slice_idle 0 \ No newline at end of file diff --git a/storage/6.1/init.zuma.storage.rc b/storage/6.1/init.zuma.storage.rc new file mode 100644 index 00000000..3d88bb69 --- /dev/null +++ b/storage/6.1/init.zuma.storage.rc @@ -0,0 +1,2 @@ +on init + write /sys/block/sda/queue/scheduler mq-deadline \ No newline at end of file From c8436d8183f7c78233ce9b23eda063ae697db577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kosi=C5=84ski?= Date: Mon, 9 Sep 2024 17:03:22 +0000 Subject: [PATCH 56/64] Delete PRODUCT_FULL_TREBLE_OVERRIDE. This variable doesn't do anything for devices launching with API level 26 or later, and the initial zuma devices (Pixel 8) launched with API level 34. Bug: 307369186 Test: presubmit Flag: EXEMPT trivial build cleanup Change-Id: I181937f9e49d4b9e1088fc92df7681d1a39e3d26 --- BoardConfig-common.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index abc4803a..2a1898eb 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -19,9 +19,6 @@ include build/make/target/board/BoardConfigPixelCommon.mk # Include settings for 16k developer option, if enabled include device/google/zuma/BoardConfig-16k-common.mk -# Should be uncommented after fixing vndk-sp violation is fixed. -PRODUCT_FULL_TREBLE_OVERRIDE := true - # HACK : To fix up after bring up multimedia devices. TARGET_SOC := zuma From 069a8098b309c5e0e859db48afa7dc86b8910548 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Mon, 15 Jul 2024 18:42:15 -0700 Subject: [PATCH 57/64] Fix CopyEfsTest for symlinks Use the -L flag to preserve symlinks. Fixed various flags to ensure we handle symlinks right, and adjusted the awk string to handle difference in how dates are represented. Test: atest CopyEfsTest Flag: TEST_ONLY Bug: 352567354 Change-Id: I686c16fc1d771bf00bdc7465beb29a91eaef9e46 --- CopyEfsTest/src/com/android/test/CopyEfsTest.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/CopyEfsTest/src/com/android/test/CopyEfsTest.java index 23152fc3..6ff1638c 100644 --- a/CopyEfsTest/src/com/android/test/CopyEfsTest.java +++ b/CopyEfsTest/src/com/android/test/CopyEfsTest.java @@ -69,15 +69,22 @@ public class CopyEfsTest extends BaseHostJUnit4Test { r = getDevice().executeShellV2Command("umount /data/local/tmp/efs_test/mnt"); assertEquals(r.getExitCode().intValue(), 0); - r = getDevice().executeShellV2Command(String.format("dump.f2fs -rfPo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); + r = getDevice().executeShellV2Command(String.format("dump.f2fs -rfPLo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); assertEquals(r.getExitCode().intValue(), 0); r = getDevice().executeShellV2Command(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); assertEquals(r.getExitCode().intValue(), 0); - assertEquals("", getDevice().executeShellCommand("diff -rq /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump")); - // Remove timestamps at positions 6 and 7, because ls on device does not support --time-style + r = getDevice().executeShellV2Command("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump"); + assertEquals(r.getExitCode().intValue(), 0); + assertEquals(r.getStdout(), ""); + + // Remove timestamps because ls on device does not support --time-style. This is AWKward. + // Format is [permissions] [links] [uid] [gid] [size] time [name/symlink] + // time may have different numbers of blocks + // symlinks will be of the form a -> b + // So we can check for -> in the second to last spot to determine what position the timestamp ends at // Remove totals because on disk block usage may change depending on filesystem - String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlLnR . | awk {'$6=\"\";$7=\"\";if ($1 != \"total\"){print $0}'}"; + String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlnR . | awk {'if (NF>3 && $(NF-1) == \"->\") end=3; else end=1; for(i=6;i<=NF-end && i>0;i++)$i=\"\";if ($1 != \"total\"){print $0}'}"; String mnt_ls = getDevice().executeShellCommand(String.format(ls_cmd, "mnt")); assertEquals(getDevice().executeShellCommand("echo $?"), "0\n"); String dump_ls = getDevice().executeShellCommand(String.format(ls_cmd, "dump")); From 175979b0ca9ed112ed73c1902a5ea93c46c8d298 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 12 Jul 2024 21:21:48 +0000 Subject: [PATCH 58/64] Add persist to CopyEfsTest Change-Id: I8e12b0ac5e529e15697f35b88ac8b43c798fedd1 Test: atest CopyEfsTest Flag: TEST_ONLY Bug: 352567354 --- CopyEfsTest/src/com/android/test/CopyEfsTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/CopyEfsTest/src/com/android/test/CopyEfsTest.java index 6ff1638c..9314174d 100644 --- a/CopyEfsTest/src/com/android/test/CopyEfsTest.java +++ b/CopyEfsTest/src/com/android/test/CopyEfsTest.java @@ -56,6 +56,7 @@ public class CopyEfsTest extends BaseHostJUnit4Test { testDumpF2FS("efs"); testDumpF2FS("efs_backup"); testDumpF2FS("modem_userdata"); + testDumpF2FS("persist"); } private void testDumpF2FS(String name) throws Exception { From dd3eec86779ea2cd452bfa614ddf7e83f9a8d120 Mon Sep 17 00:00:00 2001 From: Pawan Wagh Date: Mon, 9 Sep 2024 21:04:48 +0000 Subject: [PATCH 59/64] Revert "Disable incremental boot_otas" This reverts commit 8bb0da99a978bd6c56ba52f4f630a43356a273ae. Reason for revert: Incremental ota support is now available: b/339658378 Fixes disk size regression issue now that OTA signing issues are resolved. Change-Id: Id897a60473e6ea99522d9ab372511e7c2ebdd757 --- BoardConfig-16k-common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk index 0571d7a5..f7bee9d1 100644 --- a/BoardConfig-16k-common.mk +++ b/BoardConfig-16k-common.mk @@ -33,5 +33,6 @@ BOARD_PREBUILT_DTBOIMAGE_16KB := $(TARGET_KERNEL_DIR_16K)/dtbo.img BOARD_KERNEL_MODULES_16K := $(filter-out %/bcm_dbg.ko,$(BOARD_KERNEL_MODULES_16K)) BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(notdir $(module))) +BOARD_16K_OTA_USE_INCREMENTAL := true BOARD_16K_OTA_MOVE_VENDOR := true endif From f52ee80ff654533c480a7ce2f9f4f8fcc4a5af7e Mon Sep 17 00:00:00 2001 From: Chia-Chi Teng Date: Tue, 10 Sep 2024 01:56:29 +0000 Subject: [PATCH 60/64] Deprecate preloaded_nanoapps.json Flag: EXEMPT resource only update Bug: 350102369 Test: on device and presubmit Change-Id: I5b5c3fe3a37199f3a55cb6e0e31f0ce141bc0dda --- device.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/device.mk b/device.mk index dfc9f155..1266f66f 100644 --- a/device.mk +++ b/device.mk @@ -469,8 +469,6 @@ PRODUCT_COPY_FILES += \ ## Enable the CHRE Daemon CHRE_USF_DAEMON_ENABLED := false CHRE_DEDICATED_TRANSPORT_CHANNEL_ENABLED := true -PRODUCT_PACKAGES += \ - preloaded_nanoapps.json # Filesystem management tools PRODUCT_PACKAGES += \ From 2dbe6e6fd22bb9b12c72ce6428edc391762abe6b Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Tue, 10 Sep 2024 13:55:10 -0700 Subject: [PATCH 61/64] Support 16KB data reset We didn't add the formattable flag to ext4 fstab entry because init only uses the first entry for re-formatting, but now init can choose the right fs type base on page size, we can add the formattable flag. Now data resets in 16KB mode would go back to ext4. Test: th Bug: 356202847 Change-Id: Ieb01c2592b3bb8e3342b2b6178ee73c0fb8a4288 --- conf/f2fs/fstab.zuma.f2fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/f2fs/fstab.zuma.f2fs b/conf/f2fs/fstab.zuma.f2fs index 10b82262..47682dee 100644 --- a/conf/f2fs/fstab.zuma.f2fs +++ b/conf/f2fs/fstab.zuma.f2fs @@ -5,6 +5,6 @@ # # /dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,device=zoned:/dev/block/by-name/zoned_device -/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption +/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,formattable,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption /dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount /dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,first_stage_mount,metadata_csum From c46756b74a6d0cca8e0057f1fba76c7ff388df40 Mon Sep 17 00:00:00 2001 From: Pawan Wagh Date: Thu, 12 Sep 2024 16:24:28 +0000 Subject: [PATCH 62/64] 16kb: Filter out zram.ko for dev options Test: atest Enable16KbTest Flag: EXEMPT bugfix Bug: 363412208 Change-Id: Ib1e135889186eeccb21448e16660701967c92c5c --- BoardConfig-16k-common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk index 6498e054..d636e9ad 100644 --- a/BoardConfig-16k-common.mk +++ b/BoardConfig-16k-common.mk @@ -33,6 +33,7 @@ BOARD_PREBUILT_DTBOIMAGE_16KB := $(TARGET_KERNEL_DIR_16K)/dtbo.img # Zuma targets use exynos-bcm_dbg.ko module instead of bcm_dbg.ko. BOARD_KERNEL_MODULES_16K := $(filter-out %/bcm_dbg.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/zram.ko,$(BOARD_KERNEL_MODULES_16K)) BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(notdir $(module))) BOARD_16K_OTA_USE_INCREMENTAL := true From f42925e978e980c71be182906bf5927d5017aa75 Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Fri, 28 Jun 2024 01:36:40 +0000 Subject: [PATCH 63/64] Add input event profile to mitigate input latency of input threads Bug: 347122505 Test: check the priority and latency of input thread in Perffeto Flag: NONE early device setting updates Change-Id: I3977722564241817575d94b2d2023eac6939ce1c --- conf/init.zuma.rc | 4 ++++ task_profiles.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 53475c33..4bb5a1d8 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -44,6 +44,8 @@ on init chown system system /proc/vendor_sched/prefer_idle_clear chown system system /proc/vendor_sched/pmu_poll_enable chown system system /proc/vendor_sched/pmu_poll_time + chown system system /proc/vendor_sched/uclamp_fork_reset_clear + chown system system /proc/vendor_sched/uclamp_fork_reset_set chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency @@ -95,6 +97,8 @@ on init chmod 0220 /proc/vendor_sched/prefer_idle_clear chmod 0660 /proc/vendor_sched/pmu_poll_enable chmod 0220 /proc/vendor_sched/pmu_poll_time + chmod 0220 /proc/vendor_sched/uclamp_fork_reset_clear + chmod 0220 /proc/vendor_sched/uclamp_fork_reset_set start vendor.keymaster-4-0 diff --git a/task_profiles.json b/task_profiles.json index fda6c3ea..81e5e41f 100644 --- a/task_profiles.json +++ b/task_profiles.json @@ -288,6 +288,10 @@ { "Name": "OtaProfiles", "Profiles": [ "OtaPerformance", "ProcessCapacityNormal", "LowIoPriority", "TimerSlackHigh" ] + }, + { + "Name": "InputPolicy", + "Profiles": [ "ResetUclampGrp" ] } ] } From 1a173d6997cb50ab94d7bc50f2562fad8cb908d9 Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Wed, 9 Oct 2024 12:57:48 +0000 Subject: [PATCH 64/64] Set auto prefer idle task name Set InputDispatche and InputReader prefer idle explicitly, which is a workaround and should be removed after they become ADPF. Bug: 366146314 Flag: NONE init rc file change does not support flags Test: tasks set as expected (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a6c71987d597d0d575b62f6a65807c1bcd08ee87) Merged-In: I38afa16f8f85e6aea31ddd5367c2e2d4a3249ced Change-Id: I38afa16f8f85e6aea31ddd5367c2e2d4a3249ced --- conf/init.zuma.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 4bb5a1d8..54770579 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -858,6 +858,9 @@ on property:sys.boot_completed=1 # Enable SICD write /sys/devices/system/cpu/cpupm/cpupm/sicd 1 + # To be removed after InputDispatche and InputReader become ADPF + write /proc/vendor_sched/prefer_idle_task_name "InputDispatcher,InputReader" + on property:sys.boot_completed=1 && property:persist.sys.device_provisioned=1 write /sys/class/power_supply/battery/first_usage_date 0