From ecb02c9cc0828645818ac5df835e348eaeba7bc5 Mon Sep 17 00:00:00 2001 From: Doug Zobel Date: Wed, 25 Jan 2023 09:57:06 -0600 Subject: [PATCH] pixelstats: Configure PCIe link stats pathnames and access Test: adb logcat "pixelstats-vendor:D *:S" Bug: 266689144 Change-Id: Ie528c3273e43e0a3401449a057eeb9c7e6004ecf Signed-off-by: Doug Zobel --- conf/init.zuma.rc | 10 ++++++++++ pixelstats/service.cpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index 02bee631..debcff15 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -306,6 +306,16 @@ on init write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/ratio_ceil 3700 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/mem_latency/ratio_ceil 3400 + # Give pixelstats group access to PCIe link statistics counters + chown system system /sys/devices/platform/12100000.pcie/link_stats/complete_timeout_irqs + chown system system /sys/devices/platform/12100000.pcie/link_stats/link_down_irqs + chown system system /sys/devices/platform/12100000.pcie/link_stats/link_recovery_failures + chown system system /sys/devices/platform/12100000.pcie/link_stats/link_up_failures + chown system system /sys/devices/platform/13120000.pcie/link_stats/complete_timeout_irqs + chown system system /sys/devices/platform/13120000.pcie/link_stats/link_down_irqs + chown system system /sys/devices/platform/13120000.pcie/link_stats/link_recovery_failures + chown system system /sys/devices/platform/13120000.pcie/link_stats/link_up_failures + on post-fs # Ensure device is ready and start storageproxyd wait /dev/sg1 diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index 723bfbc8..b7af4c44 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -59,6 +59,8 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = { UFS_ERR_PATH(auto_hibern8_err_count) }, .AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once", + .ModemPcieLinkStatsPath = "/sys/devices/platform/12100000.pcie/link_stats", + .WifiPcieLinkStatsPath = "/sys/devices/platform/13120000.pcie/link_stats" }; const struct UeventListener::UeventPaths ueventPaths = {