[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lt3p3hqh657rx7knpvoxl5il7uohrcllmi5lk432st6nap3vqa@jkgpj2rb6daa>
Date: Sun, 25 May 2025 16:27:40 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Maulik Shah <maulik.shah@....qualcomm.com>
Cc: 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>, 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>
Subject: Re: [PATCH v3 2/3] soc: qcom: qcom_stats: Add QMP support for
syncing ddr stats
On Sun, May 25, 2025 at 02:25:58PM +0530, Maulik Shah wrote:
> 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 <maulik.shah@....qualcomm.com>
> ---
> drivers/soc/qcom/qcom_stats.c | 34 +++++++++++++++++++++++++++++++++-
> 1 file changed, 33 insertions(+), 1 deletion(-)
>
> @@ -310,6 +329,19 @@ static int qcom_stats_probe(struct platform_device *pdev)
> qcom_create_subsystem_stat_files(root, config);
> qcom_create_soc_sleep_stat_files(root, reg, d, config);
> qcom_create_ddr_stat_files(root, reg, config);
> + /*
> + * QMP is used for DDR stats syncing to MSG RAM for recent SoCs (SM8450 onwards).
> + * The prior SoCs do not need QMP handle as the required stats are already present
> + * in MSG RAM, provided the DDR_STATS_MAGIC_KEY matches.
> + */
> + qcom_stats_qmp = qmp_get(&pdev->dev);
> + if (IS_ERR(qcom_stats_qmp)) {
> + if (PTR_ERR(qcom_stats_qmp) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> +
> + /* We assume any other error means it's not defined/needed */
> + qcom_stats_qmp = NULL;
If you return here, who will cleanup your actions? At least you've
registered debugfs files...
> + }
>
> platform_set_drvdata(pdev, root);
>
>
> --
> 2.34.1
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists