<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/soc/qcom/qcom_stats.c, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-06-17T14:12:08+00:00</updated>
<entry>
<title>soc: qcom: qcom_stats: Add QMP support for syncing ddr stats</title>
<updated>2025-06-17T14:12:08+00:00</updated>
<author>
<name>Maulik Shah</name>
<email>maulik.shah@oss.qualcomm.com</email>
</author>
<published>2025-06-11T06:03:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e265de1f4815c05803e02fed20a093114e418c46'/>
<id>urn:sha1:e265de1f4815c05803e02fed20a093114e418c46</id>
<content type='text'>
Recent SoCs (SM8450 onwards) require QMP command to be sent before reading
ddr stats. The duration field of ddr stats will get populated only if QMP
command is sent.

Add support to send ddr stats freqsync QMP command.

Signed-off-by: Maulik Shah &lt;maulik.shah@oss.qualcomm.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250611-ddr_stats_-v5-2-24b16dd67c9c@oss.qualcomm.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: qcom_stats: Add support to read DDR statistic</title>
<updated>2025-06-17T14:12:08+00:00</updated>
<author>
<name>Maulik Shah</name>
<email>maulik.shah@oss.qualcomm.com</email>
</author>
<published>2025-06-11T06:03:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33301e5b2aeccb1208ddb2d1cc93c9c6c520a0b6'/>
<id>urn:sha1:33301e5b2aeccb1208ddb2d1cc93c9c6c520a0b6</id>
<content type='text'>
DDR statistic provide different DDR LPM and DDR frequency statistic.
Add support to read from MSGRAM and display via debugfs.

Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Signed-off-by: Maulik Shah &lt;maulik.shah@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250611-ddr_stats_-v5-1-24b16dd67c9c@oss.qualcomm.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: Switch back to struct platform_driver::remove()</title>
<updated>2024-11-01T16:08:57+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-29T07:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=511c06e3903563dba4472430e1b586745b6ae238'/>
<id>urn:sha1:511c06e3903563dba4472430e1b586745b6ae238</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/soc to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

On the way do a few whitespace changes to make indention consistent.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Herve Codina &lt;herve.codina@bootlin.com&gt; # for fsl/qe/{qmc,tsa}.c
Acked-by: Bjorn Andersson &lt;andersson@kernel.org&gt; # qcom parts
Acked-by: Gabriel Somlo &lt;gsomlo@gmail.com&gt;
Acked-by: Andrew Jeffery &lt;andrew@codeconstruct.com.au&gt; # aspeed
Link: https://lore.kernel.org/r/20241029074859.509587-2-u.kleine-koenig@baylibre.com
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>soc: qcom: qcom_stats: Add DSPs and apss subsystem stats</title>
<updated>2024-03-18T03:19:08+00:00</updated>
<author>
<name>Maulik Shah</name>
<email>quic_mkshah@quicinc.com</email>
</author>
<published>2024-02-15T09:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8627c303fd34ab70ff6fd8a1048ac11035b7fd6'/>
<id>urn:sha1:f8627c303fd34ab70ff6fd8a1048ac11035b7fd6</id>
<content type='text'>
Add SMEM items for compute, general purpose DSPs and application processor
subsystem stats.

Signed-off-by: Maulik Shah &lt;quic_mkshah@quicinc.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20240215-qcom_stats-v1-1-4a2cf83d0bdd@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: qcom_stats: Convert to platform remove callback returning void</title>
<updated>2023-10-02T18:30:22+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-25T09:55:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a47ff90bf2f93ce4ca99858948a74a0c10a2bc45'/>
<id>urn:sha1:a47ff90bf2f93ce4ca99858948a74a0c10a2bc45</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt; # qcom
Link: https://lore.kernel.org/r/20230925095532.1984344-25-u.kleine-koenig@pengutronix.de
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: stats: Populate all subsystem debugfs files</title>
<updated>2023-02-06T20:13:30+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2023-01-19T03:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=acdbf5f9b2c492505145f6e50c65418521a547c4'/>
<id>urn:sha1:acdbf5f9b2c492505145f6e50c65418521a547c4</id>
<content type='text'>
This driver relies on SMEM to populate items for each subsystem before
the device probes. The items in SMEM that are being looked for are
populated by the subsystems lazily, and therefore may not exist until
the device has booted. For example, if I build this driver into the
kernel on Trogdor Lazor and boot up, I don't see a 'modem' debugfs file
populated, because the modem boots and populates the SMEM item after
this driver probes.

