summaryrefslogtreecommitdiff
path: root/dumpstate/DumpstateDevice.cpp
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 /dumpstate/DumpstateDevice.cpp
parent892761671713aa24ba71c3ff80417e2c4e2c712e (diff)
parent5e713fa131dc314d423f17c774646a10c220c611 (diff)
Snap for 9562233 from 5e713fa131dc314d423f17c774646a10c220c611 to tm-qpr3-release
Change-Id: Ia1866fa20f17b8dce310acca8e18914c19309890
Diffstat (limited to 'dumpstate/DumpstateDevice.cpp')
-rw-r--r--dumpstate/DumpstateDevice.cpp25
1 files changed, 17 insertions, 8 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());