[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230613162854.ng65n5fpm4ndag6w@mercury.elektranox.org>
Date: Tue, 13 Jun 2023 18:28:54 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: linux-rockchip@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, Heiko Stuebner <heiko@...ech.de>,
Kyungmin Park <kyungmin.park@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>, kernel@...gutronix.de,
Michael Riesch <michael.riesch@...fvision.net>,
Robin Murphy <robin.murphy@....com>,
Vincent Legoll <vincent.legoll@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v5 05/25] PM / devfreq: rockchip-dfi: dfi store raw
values in counter struct
Hi,
On Wed, May 24, 2023 at 10:31:33AM +0200, Sascha Hauer wrote:
> When adding perf support to the DFI driver the perf part will
> need the raw counter values, so move the fixed * 4 factor to
> rockchip_dfi_get_event().
>
> Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> ---
Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.com>
-- Sebastian
> drivers/devfreq/event/rockchip-dfi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
> index 6b1ef29df7048..680f629da64fc 100644
> --- a/drivers/devfreq/event/rockchip-dfi.c
> +++ b/drivers/devfreq/event/rockchip-dfi.c
> @@ -97,7 +97,7 @@ static int rockchip_dfi_get_busier_ch(struct devfreq_event_dev *edev)
> /* Find out which channel is busier */
> for (i = 0; i < RK3399_DMC_NUM_CH; i++) {
> dfi->ch_usage[i].access = readl_relaxed(dfi_regs +
> - DDRMON_CH0_DFI_ACCESS_NUM + i * 20) * 4;
> + DDRMON_CH0_DFI_ACCESS_NUM + i * 20);
> dfi->ch_usage[i].total = readl_relaxed(dfi_regs +
> DDRMON_CH0_COUNT_NUM + i * 20);
> tmp = dfi->ch_usage[i].access;
> @@ -149,7 +149,7 @@ static int rockchip_dfi_get_event(struct devfreq_event_dev *edev,
>
> busier_ch = rockchip_dfi_get_busier_ch(edev);
>
> - edata->load_count = dfi->ch_usage[busier_ch].access;
> + edata->load_count = dfi->ch_usage[busier_ch].access * 4;
> edata->total_count = dfi->ch_usage[busier_ch].total;
>
> return 0;
> --
> 2.39.2
>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists