diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-04 02:02:17 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-04 02:02:17 +0000 |
commit | 1b7bab0c4f5a80b5f0b9db4feaeba72c1648c3fb (patch) | |
tree | 913a4eedbff8d97304c3d97ac7a92efdf9652563 | |
parent | dba482981b8defd02a51ea1a073c3fab247be77e (diff) | |
parent | bf79debcb284d985c4ac33d88aeb2d7b938acd9e (diff) |
Snap for 9562233 from bf79debcb284d985c4ac33d88aeb2d7b938acd9e to tm-qpr3-release
Change-Id: Ibde4cebfef0fe00b664fe673fd4fa43967cade4e
-rw-r--r-- | conf/init.gs201.rc | 2 | ||||
-rw-r--r-- | dumpstate/Dumpstate.cpp | 31 | ||||
-rw-r--r-- | dumpstate/Dumpstate.h | 1 | ||||
-rw-r--r-- | usb/gadget/UsbGadget.h | 4 | ||||
-rw-r--r-- | usb/gadget/android.hardware.usb.gadget-service.rc | 1 |
5 files changed, 30 insertions, 9 deletions
diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index af2dac6b..2e6ca3c0 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -482,6 +482,8 @@ on early-boot chown system system /dev/logbuffer_cpm chown system system /dev/logbuffer_bd chown system system /dev/logbuffer_dual_batt + chown system system /dev/logbuffer_pcie0 + chown system system /dev/logbuffer_pcie1 on boot diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 41292eab..b85f12dc 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -244,6 +244,7 @@ Dumpstate::Dumpstate() { "led", [this](int fd) { dumpLEDSection(fd); } }, { "pixel-trace", [this](int fd) { dumpPixelTraceSection(fd); } }, { "perf-metrics", [this](int fd) { dumpPerfMetricsSection(fd); } }, + { "pcie", [this](int fd) { dumpPCIeSection(fd); } }, }, mLogSections{ { "modem", [this](int fd, const std::string &destDir) { dumpModemLogs(fd, destDir); } }, @@ -1058,15 +1059,24 @@ void Dumpstate::dumpStorageSection(int fd) { // Dump items related to display void Dumpstate::dumpDisplaySection(int fd) { - DumpFileToFd(fd, "CRTC-0 underrun count", "/sys/kernel/debug/dri/0/crtc-0/underrun_cnt"); - DumpFileToFd(fd, "CRTC-0 crc count", "/sys/kernel/debug/dri/0/crtc-0/crc_cnt"); - DumpFileToFd(fd, "CRTC-0 ecc count", "/sys/kernel/debug/dri/0/crtc-0/ecc_cnt"); - DumpFileToFd(fd, "CRTC-0 idma err count", "/sys/kernel/debug/dri/0/crtc-0/idma_err_cnt"); + // Dump counters for decon drivers + const std::string decon_device_sysfs_path("/sys/class/drm/card0/device/"); + for(int i = 0; i <= 2; ++i){ + const std::string decon_num_str = std::to_string(i); + const std::string decon_counter_path = decon_device_sysfs_path + + "decon" + decon_num_str + + "/counters"; + if (access(decon_counter_path.c_str(), R_OK) == 0){ + DumpFileToFd(fd, "DECON-" + decon_num_str + " counters", + decon_counter_path); + } + else{ + ::android::base::WriteStringToFd("No counters for DECON-" + + decon_num_str + " found at path (" + decon_counter_path + ")\n", + fd); + } + } DumpFileToFd(fd, "CRTC-0 event log", "/sys/kernel/debug/dri/0/crtc-0/event"); - DumpFileToFd(fd, "CRTC-1 underrun count", "/sys/kernel/debug/dri/0/crtc-1/underrun_cnt"); - DumpFileToFd(fd, "CRTC-1 crc count", "/sys/kernel/debug/dri/0/crtc-1/crc_cnt"); - DumpFileToFd(fd, "CRTC-1 ecc count", "/sys/kernel/debug/dri/0/crtc-1/ecc_cnt"); - DumpFileToFd(fd, "CRTC-1 idma err count", "/sys/kernel/debug/dri/0/crtc-1/idma_err_cnt"); DumpFileToFd(fd, "CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event"); RunCommandToFd(fd, "libdisplaycolor", {"/vendor/bin/dumpsys", "displaycolor", "-v"}, CommandOptions::WithTimeout(2).Build()); @@ -1197,6 +1207,11 @@ void Dumpstate::dumpLEDSection(int fd) { } } +void Dumpstate::dumpPCIeSection(int fd) { + DumpFileToFd(fd, "PCIe0 Logs", "/dev/logbuffer_pcie0"); + DumpFileToFd(fd, "PCIe1 Logs", "/dev/logbuffer_pcie1"); +} + void Dumpstate::dumpModemSection(int fd) { DumpFileToFd(fd, "Modem Stat", "/data/vendor/modem_stat/debug.txt"); RunCommandToFd(fd, "Modem SSR history", {"/vendor/bin/sh", "-c", diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h index 805c1cbd..b13061fa 100644 --- a/dumpstate/Dumpstate.h +++ b/dumpstate/Dumpstate.h @@ -72,6 +72,7 @@ class Dumpstate : public BnDumpstateDevice { void dumpLEDSection(int fd); void dumpPixelTraceSection(int fd); void dumpPerfMetricsSection(int fd); + void dumpPCIeSection(int fd); void dumpLogSection(int fd, int fdModem); diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h index 61e6e798..f036c8e0 100644 --- a/usb/gadget/UsbGadget.h +++ b/usb/gadget/UsbGadget.h @@ -79,7 +79,9 @@ constexpr char kSmpAffinityList[] = "/smp_affinity_list"; #ifndef UDC_PATH #define UDC_PATH "/sys/class/udc/11210000.dwc3/" #endif -static MonitorFfs monitorFfs(kGadgetName); +constexpr char kExtconTypecState[] = "/sys/class/extcon/extcon0/cable.0/state"; +constexpr char kUsbGadgetState[] = "/sys/devices/platform/11210000.usb/dwc3_exynos_gadget_state"; +static MonitorFfs monitorFfs(kGadgetName, kExtconTypecState, kUsbGadgetState); #define SPEED_PATH UDC_PATH "current_speed" diff --git a/usb/gadget/android.hardware.usb.gadget-service.rc b/usb/gadget/android.hardware.usb.gadget-service.rc index e3c3b0db..0395862d 100644 --- a/usb/gadget/android.hardware.usb.gadget-service.rc +++ b/usb/gadget/android.hardware.usb.gadget-service.rc @@ -10,6 +10,7 @@ on post-fs chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id + chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_gadget_state chown root system /sys/devices/platform/11210000.usb/usb_data_enabled chmod 664 /sys/class/typec/port0/power_role chmod 664 /sys/class/typec/port0/data_role |