summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-04 02:02:15 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-04 02:02:15 +0000
commitf0c7ef3a7127116d0acced5342ce9779b0f2e24c (patch)
tree5548380f5fb27caa615b5f79366c4d63347ca34f
parent892761671713aa24ba71c3ff80417e2c4e2c712e (diff)
parent5e713fa131dc314d423f17c774646a10c220c611 (diff)
Snap for 9562233 from 5e713fa131dc314d423f17c774646a10c220c611 to tm-qpr3-release
Change-Id: Ia1866fa20f17b8dce310acca8e18914c19309890
-rw-r--r--dumpstate/DumpstateDevice.cpp25
-rw-r--r--usb/gadget/UsbGadget.h4
-rw-r--r--usb/gadget/android.hardware.usb.gadget-service.gs101.rc1
3 files changed, 21 insertions, 9 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index f3910326..f8ee8e3f 100644
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -945,15 +945,24 @@ void DumpstateDevice::dumpStorageSection(int fd) {
// Dump items related to display
void DumpstateDevice::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());
diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h
index 8a2f7fdd..96a356db 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/11110000.dwc3/"
#endif
-static MonitorFfs monitorFfs(kGadgetName);
+constexpr char kExtconTypecState[] = "/sys/class/extcon/extcon0/cable.0/state";
+constexpr char kUsbGadgetState[] = "/sys/devices/platform/11110000.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.gs101.rc b/usb/gadget/android.hardware.usb.gadget-service.gs101.rc
index 8fa88680..da1a3b41 100644
--- a/usb/gadget/android.hardware.usb.gadget-service.gs101.rc
+++ b/usb/gadget/android.hardware.usb.gadget-service.gs101.rc
@@ -15,6 +15,7 @@ on post-fs
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11110000.usb/usb_data_enabled
+ chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_gadget_state
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type