diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index fd777786..b55906f8 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -22,7 +22,7 @@ TARGET_SOC := gs201
TARGET_SOC_NAME := google
USES_DEVICE_GOOGLE_GS201 := true
-$(call soong_config_set,CitadelProvision,target_soc,gs201)
+$(call soong_config_set,googleDeviceConfig,target_soc,gs201)
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
@@ -75,7 +75,7 @@ TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab.gs201
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
@@ -196,7 +196,16 @@ BOARD_SUPPORT_MFC_ENC_RGB := true
BOARD_USE_BLOB_ALLOCATOR := false
BOARD_SUPPORT_MFC_ENC_BT2020 := true
BOARD_SUPPORT_FLEXIBLE_P010 := true
-
+$(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))
########################
BOARD_SUPER_PARTITION_SIZE := 8531214336
diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc
index 2b5e3a6f..59bc55a3 100644
--- a/conf/init.gs201.rc
+++ b/conf/init.gs201.rc
@@ -20,36 +20,6 @@ on init
# Disable util-awareness
write /proc/vendor_sched/teo_util_threshold "1024 1024 1024"
- 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
- chown system system /proc/vendor_sched/groups/nnapi/set_task_group
- chown system system /proc/vendor_sched/groups/sys/set_task_group
- chown system system /proc/vendor_sched/groups/sys_bg/set_task_group
- chown system system /proc/vendor_sched/groups/ta/set_task_group
- chown system system /proc/vendor_sched/groups/rt/set_task_group
- chown system system /proc/vendor_sched/groups/sf/set_task_group
- chown system system /proc/vendor_sched/groups/dex2oat/set_task_group
- chown system system /proc/vendor_sched/groups/cam_power/set_task_group
- chown system system /proc/vendor_sched/groups/ota/set_task_group
- chown system system /proc/vendor_sched/groups/bg/set_proc_group
- chown system system /proc/vendor_sched/groups/cam/set_proc_group
- chown system system /proc/vendor_sched/groups/fg/set_proc_group
- chown system system /proc/vendor_sched/groups/nnapi/set_proc_group
- chown system system /proc/vendor_sched/groups/sys/set_proc_group
- chown system system /proc/vendor_sched/groups/sys_bg/set_proc_group
- chown system system /proc/vendor_sched/groups/ta/set_proc_group
- chown system system /proc/vendor_sched/groups/rt/set_proc_group
- chown system system /proc/vendor_sched/groups/sf/set_proc_group
- chown system system /proc/vendor_sched/groups/dex2oat/set_proc_group
- chown system system /proc/vendor_sched/groups/cam_power/set_proc_group
- chown system system /proc/vendor_sched/groups/ota/set_proc_group
- chown system system /proc/vendor_sched/prefer_idle_set
- 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
@@ -71,37 +41,6 @@ on init
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware
- chmod 0220 /proc/vendor_sched/groups/bg/set_task_group
- chmod 0220 /proc/vendor_sched/groups/cam/set_task_group
- chmod 0220 /proc/vendor_sched/groups/fg/set_task_group
- chmod 0220 /proc/vendor_sched/groups/nnapi/set_task_group
- chmod 0220 /proc/vendor_sched/groups/sys/set_task_group
- chmod 0220 /proc/vendor_sched/groups/sys_bg/set_task_group
- chmod 0220 /proc/vendor_sched/groups/ta/set_task_group
- chmod 0220 /proc/vendor_sched/groups/rt/set_task_group
- chmod 0220 /proc/vendor_sched/groups/sf/set_task_group
- chmod 0220 /proc/vendor_sched/groups/dex2oat/set_task_group
- chmod 0220 /proc/vendor_sched/groups/cam_power/set_task_group
- chmod 0220 /proc/vendor_sched/groups/ota/set_task_group
- chmod 0220 /proc/vendor_sched/groups/bg/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/cam/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/fg/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/nnapi/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/sys/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/sys_bg/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/ta/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/rt/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/sf/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/dex2oat/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/cam_power/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group
- chmod 0220 /proc/vendor_sched/prefer_idle_set
- chmod 0220 /proc/vendor_sched/prefer_idle_clear
- chmod 0220 /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
# ZRAM setup
@@ -153,14 +92,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/cpu6/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 20000
# memlat cpuidle awareness setting
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
@@ -332,6 +268,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/cpu6/cpufreq/sched_pixel/down_rate_limit_us 20000
+
on post-fs-data
# Log data folder
mkdir /data/vendor 0771 radio system
@@ -370,8 +311,8 @@ on post-fs-data
restorecon /sys/kernel/debug/tracing/trace_marker
# ranging sensor
- chown system system /dev/stmvl53l1_ranging
- chmod 0660 /dev/stmvl53l1_ranging
+ chown system system /dev/ispolin_ranging
+ chmod 0660 /dev/ispolin_ranging
# Factory calibration files
chmod 0771 /mnt/vendor/persist/camera
@@ -674,6 +615,7 @@ on property:sys.boot_completed=1
# Setup final cpuset
write /dev/cpuset/top-app/cpus ${persist.device_config.vendor_system_native.top-app_cpuset:-0-7}
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_cpuset:-0-3,4-5}
+ write /dev/cpuset/foreground_window/cpus ${persist.device_config.vendor_system_native.foreground_window_cpuset:-0-3,4-5}
write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
write /dev/cpuset/system-background/cpus ${persist.device_config.vendor_system_native.system-background_cpuset:-0-3}
write /dev/cpuset/restricted/cpus ${persist.device_config.vendor_system_native.restricted_cpuset:-0-3}
@@ -1007,6 +949,8 @@ on property:persist.device_config.vendor_system_native.top-app_cpuset=*
write /dev/cpuset/top-app/cpus ${persist.device_config.vendor_system_native.top-app_cpuset:-0-7}
on property:persist.device_config.vendor_system_native.foreground_cpuset=*
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_cpuset:-0-3,4-5}
+on property:persist.device_config.vendor_system_native.foreground_window_cpuset=*
+ write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_window_cpuset:-0-3,4-5}
on property:persist.device_config.vendor_system_native.background_cpuset=*
write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
on property:persist.device_config.vendor_system_native.system-background_cpuset=*
diff --git a/default-permissions.xml b/default-permissions.xml
index 45a2d303..428b7193 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -185,5 +185,9 @@
+
+
+
diff --git a/device.mk b/device.mk
index fd0eccfb..6ef1b9dc 100644
--- a/device.mk
+++ b/device.mk
@@ -25,7 +25,7 @@ include device/google/gs-common/thermal/dump/thermal.mk
include device/google/gs-common/thermal/thermal_hal/device.mk
include device/google/gs-common/pixel_metrics/pixel_metrics.mk
include device/google/gs-common/performance/perf.mk
-include device/google/gs-common/display/dump.mk
+include device/google/gs-common/display/dump_exynos_display.mk
include device/google/gs-common/camera/dump.mk
include device/google/gs-common/gxp/gxp.mk
include device/google/gs-common/gps/dump/log.mk
@@ -217,6 +217,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
diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml
index c0b4deb2..f4410c13 100644
--- a/device_framework_matrix_product.xml
+++ b/device_framework_matrix_product.xml
@@ -78,7 +78,7 @@
com.google.hardware.pixel.display
- 13
+ 13-14
IDisplay
default
diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp
index 9ccc45ec..878f26aa 100644
--- a/dumpstate/dump_power.cpp
+++ b/dumpstate/dump_power.cpp
@@ -43,9 +43,19 @@ int getCommandOutput(const char *cmd, std::string *output) {
return 0;
}
bool isValidFile(const char *file) {
- if (!access(file, R_OK)) {
- return false;
+ FILE *fp = fopen(file, "r");
+ if (fp != NULL) {
+ fclose(fp);
+ return true;
}
+ return false;
+}
+bool isValidDir(const char *directory) {
+ DIR *dir = opendir(directory);
+ if (dir == NULL)
+ return false;
+
+ closedir(dir);
return true;
}
bool isUserBuild() {
@@ -122,8 +132,8 @@ void dumpPowerSupplyStats() {
{"Power supply property gcpm", "/sys/class/power_supply/gcpm/uevent"},
{"Power supply property gcpm_pps", "/sys/class/power_supply/gcpm_pps/uevent"},
{"Power supply property main-charger", "/sys/class/power_supply/main-charger/uevent"},
- {"Power supply property dc-mains", "/sys/class/power_supply/dc-mains/uevent"},
- {"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-8-0025/uevent"},
+ {"Power supply property pca94xx-mains", "/sys/class/power_supply/pca94xx-mains/uevent"},
+ {"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-i2c-max77759tcpc/uevent"},
{"Power supply property usb", "/sys/class/power_supply/usb/uevent"},
{"Power supply property wireless", "/sys/class/power_supply/wireless/uevent"},
};
@@ -133,35 +143,40 @@ void dumpPowerSupplyStats() {
}
void dumpMaxFg() {
const char *maxfgLoc = "/sys/class/power_supply/maxfg";
+ const char *maxfgDualLoc = "/sys/class/power_supply/maxfg_base";
const char *maxfg [][2] = {
{"Power supply property maxfg", "/sys/class/power_supply/maxfg/uevent"},
{"m5_state", "/sys/class/power_supply/maxfg/m5_model_state"},
- {"maxfg", "/dev/logbuffer_maxfg"},
- {"maxfg", "/dev/logbuffer_maxfg_monitor"},
+ {"maxfg registers", "/sys/class/power_supply/maxfg/registers_dump"},
+ {"maxfg logbuffer", "/dev/logbuffer_maxfg"},
+ {"maxfg_monitor logbuffer", "/dev/logbuffer_maxfg_monitor"},
};
- const char *maxfgFlip [][2] = {
+ const char *maxfgDual [][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"},
+ {"Power supply property maxfg_secondary", "/sys/class/power_supply/maxfg_secondary/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"},
+ {"maxfg_base logbuffer", "/dev/logbuffer_maxfg_base"},
+ {"maxfg_secondary logbuffer", "/dev/logbuffer_maxfg_secondary"},
+ {"maxfg_base logbuffer", "/dev/logbuffer_maxfg_base_monitor"},
+ {"maxfg_secondary logbuffer", "/dev/logbuffer_maxfg_secondary_monitor"},
+ {"dual_batt logbuffer", "/dev/logbuffer_dual_batt"},
};
const char *maxfgHistoryName = "Maxim FG History";
const char *maxfgHistoryDir = "/dev/maxfg_history";
std::string content;
- if (isValidFile(maxfgLoc)) {
+ if (isValidDir(maxfgLoc)) {
for (const auto &row : maxfg) {
dumpFileContent(row[0], row[1]);
}
- } else {
- for (const auto &row : maxfgFlip) {
+ } else if (isValidDir(maxfgDualLoc)){
+ for (const auto &row : maxfgDual) {
dumpFileContent(row[0], row[1]);
}
- }
- if (isValidFile(maxfgHistoryDir)) {
- dumpFileContent(maxfgHistoryName, maxfgHistoryDir);
+ if (isValidFile(maxfgHistoryDir)) {
+ dumpFileContent(maxfgHistoryName, maxfgHistoryDir);
+ }
}
}
void dumpPowerSupplyDock() {
@@ -227,26 +242,17 @@ void dumpPdEngine() {
const char* pdEngine [][3] {
{"TCPC logbuffer", "/dev/logbuffer_usbpd"},
{"pogo_transport logbuffer", "/dev/logbuffer_pogo_transport"},
- {"PPS-google_cpm", "/dev/logbuffer_cpm"},
- {"PPS-dc", "/dev/logbuffer_pca9468"},
+ {"PPS-google_cpm logbuffer", "/dev/logbuffer_cpm"},
+ {"PPS-pca9468 logbuffer", "/dev/logbuffer_pca9468"},
};
for (const auto &row : pdEngine) {
dumpFileContent(row[0], row[1]);
}
}
-void dumpWc68() {
- const char* wc68Title = "WC68";
- const char* wc68File = "/dev/logbuffer_wc68";
- dumpFileContent(wc68Title, wc68File);
-}
-void dumpLn8411() {
- const char* ln8411Title = "LN8411";
- const char* ln8411File = "/dev/logbuffer_ln8411";
- dumpFileContent(ln8411Title, ln8411File);
-}
void dumpBatteryHealth() {
const char* batteryHealth [][2] {
{"Battery Health", "/sys/class/power_supply/battery/health_index_stats"},
+ {"Battery Health SoC Residency", "/sys/class/power_supply/battery/swelling_data"},
{"BMS", "/dev/logbuffer_ssoc"},
{"TTF", "/dev/logbuffer_ttf"},
{"TTF details", "/sys/class/power_supply/battery/ttf_details"},
@@ -285,7 +291,7 @@ void dumpBatteryDefend() {
sort(files.begin(), files.end());
for (auto &file : files) {
fileLocation = std::string(config[1]) + std::string(file);
- if (!android::base::ReadFileToString(fileLocation, &content)) {
+ if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
content = "\n";
}
printf("%s: %s", file.c_str(), content.c_str());
@@ -295,15 +301,150 @@ void dumpBatteryDefend() {
files.clear();
}
}
+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;
+ std::string content;
+ struct dirent *entry;
+ DIR *dir = opendir(debugfs.c_str());
+ if (dir == NULL)
+ return;
+
+ printTitle((debugfs + std::string(strMatch) + "/" + std::string(info)).c_str());
+ while ((entry = readdir(dir)) != NULL)
+ if (std::string(entry->d_name).find(strMatch) != std::string::npos)
+ files.push_back(entry->d_name);
+ closedir(dir);
+
+ sort(files.begin(), files.end());
+
+ for (auto &file : files) {
+ std::string fileDirectory = debugfs + file;
+ std::string fileLocation = fileDirectory + "/" + std::string(info);
+ if (!android::base::ReadFileToString(fileLocation, &content)) {
+ content = "\n";
+ }
+
+ printf("%s:\n%s", fileDirectory.c_str(), content.c_str());
+
+ if (content.back() != '\n')
+ printf("\n");
+ }
+ files.clear();
+}
+void dumpChg() {
+ const std::string pmic_bus = "/sys/devices/platform/10d60000.hsi2c/i2c-13/13-0066";
+ const char* chg_reg_dump_file = "/sys/class/power_supply/main-charger/device/registers_dump";
+ const std::string chg_name_cmd = "/sys/class/power_supply/main-charger/device/name";
+ const std::string pmic_name_cmd = pmic_bus + "/name";
+ const std::string pmic_reg_dump_file = pmic_bus + "/registers_dump";
+ const std::string reg_dump_str = " registers dump";
+ const char* chgConfig [][2] {
+ {"DC_registers dump", "/sys/class/power_supply/pca94xx-mains/device/registers_dump"},
+ };
+ std::string chg_name;
+ std::string pmic_name;
+
+ printf("\n");
+
+ int ret = android::base::ReadFileToString(chg_name_cmd, &chg_name);
+ if (ret && !chg_name.empty()) {
+ chg_name.erase(chg_name.length() - 1); // remove new line
+ const std::string chg_reg_dump_title = chg_name + reg_dump_str;
+
+ /* CHG reg dump */
+ dumpFileContent(chg_reg_dump_title.c_str(), chg_reg_dump_file);
+ }
+
+ ret = android::base::ReadFileToString(pmic_name_cmd, &pmic_name);
+ if (ret && !pmic_name.empty()) {
+ pmic_name.erase(pmic_name.length() - 1); // remove new line
+ const std::string pmic_reg_dump_title = pmic_name + reg_dump_str;
+
+ /* PMIC reg dump */
+ dumpFileContent(pmic_reg_dump_title.c_str(), pmic_reg_dump_file.c_str());
+ }
+
+ for (auto &config : chgConfig) {
+ dumpFileContent(config[0], config[1]);
+ }
+}
+void dumpChgUserDebug() {
+ const std::string debugfs = "/d/";
+ const char *maxFgDir = "/d/maxfg";
+ const char *maxFgStrMatch = "maxfg";
+ const char *maxBaseFgDir = "/d/maxfg_base";
+ const char *maxBaseFgStrMatch = "maxfg_base";
+ const char *chgTblName = "Charging table dump";
+ const char *chgTblDir = "/d/google_battery/chg_raw_profile";
+
+ const char *maxFgInfo [] {
+ "fg_model",
+ "algo_ver",
+ "model_ok",
+ };
+
+ if (isUserBuild())
+ return;
+
+ dumpFileContent(chgTblName, chgTblDir);
+
+ if (isValidDir(maxFgDir)) {
+ for (auto & directory : maxFgInfo) {
+ printValuesOfDirectory(directory, debugfs, maxFgStrMatch);
+ }
+ } else if (isValidDir(maxBaseFgDir)) {
+ for (auto & directory : maxFgInfo) {
+ printValuesOfDirectory(directory, debugfs, maxBaseFgStrMatch);
+ }
+ }
+}
void dumpBatteryEeprom() {
const char *title = "Battery EEPROM";
const char *files[] {
- "/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom",
- "/sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom",
- "/sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom",
- "/sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom",
- "/sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom",
- "/sys/devices/platform/10c90000.hsi2c/i2c-6/6-0050/eeprom",
+ "/sys/devices/platform/10da0000.hsi2c/i2c-15/15-0050/eeprom",
};
std::string result;
std::string xxdCmd;
@@ -329,7 +470,7 @@ void dumpChargerStats() {
std::string content;
struct dirent *entry;
dumpFileContent(chgStatsTitle, chgStatsLocation);
- if (!isUserBuild())
+ if (isUserBuild())
return;
for (auto &stat : chargerStats) {
DIR *dir = opendir(stat[1]);
@@ -374,7 +515,7 @@ void dumpGvoteables() {
std::string content;
std::vector files;
int ret;
- if (!isUserBuild())
+ if (isUserBuild())
return;
ret = getFilesInDir(directory, &files);
if (ret < 0)
@@ -662,10 +803,11 @@ int main() {
dumpLogBufferTcpm();
dumpTcpc();
dumpPdEngine();
- dumpWc68();
- dumpLn8411();
dumpBatteryHealth();
dumpBatteryDefend();
+ dumpBatteryCaretaker();
+ dumpChg();
+ dumpChgUserDebug();
dumpBatteryEeprom();
dumpChargerStats();
dumpWlcLogs();
diff --git a/health/android.hardware.health-service.gs201.xml b/health/android.hardware.health-service.gs201.xml
index 2acaabac..8ddfbdaa 100644
--- a/health/android.hardware.health-service.gs201.xml
+++ b/health/android.hardware.health-service.gs201.xml
@@ -1,7 +1,7 @@
android.hardware.health
- 3
+ 4
IHealth/default
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 47cada84..103ff202 100644
--- a/task_profiles.json
+++ b/task_profiles.json
@@ -15,21 +15,6 @@
}
]
},
- {
- "Name": "PreferIdle",
- "Actions": [
- {
- "Name": "WriteFile",
- "Params":
- {
- "FilePath": "/proc/vendor_sched/prefer_idle_set",
- "ProcFilePath": "/proc/vendor_sched/prefer_idle_set",
- "Value": "",
- "LogFailures": "false"
- }
- }
- ]
- },
{
"Name": "CameraServicePerformance",
"Actions": [
@@ -174,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": [
@@ -265,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": [
@@ -292,6 +488,19 @@
}
}
]
+ },
+ {
+ "Name": "HighestCfsPrioScheduling",
+ "Actions": [
+ {
+ "Name": "SetSchedulerPolicy",
+ "Params":
+ {
+ "Policy": "SCHED_OTHER",
+ "Nice": "-20"
+ }
+ }
+ ]
}
],
@@ -302,11 +511,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": [ "MaxPerformance", "ResetUclampGrp", "PreferIdle" ]
+ "Profiles": [ "HighestCfsPrioScheduling", "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME_SET" ]
}
]
}
diff --git a/wifi/qcom/BoardConfig-wifi.mk b/wifi/qcom/BoardConfig-wifi.mk
index 4bd72107..18fc6d5d 100644
--- a/wifi/qcom/BoardConfig-wifi.mk
+++ b/wifi/qcom/BoardConfig-wifi.mk
@@ -19,8 +19,9 @@ LOCAL_WIFI_PATH := device/google/gs201/wifi/qcom
# wlan flags
BOARD_WLAN_DEVICE := qcwcn
BOARD_WLAN_CHIP := wcn6740
-BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
-BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
+# Use full namespace path for both BOARD_WPA_SUPPLICANT_PRIVATE_LIB and BOARD_HOSTAPD_PRIVATE_LIB due to wlan module for sw5100 has its own namespace.
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := //hardware/qcom/wlan/wcn6740/qcwcn/wpa_supplicant_8_lib:lib_driver_cmd_$(BOARD_WLAN_DEVICE)
+BOARD_HOSTAPD_PRIVATE_LIB := //hardware/qcom/wlan/wcn6740/qcwcn/wpa_supplicant_8_lib:lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_HOSTAPD_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X