diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk index d636e9ad..ef54bbbf 100644 --- a/BoardConfig-16k-common.mk +++ b/BoardConfig-16k-common.mk @@ -31,8 +31,17 @@ BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/vendor_dlkm.module 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. +# The 16kb mode does not use these modules. +BOARD_KERNEL_MODULES_16K := $(filter-out %/aoc_unit_test_dev.ko,$(BOARD_KERNEL_MODULES_16K)) BOARD_KERNEL_MODULES_16K := $(filter-out %/bcm_dbg.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/gnssif.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/gnss_spi.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/mali_kutf.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/mali_kutf_clk_rate_trace_test_portal.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/rt6160_regulator.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/sec_touch.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/sscoredump_sample_test.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_16K := $(filter-out %/sscoredump_test.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))) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 8a6b51a3..59cb31de 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -38,9 +38,23 @@ BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all rcutree.enable_rc BOARD_KERNEL_CMDLINE += swiotlb=1024 BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4 + +# Normal (non-_fullmte) builds should disable kasan ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT))) BOARD_KERNEL_CMDLINE += kasan=off endif + +# Enable a limited subset of MTE for "normal" (non-_fullmte) eng builds. +# Don't touch any settings for _fullmte builds. They are set somewhere else. +ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT))) +ifeq ($(TARGET_BUILD_VARIANT),eng) +BOARD_KERNEL_CMDLINE += bootloader.pixel.MTE_FORCE_ON +ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),) +SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap) +endif +endif +endif + BOARD_BOOTCONFIG += androidboot.boot_devices=13200000.ufs TARGET_NO_BOOTLOADER := true @@ -64,7 +78,7 @@ TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab.zuma-sw-encrypt TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888 TARGET_RECOVERY_UI_MARGIN_HEIGHT := 165 TARGET_RECOVERY_UI_LIB := \ - librecovery_ui_pixel \ + //hardware/google/pixel/recovery:librecovery_ui_pixel \ libfstab AB_OTA_UPDATER := true @@ -204,6 +218,17 @@ BOARD_USE_BLOB_ALLOCATOR := false BOARD_SUPPORT_MFC_ENC_BT2020 := true BOARD_SUPPORT_FLEXIBLE_P010 := true BOARD_SUPPORT_MFC_VERSION := 1660 +$(call soong_config_set,video_codec,target_soc_name,$(TARGET_SOC_NAME)) +$(call soong_config_set_bool,video_codec,board_use_codec2_hidl_1_2,$(BOARD_USE_CODEC2_HIDL_1_2)) +$(call soong_config_set_bool,video_codec,board_use_csc_filter,$(BOARD_USE_CSC_FILTER)) +$(call soong_config_set_bool,video_codec,board_use_dec_sw_csc,$(BOARD_USE_DEC_SW_CSC)) +$(call soong_config_set_bool,video_codec,board_use_enc_sw_csc,$(BOARD_USE_ENC_SW_CSC)) +$(call soong_config_set_bool,video_codec,board_support_mfc_enc_rgb,$(BOARD_SUPPORT_MFC_ENC_RGB)) +$(call soong_config_set_bool,video_codec,board_use_blob_allocator,$(BOARD_USE_BLOB_ALLOCATOR)) +$(call soong_config_set_bool,video_codec,board_support_mfc_enc_bt2020,$(BOARD_SUPPORT_MFC_ENC_BT2020)) +$(call soong_config_set_bool,video_codec,board_support_flexible_p010,$(BOARD_SUPPORT_FLEXIBLE_P010)) +$(call soong_config_set_bool,video_codec,board_use_codec2_aidl,$(if $(BOARD_USE_CODEC2_AIDL),true,false)) +$(call soong_config_set,video_codec,board_support_mfc_version,$(BOARD_SUPPORT_MFC_VERSION)) ######################## BOARD_SUPER_PARTITION_SIZE := 8531214336 diff --git a/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/CopyEfsTest/src/com/android/test/CopyEfsTest.java index 9314174d..cd22457b 100644 --- a/CopyEfsTest/src/com/android/test/CopyEfsTest.java +++ b/CopyEfsTest/src/com/android/test/CopyEfsTest.java @@ -24,6 +24,7 @@ import org.junit.After; import android.platform.test.annotations.AppModeFull; +import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; import com.android.tradefed.testtype.junit4.DeviceTestRunOptions; @@ -59,38 +60,62 @@ public class CopyEfsTest extends BaseHostJUnit4Test { testDumpF2FS("persist"); } + private CommandResult RunAndCheckAdbCmd(String cmd) throws DeviceNotAvailableException { + CommandResult r = getDevice().executeShellV2Command(cmd); + assertEquals("Failed to run " + cmd, Integer.valueOf(0), r.getExitCode()); + return r; + } + + // Remove timestamps because ls on device does not support --time-style. + // Format is [permissions] [links] [uid] [gid] [size] time [name/symlink] + // time may vary greatly in formatting + // 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 + private String removeTimestamps(String input) { + StringBuilder output = new StringBuilder(); + for (String line : input.split("\n")) { + String[] tokens = line.split("(?")) + name_offset = 3; + for (int i=0; i= 5 && i < tokens.length - name_offset) + continue; + if (i != 0) + output.append(" "); + output.append(tokens[i]); + } + output.append("\n"); + } + return output.toString(); + } + private void testDumpF2FS(String name) throws Exception { - getDevice().executeShellCommand(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name)); + RunAndCheckAdbCmd(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); + RunAndCheckAdbCmd(String.format("fsck.f2fs -f /data/local/tmp/efs_test/%s.img", name)); + RunAndCheckAdbCmd(String.format("mount /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); + RunAndCheckAdbCmd("umount /data/local/tmp/efs_test/mnt"); - 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); + RunAndCheckAdbCmd(String.format("dump.f2fs -rfPLo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); + RunAndCheckAdbCmd(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); - r = getDevice().executeShellV2Command("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump"); - assertEquals(r.getExitCode().intValue(), 0); + CommandResult r = RunAndCheckAdbCmd("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump"); 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 -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")); - assertEquals(getDevice().executeShellCommand("echo $?"), "0\n"); - assertEquals(mnt_ls, dump_ls); + String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlnR ."; + CommandResult mnt_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "mnt")); + CommandResult dump_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "dump")); + assertEquals(removeTimestamps(mnt_ls.getStdout()), removeTimestamps(dump_ls.getStdout())); getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt"); getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*"); diff --git a/conf/f2fs/fstab.zuma.f2fs b/conf/f2fs/fstab.zuma.f2fs index 47682dee..b5892d14 100644 --- a/conf/f2fs/fstab.zuma.f2fs +++ b/conf/f2fs/fstab.zuma.f2fs @@ -7,4 +7,4 @@ /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,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 +/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,formattable,first_stage_mount,metadata_csum diff --git a/conf/init.eng.memtag.rc b/conf/init.eng.memtag.rc new file mode 100644 index 00000000..19071f55 --- /dev/null +++ b/conf/init.eng.memtag.rc @@ -0,0 +1,16 @@ +# MTE in -eng build: litle and mid cores in Sync mode +# Big core in Asymm mode to work around a performance issue (b/266613799) +on init + # Per-core mode overrides. + # Little Cores: sync + write /sys/devices/system/cpu/cpu0/mte_tcf_preferred sync + write /sys/devices/system/cpu/cpu1/mte_tcf_preferred sync + write /sys/devices/system/cpu/cpu2/mte_tcf_preferred sync + write /sys/devices/system/cpu/cpu3/mte_tcf_preferred sync + # Mid Cores: sync + write /sys/devices/system/cpu/cpu4/mte_tcf_preferred sync + write /sys/devices/system/cpu/cpu5/mte_tcf_preferred sync + write /sys/devices/system/cpu/cpu6/mte_tcf_preferred sync + write /sys/devices/system/cpu/cpu7/mte_tcf_preferred sync + # Big Core: asymm + write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index ba6a13ea..43e56c4f 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -102,6 +102,83 @@ on init start vendor.keymaster-4-0 + # Change permission of sched qos nodes + chown system system /proc/vendor_sched/sched_qos/adpf_set + chown system system /proc/vendor_sched/sched_qos/adpf_clear + chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_set + chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_clear + chown system system /proc/vendor_sched/sched_qos/boost_prio_set + chown system system /proc/vendor_sched/sched_qos/boost_prio_clear + chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_set + chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_clear + chown system system /proc/vendor_sched/sched_qos/prefer_fit_set + chown system system /proc/vendor_sched/sched_qos/prefer_fit_clear + chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_set + chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_clear + chown system system /proc/vendor_sched/sched_qos/prefer_idle_set + chown system system /proc/vendor_sched/sched_qos/prefer_idle_clear + chown system system /proc/vendor_sched/sched_qos/rampup_multiplier_set + chown system system /proc/vendor_sched/sched_qos/rampup_multiplier_clear + + chmod 0220 /proc/vendor_sched/sched_qos/adpf_set + chmod 0220 /proc/vendor_sched/sched_qos/adpf_clear + chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_set + chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_clear + chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_set + chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_clear + chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_set + chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_clear + chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_set + chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_clear + chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_set + chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_clear + chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_set + chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_clear + chmod 0220 /proc/vendor_sched/sched_qos/rampup_multiplier_set + chmod 0220 /proc/vendor_sched/sched_qos/rampup_multiplier_clear + + # Enable sched_qos for some groups + write /proc/vendor_sched/groups/ta/qos_adpf_enable 1 + write /proc/vendor_sched/groups/ta/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/ta/qos_boost_prio_enable 1 + write /proc/vendor_sched/groups/ta/qos_preempt_wakeup_enable 1 + write /proc/vendor_sched/groups/ta/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/ta/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/ta/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/ta/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/fg/qos_adpf_enable 1 + write /proc/vendor_sched/groups/fg/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/fg/qos_boost_prio_enable 1 + write /proc/vendor_sched/groups/fg/qos_preempt_wakeup_enable 1 + write /proc/vendor_sched/groups/fg/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/fg/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/fg/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/fg/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_adpf_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_boost_prio_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_preempt_wakeup_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/cam/qos_adpf_enable 1 + write /proc/vendor_sched/groups/cam/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/cam/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/cam/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/cam/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/cam/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_adpf_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/rt/qos_adpf_enable 1 + write /proc/vendor_sched/groups/rt/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/sf/qos_adpf_enable 1 + write /proc/vendor_sched/groups/sf/qos_rampup_multiplier_enable 1 + # ZRAM setup write /proc/sys/vm/page-cluster 0 @@ -150,14 +227,11 @@ on init # governor setting write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500 - write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000 write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2 write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500 - write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000 write /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor sched_pixel write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/up_rate_limit_us 500 - write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 20000 # memlat cpuidle awareness setting @@ -374,6 +448,11 @@ on late-fs # Mount RW partitions which need run fsck mount_all --late +on late-init + write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000 + write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000 + write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 20000 + on post-fs-data # Modem temperature driver chown radio system /sys/devices/platform/cp-tm1/cp_temp @@ -532,9 +611,9 @@ on early-boot chown system system /dev/logbuffer_usbpd chown system system /dev/logbuffer_wireless chown system system /dev/logbuffer_pca9468 + chown system system /dev/logbuffer_dc_mains chown system system /dev/logbuffer_cpm chown system system /dev/logbuffer_wc68 - chown system system /dev/logbuffer_ln8411 chown system system /dev/logbuffer_pcie0 chown system system /dev/logbuffer_pcie1 chown system system /dev/logbuffer_bd @@ -982,7 +1061,7 @@ on property:vendor.thermal.link_ready=1 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_gpu_lvl 9000 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 diff --git a/conf/ueventd.zuma.rc b/conf/ueventd.zuma.rc index e69f4672..741b20b1 100644 --- a/conf/ueventd.zuma.rc +++ b/conf/ueventd.zuma.rc @@ -97,6 +97,7 @@ /dev/acd-mel_processor 0660 system audio /dev/amcs 0660 system audio /dev/acd-audio_rtp_* 0660 system radio +/dev/acd-mc_headpos 0660 system audio # Secure MEM driver /dev/s5p-smem 0660 drm drmrpc @@ -155,6 +156,11 @@ /dev/acd-com.google.chre 0660 system system /dev/acd-com.google.chre.non_wake_up 0660 system system +# CHRE (EFW transport) +/dev/acd-chre_ctl 0660 system system +/dev/acd-chre_data_tx 0220 system system +/dev/acd-chre_data_rx 0440 system system + # BT /dev/acd-com.google.bt 0660 system system /dev/acd-com.google.bt.non_wake_up 0660 system system diff --git a/default-permissions.xml b/default-permissions.xml index 58dd84cb..27364cae 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -169,10 +169,14 @@ - + + + + diff --git a/device-common.mk b/device-common.mk index f3e33959..41978abb 100644 --- a/device-common.mk +++ b/device-common.mk @@ -49,9 +49,10 @@ PRODUCT_PRODUCT_PROPERTIES += \ ro.preventative_fsck = 1 # Indicate that the bootloader supports the MTE developer option switch -# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that -# force enable MTE. +# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products and +# eng products that force enable MTE ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT))) +ifeq (,$(filter eng,$(TARGET_BUILD_VARIANT))) PRODUCT_PRODUCT_PROPERTIES += ro.arm64.memtag.bootctl_supported=1 # N.B. persist properties in product Makefiles aren't actually persisted to the data # partition, so they will actually go away if we remove them here, or if the user @@ -61,3 +62,11 @@ PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.google.android.blueto PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.android.nfc=off PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.system_server=off endif +endif + +ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT))) +ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT))) +PRODUCT_COPY_FILES += \ + device/google/zuma/conf/init.eng.memtag.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.eng.memtag.rc +endif +endif diff --git a/device.mk b/device.mk index 10232f75..dd4ef2a3 100644 --- a/device.mk +++ b/device.mk @@ -75,6 +75,7 @@ PRODUCT_SOONG_NAMESPACES += \ hardware/google/gchips/gralloc4 \ hardware/google/graphics/common \ hardware/google/graphics/zuma \ + hardware/google/graphics/zuma/libhwc2.1 \ hardware/google/interfaces \ hardware/google/pixel \ device/google/zuma \ @@ -95,11 +96,6 @@ TRUSTY_KEYMINT_IMPL := rust ifeq ($(RELEASE_AVF_ENABLE_LLPVM_CHANGES),true) # Set the environment variable to enable the Secretkeeper HAL service. SECRETKEEPER_ENABLED := true - # TODO(b/341708664): Enable Secretkeeper unconditionally once AOSP targets are built with - # compatible bootloader (24Q3+). - ifneq (,$(filter aosp_%,$(TARGET_PRODUCT))) - SECRETKEEPER_ENABLED := false - endif endif # OEM Unlock reporting @@ -191,7 +187,7 @@ PRODUCT_PRODUCT_PROPERTIES += \ bluetooth.profile.asha.central.enabled?=true \ bluetooth.profile.a2dp.source.enabled?=true \ bluetooth.profile.avrcp.target.enabled?=true \ - bluetooth.profile.bap.unicast.server.enabled?=true \ + bluetooth.profile.bap.unicast.client.enabled?=true \ bluetooth.profile.bas.client.enabled?=true \ bluetooth.profile.csip.set_coordinator.enabled?=true \ bluetooth.profile.gatt.enabled?=true \ @@ -206,8 +202,8 @@ PRODUCT_PRODUCT_PROPERTIES += \ bluetooth.profile.pan.panu.enabled?=true \ bluetooth.profile.pbap.server.enabled?=true \ bluetooth.profile.sap.server.enabled?=true \ - bluetooth.profile.tbs.server.enabled?=true \ - bluetooth.profile.vc.server.enabled?=true + bluetooth.profile.ccp.server.enabled?=true \ + bluetooth.profile.vcp.controller.enabled?=true # Carrier configuration default location PRODUCT_PROPERTY_OVERRIDES += \ @@ -238,6 +234,9 @@ endif # Use for GRIL USES_LASSEN_MODEM := true $(call soong_config_set, vendor_ril_google_feature, use_lassen_modem, true) +ifneq ($(BOARD_WITHOUT_RADIO),true) +$(call soong_config_set_bool,grilservice,use_google_qns,true) +endif ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true) USE_GOOGLE_DIALER := true @@ -1017,8 +1016,12 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ ifneq ($(BOARD_WITHOUT_RADIO),true) -# modem_svc_sit daemon -PRODUCT_PACKAGES += modem_svc_sit + +# Use Lassen specifc Shared Modem Platform +SHARED_MODEM_PLATFORM_VENDOR := lassen + +# Shared Modem Platform +include device/google/gs-common/modem/modem_svc_sit/shared_modem_platform.mk # modem_ml_svc_sit daemon PRODUCT_PACKAGES += modem_ml_svc_sit @@ -1158,7 +1161,7 @@ PRODUCT_SOONG_NAMESPACES += \ vendor/google_devices/zuma/proprietary/gchips/tpu/nnapi_stable_aidl \ vendor/google_devices/zuma/proprietary/gchips/tpu/aidl \ vendor/google_devices/zuma/proprietary/gchips/tpu/hal \ - vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/api \ + vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/tachyon_apis \ vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/service # TPU firmware PRODUCT_PACKAGES += edgetpu-rio.fw diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index ead4cd93..879f614f 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -153,7 +153,7 @@ vendor.google.wifi_ext - 2-3 + 2-4 IWifiExt default diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 12039194..e4734c9e 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -206,36 +206,12 @@ void dumpMaxFg() { {"maxfg_monitor logbuffer", "/dev/logbuffer_maxfg_monitor"}, }; - 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"}, - {"maxfg_base", "/dev/logbuffer_maxfg_base_monitor"}, - {"maxfg_flip", "/dev/logbuffer_maxfg_flip_monitor"}, - }; - - const char *maxfgHistoryName = "Maxim FG History"; - const char *maxfgHistoryDir = "/dev/maxfg_history"; - std::string content; - if (isValidDir(maxfgLoc)) { for (const auto &row : maxfg) { dumpFileContent(row[0], row[1]); } - } else { - for (const auto &row : maxfgFlip) { - dumpFileContent(row[0], row[1]); - } - } - - if (isValidFile(maxfgHistoryDir)) { - dumpFileContent(maxfgHistoryName, maxfgHistoryDir); } } @@ -306,8 +282,9 @@ void dumpTcpc() { void dumpPdEngine() { const char* pdEngine [][2] { {"Logbuffer TCPC", "/dev/logbuffer_usbpd"}, - {"PPS-google_cpm", "/dev/logbuffer_cpm"}, - {"PPS-dc", "/dev/logbuffer_pca9468"}, + {"PPS-google_cpm logbuffer", "/dev/logbuffer_cpm"}, + {"PPS-pca9468 logbuffer", "/dev/logbuffer_pca9468"}, + {"PPS-dc_mains logbuffer", "/dev/logbuffer_dc_mains"}, }; for (const auto &row : pdEngine) { @@ -333,15 +310,6 @@ void dumpWc68() { } } -void dumpLn8411() { - const char* ln8411Title = "LN8411"; - const char* ln8411File = "/dev/logbuffer_ln8411"; - - if (isValidFile(ln8411File)) { - dumpFileContent(ln8411Title, ln8411File); - } -} - void dumpBatteryHealth() { const char* batteryHealth [][2] { {"Battery Health", "/sys/class/power_supply/battery/health_index_stats"}, @@ -361,7 +329,7 @@ void dumpBatteryHealth() { } void dumpBatteryDefend() { - const char* defendConfig [][4] { + const char* defendConfig [][3] { {"TRICKLE-DEFEND Config", "/sys/devices/platform/google,battery/power_supply/battery/", "bd_"}, {"DWELL-DEFEND Config", "/sys/devices/platform/google,charger/", "charge_s"}, @@ -406,6 +374,57 @@ void dumpBatteryDefend() { } } +void dumpBatteryCaretaker() { + const char* aacpConfig [][3] { + {"AACP Version", + "/sys/devices/platform/google,battery/power_supply/battery/", "aacp_"}, + {"AACR Config", + "/sys/devices/platform/google,battery/power_supply/battery/", "aacr_"}, + {"AAFV Config", + "/sys/devices/platform/google,battery/power_supply/battery/", "aafv_"}, + {"AACT Config", + "/sys/devices/platform/google,battery/power_supply/battery/", "aact_"}, + {"AACC", + "/sys/devices/platform/google,battery/power_supply/battery/", "aacc"}, + }; + + std::vector files; + struct dirent *entry; + std::string content; + std::string fileLocation; + + for (auto &config : aacpConfig) { + DIR *dir = opendir(config[1]); + if (dir == NULL) + continue; + + printTitle(config[0]); + while ((entry = readdir(dir)) != NULL) { + if (std::string(entry->d_name).find(config[2]) != std::string::npos && + strncmp(config[2], entry->d_name, strlen(config[2])) == 0) { + files.push_back(entry->d_name); + } + } + closedir(dir); + + sort(files.begin(), files.end()); + + for (auto &file : files) { + fileLocation = std::string(config[1]) + std::string(file); + if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) { + content = "\n"; + } + + printf("%s: %s", file.c_str(), content.c_str()); + + if (content.back() != '\n') + printf("\n"); + } + + files.clear(); + } +} + void printValuesOfDirectory(const char *directory, std::string debugfs, const char *strMatch) { std::vector files; auto info = directory; @@ -480,7 +499,6 @@ void dumpChgUserDebug() { const std::string debugfs = "/d/"; const char *maxFgDir = "/d/maxfg"; const char *maxFgStrMatch = "maxfg"; - const char *maxFg77779StrMatch = "max77779fg"; const char *chgTblName = "Charging table dump"; const char *chgTblDir = "/d/google_battery/chg_raw_profile"; @@ -488,16 +506,6 @@ void dumpChgUserDebug() { "fg_model", "algo_ver", "model_ok", - "registers", - "nv_registers", - }; - - const char *max77779FgInfo [] { - "fg_model", - "algo_ver", - "model_ok", - "registers", - "debug_registers", }; if (isUserBuild()) @@ -509,10 +517,6 @@ void dumpChgUserDebug() { for (auto & directory : maxFgInfo) { printValuesOfDirectory(directory, debugfs, maxFgStrMatch); } - } else { - for (auto & directory : max77779FgInfo) { - printValuesOfDirectory(directory, debugfs, maxFg77779StrMatch); - } } } @@ -980,9 +984,9 @@ int main() { dumpPdEngine(); dumpEusbRepeater(); dumpWc68(); - dumpLn8411(); dumpBatteryHealth(); dumpBatteryDefend(); + dumpBatteryCaretaker(); dumpChg(); dumpChgUserDebug(); dumpBatteryEeprom(); diff --git a/health/android.hardware.health-service.zuma.xml b/health/android.hardware.health-service.zuma.xml index 2acaabac..8ddfbdaa 100644 --- a/health/android.hardware.health-service.zuma.xml +++ b/health/android.hardware.health-service.zuma.xml @@ -1,7 +1,7 @@ android.hardware.health - 3 + 4 IHealth/default diff --git a/media_codecs_bo_c2.xml b/media_codecs_bo_c2.xml index 7786f5fd..8c564cd4 100644 --- a/media_codecs_bo_c2.xml +++ b/media_codecs_bo_c2.xml @@ -51,11 +51,11 @@ - + - - + + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 4aed9ce0..62ae0f0b 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -279,6 +279,9 @@ true + + 1024 + true @@ -311,13 +314,6 @@ 100% - - 20000 - - - 33% - true diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml deleted file mode 100644 index f8ed0c01..00000000 --- a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 5G UW - diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml deleted file mode 100644 index f8ed0c01..00000000 --- a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 5G UW - diff --git a/task_profiles.json b/task_profiles.json index 81e5e41f..6b9b1ee3 100644 --- a/task_profiles.json +++ b/task_profiles.json @@ -159,6 +159,21 @@ } ] }, + { + "Name": "HighPerformanceWI", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/groups/fg_wi/set_task_group", + "ProcFilePath": "/proc/vendor_sched/groups/fg_wi/set_proc_group", + "Value": "", + "LogFailures": "false" + } + } + ] + }, { "Name": "RealtimePerformance", "Actions": [ @@ -250,6 +265,202 @@ } ] }, + { + "Name": "AdpfSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/adpf_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "AdpfClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/adpf_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "BoostPrioSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/boost_prio_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "BoostPrioClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/boost_prio_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreemptWakeupSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/preempt_wakeup_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreemptWakeupClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/preempt_wakeup_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreferFitSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/prefer_fit_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreferFitClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/prefer_fit_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreferIdleSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/prefer_idle_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreferIdleClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/prefer_idle_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "AutoUclampMaxSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/auto_uclamp_max_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "AutoUclampMaxClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/auto_uclamp_max_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreferHighCapSet", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/prefer_high_cap_set", + "Value": "", + "LogFailures": "false" + } + } + ] + }, + { + "Name": "PreferHighCapClear", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/sched_qos/prefer_high_cap_clear", + "Value": "", + "LogFailures": "false" + } + } + ] + }, { "Name": "ResetUclampGrp", "Actions": [ @@ -287,11 +498,35 @@ }, { "Name": "OtaProfiles", - "Profiles": [ "OtaPerformance", "ProcessCapacityNormal", "LowIoPriority", "TimerSlackHigh" ] + "Profiles": [ "OtaPerformance", "ServiceCapacityLow", "LowIoPriority", "TimerSlackHigh" ] + }, + { + "Name": "SCHED_QOS_SENSITIVE_EXTREME_SET", + "Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet", "BoostPrioSet", "PreemptWakeupSet" ] + }, + { + "Name": "SCHED_QOS_SENSITIVE_EXTREME_CLEAR", + "Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear", "BoostPrioClear", "PreemptWakeupClear" ] + }, + { + "Name": "SCHED_QOS_SENSITIVE_STANDARD_SET", + "Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet" ] + }, + { + "Name": "SCHED_QOS_SENSITIVE_STANDARD_CLEAR", + "Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear" ] + }, + { + "Name": "SCHED_QOS_POWER_EFFICIENCY_SET", + "Profiles": [ "AutoUclampMaxSet" ] + }, + { + "Name": "SCHED_QOS_POWER_EFFICIENCY_CLEAR", + "Profiles": [ "AutoUclampMaxClear" ] }, { "Name": "InputPolicy", - "Profiles": [ "ResetUclampGrp" ] + "Profiles": [ "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME_SET" ] } ] } diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index 4f6d1272..10422f6c 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -1090,26 +1090,30 @@ void queryVersionHelper(android::hardware::usb::Usb *usb, pthread_mutex_lock(&usb->mLock); status = getPortStatusHelper(usb, currentPortStatus); - queryMoistureDetectionStatus(currentPortStatus); - queryPowerTransferStatus(currentPortStatus); - queryNonCompliantChargerStatus(currentPortStatus); - queryUsbDataSession(usb, currentPortStatus); - pthread_mutex_lock(&usb->mDisplayPortLock); - if (!usb->mDisplayPortFirstSetupDone && - usb->getDisplayPortUsbPathHelper(&displayPortUsbPath) == Status::SUCCESS) { + if (status == Status::SUCCESS && currentPortStatus->size() > 0) { + queryMoistureDetectionStatus(currentPortStatus); + queryPowerTransferStatus(currentPortStatus); + queryNonCompliantChargerStatus(currentPortStatus); + queryUsbDataSession(usb, currentPortStatus); + pthread_mutex_lock(&usb->mDisplayPortLock); + if (!usb->mDisplayPortFirstSetupDone && + usb->getDisplayPortUsbPathHelper(&displayPortUsbPath) == Status::SUCCESS) { - ALOGI("usbdp: boot with display connected or usb hal restarted"); - usb->setupDisplayPortPoll(); - } - pthread_mutex_unlock(&usb->mDisplayPortLock); - queryDisplayPortStatus(usb, currentPortStatus); - if (usb->mCallback != NULL) { - ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus, - status); - if (!ret.isOk()) - ALOGE("queryPortStatus error %s", ret.getDescription().c_str()); + ALOGI("usbdp: boot with display connected or usb hal restarted"); + usb->setupDisplayPortPoll(); + } + pthread_mutex_unlock(&usb->mDisplayPortLock); + queryDisplayPortStatus(usb, currentPortStatus); + if (usb->mCallback != NULL) { + ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus, + status); + if (!ret.isOk()) + ALOGE("queryPortStatus error %s", ret.getDescription().c_str()); + } else { + ALOGI("Notifying userspace skipped. Callback is NULL"); + } } else { - ALOGI("Notifying userspace skipped. Callback is NULL"); + ALOGI("%s skipped. currentPortStatus is empty", __func__); } pthread_mutex_unlock(&usb->mLock); }