[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250528-ddr_stats_-v4-0-b4b7dae072dc@oss.qualcomm.com>
Date: Wed, 28 May 2025 14:51:30 +0530
From: Maulik Shah <maulik.shah@....qualcomm.com>
To: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org,
Marijn Suijten <marijn.suijten@...ainline.org>,
Doug Anderson <dianders@...omium.org>,
Maulik Shah <maulik.shah@....qualcomm.com>
Subject: [PATCH v4 0/3] soc: qcom: qcom_stats: Add DDR stats
This series adds support to read various DDR low power mode and frequency
stats. This was added in past with series [1] but reverted with [4] due
to some SoCs boot up failures. This series is more aligned to downstream
implementation and fixes the issues mentioned in [4].
The series [1] tried to add three feature support
A. Reading DDR Frequency and low power stats from MSG RAM
(targets where DDR stats are readily available in MSG RAM to read)
B. Trigger QMP to ask AOP to populate DDR Frequency and low power stats
(targets where DDR stats are available but duration field syncing
requires QMP message to be sent to AOP)
C. Trigger QMP to ask AOP to populate DDR vote table information
(To read different DRV / Direct Resource Voter, CPUSS, DSPs's votes
for DDR frequency)
Current series do not include reading the DDR vote table information (C)
part from [1] which is to be separately sent potentially including reading
other resources votes like Cx Rail level vote information. These vote
tables details are not strictly related to DDR Frequency and low power
stats (A) and (B) this series is adding.
This series updates respective SoC devicetree with QMP handle (where DDR
stats syncing is required) and it is backward compatible with older
devicetree as without the QMP handle present, ddr stats can be still be
read (duration field will be read as 0).
Note that [1] was only partially reverted and hence device binding update
for QMP handle [2] is already present along with the fix to have
dependency on AOSS QMP driver in Kconfig [3].
[1] https://lore.kernel.org/all/20231130-topic-ddr_sleep_stats-v1-0-5981c2e764b6@linaro.org/
[2] https://lore.kernel.org/all/20231130-topic-ddr_sleep_stats-v1-2-5981c2e764b6@linaro.org/
[3] https://lore.kernel.org/lkml/20231205-qcom_stats-aoss_qmp-dependency-v1-1-8dabe1b5c32a@quicinc.com/T/
[4] https://lore.kernel.org/all/20231214-topic-undo_ddr_stats-v1-1-1fe32c258e56@linaro.org/
Signed-off-by: Maulik Shah <maulik.shah@....qualcomm.com>
---
Changes in v4:
- Handle clean up for qmp_get() probe defer case
- Link to v3: https://lore.kernel.org/r/20250525-ddr_stats_-v3-0-49a3c1e42db7@oss.qualcomm.com
Changes in v3:
- Use correct format specifiers
- Handle qmp_get() failure cases
- Link to v2: https://lore.kernel.org/r/20250521-ddr_stats_-v2-0-2c54ea4fc071@oss.qualcomm.com
Changes in v2:
- Mention count in decimal instead of hex
- Update read failure cases to return error code instead of success
- Fix typo in comment
- Link to v1: https://lore.kernel.org/r/20250429-ddr_stats_-v1-0-4fc818aab7bb@oss.qualcomm.com
---
Maulik Shah (3):
soc: qcom: qcom_stats: Add support to read DDR statistic
soc: qcom: qcom_stats: Add QMP support for syncing ddr stats
arm64: dts: qcom: Add QMP handle for qcom_stats
arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 +
arch/arm64/boot/dts/qcom/sm8550.dtsi | 1 +
arch/arm64/boot/dts/qcom/sm8650.dtsi | 1 +
arch/arm64/boot/dts/qcom/sm8750.dtsi | 1 +
drivers/soc/qcom/qcom_stats.c | 131 +++++++++++++++++++++++++++++++++++
5 files changed, 135 insertions(+)
---
base-commit: 393d0c54cae31317deaa9043320c5fd9454deabc
change-id: 20250426-ddr_stats_-391505b3da6a
Best regards,
--
Maulik Shah <maulik.shah@....qualcomm.com>
Powered by blists - more mailing lists