Always populate the files for the subsystems if they're in SMEM, and
make the qcom_subsystem_sleep_stats_show() function return 0 if the SMEM
items still isn't there. This way we can run a simple command like

	grep ^ /sys/kernel/debug/qcom_stats/*

and collect the subsystem sleep stats without interspersed errors or
missing details entirely because this driver probed first.

Fixes: 1d7724690344 ("soc: qcom: Add Sleep stats driver")
Cc: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20230119032329.2909383-1-swboyd@chromium.org
</content>
</entry>
<entry>
<title>soc: qcom: stats: Mark device as having no PM support</title>
<updated>2022-10-17T22:58:15+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2022-10-15T00:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=367b9c70e9b25fe9ad5346b0f3544682d8b112b9'/>
<id>urn:sha1:367b9c70e9b25fe9ad5346b0f3544682d8b112b9</id>
<content type='text'>
This driver purely exposes information from memory to the kernel. Let's
mark it as not having any device PM functionality, so that during
suspend we skip even trying to call a suspend function on this device.
This clears up suspend logs more than anything else, but it also shaves
a few cycles off suspend.

Cc: Konrad Dybcio &lt;konrad.dybcio@somainline.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20221015004934.3930651-2-swboyd@chromium.org
</content>
</entry>
<entry>
<title>soc: qcom: stats: Add SDM845 stats config and compatible</title>
<updated>2022-08-29T21:38:52+00:00</updated>
<author>
<name>Abel Vesa</name>
<email>abel.vesa@linaro.org</email>
</author>
<published>2022-08-12T10:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0425c5c6ebb2388074ea18460199547f076cbf60'/>
<id>urn:sha1:0425c5c6ebb2388074ea18460199547f076cbf60</id>
<content type='text'>
SDM845 is a special case compared to the other platforms that use RPMh
stats, since it only has 2 stats (aosd and cxsd), while the others have
a 3rd one (ddr).

So lets add dedicated stats config and compatible for SDM845 to make the
driver aware of this num_records difference.

Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20220812101240.1869605-2-abel.vesa@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: stats: Add fixed sleep stats offset for older RPM firmwares</title>
<updated>2021-12-21T01:10:09+00:00</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan@gerhold.net</email>
</author>
<published>2021-11-19T21:39:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=708dbf4490c8ddf55d79b9f3855219b92d108760'/>
<id>urn:sha1:708dbf4490c8ddf55d79b9f3855219b92d108760</id>
<content type='text'>
Not all RPM firmware versions have the dynamic sleep stats offset
available. Most older versions use a fixed offset of 0xdba0.
Add support for this using new SoC-specific compatibles for APQ8084,
MSM8226, MSM8916 and MSM8974.

Even older SoCs seem to use a different offset and stats format.
If needed those could be supported in the future by adding separate
compatibles for those with a different stats_config.

Cc: Maulik Shah &lt;mkshah@codeaurora.org&gt;
Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211119213953.31970-3-stephan@gerhold.net
</content>
</entry>
<entry>
<title>soc: qcom: qcom_stats: Fix client votes offset</title>
<updated>2021-10-24T04:35:42+00:00</updated>
<author>
<name>Maulik Shah</name>
<email>mkshah@codeaurora.org</email>
</author>
<published>2021-10-20T08:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62563bd99c7d7be269982b88173ad8938420d648'/>
<id>urn:sha1:62563bd99c7d7be269982b88173ad8938420d648</id>
<content type='text'>
Client votes starts at 0x20 offset. Correct the offset.

Reported-and-suggested-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Fixes: 1d7724690344 ("soc: qcom: Add Sleep stats driver")
Signed-off-by: Maulik Shah &lt;mkshah@codeaurora.org&gt;
Reviewed-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/1634719753-26064-1-git-send-email-mkshah@codeaurora.org
</content>
</entry>
</feed>
