From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAFDDC433EF for ; Sat, 1 Jan 2022 18:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3RAf/DcqLFy7K5NFudGFPBxWBY4Pi511NAgLXtEm49s=; b=NmbV+3lyFLo9Bo iJPk4TLBS/984zvY8SDmKfqrJlG+wi/1THS8Ch7RW8/P8hdIQv0UCFv9cHCSEzjKy9HnXiHUCMGS+ mYJ3KQwIiXxQO39y/wd69qgIDxe11aemc2YEYHMWOC9LNfwB3AmXNt4PzISw1r0vdlB287Szzc469 dGXWTztO51IoNsYfJQi2h6mr6ev6J0k5EQST4xrKQ2FPI391zWsg8nWOM5JDfW6sl+a+rqa7moutz KhTkkY1QCxjuvYC8lu5Ipn4FwbkfG57sToGLCnHS2F2XdEVBa45Y3+lm97qgpAZZLMNHyEJVyf+1n 3qYRer4m0rE+q18XSsCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n3j58-007IZg-20; Sat, 01 Jan 2022 18:26:18 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n3j54-007IYy-1U for linux-arm-kernel@lists.infradead.org; Sat, 01 Jan 2022 18:26:15 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 82A8AB807E9; Sat, 1 Jan 2022 18:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64770C36AEC; Sat, 1 Jan 2022 18:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641061571; bh=iqhFODTGlNWUxu0EeVN1B0a2Td/9mvJSxYqNduuXVlE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=uXa86v619nFuog2NBKL8o/O2TCN3cRhajvLGXT00ONK8T3FwS6kekCul9NXkoFiJR ToEG7wYy9NosAs6Xvi2YNL721gJKmtVGtnYk2XyYHm7S0Khnye6XGDWF/Z+zagf4L/ VNLOJr+s4/4qeJHEy3LQuKV8TarjXJnKaIxG/kuebKTccinC0dO0Kgl9QAtaXJaMDB SbMTnAvdgyw61R0FQZA9ylKcPmYCrduoyoE9fI1p3nTrHAchvKse2hRdlgM5vP/zYt L59HKluTOhQ6Hjm29WYZbpnll48EfJfx1eCxXZn3BiA+YPDAcIbK0RHu1L9Jq5DgTe mRKYKFaA05EGw== Message-ID: <048650ad-e015-3733-bdf2-72b7a0ed61e4@kernel.org> Date: Sat, 1 Jan 2022 20:26:05 +0200 MIME-Version: 1.0 Subject: Re: [PATCH v2 2/3] interconnect: imx: Add imx_icc_get_bw and imx_icc_aggregate functions Content-Language: en-US To: Abel Vesa , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Pengutronix Kernel Team , NXP Linux Team , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List References: <20220101163956.3344467-1-abel.vesa@nxp.com> <20220101163956.3344467-2-abel.vesa@nxp.com> From: Georgi Djakov In-Reply-To: <20220101163956.3344467-2-abel.vesa@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220101_102614_284964_18801937 X-CRM114-Status: GOOD ( 21.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Abel, On 1.01.22 18:39, Abel Vesa wrote: > The aggregate function will return whatever is the highest > rate for that specific node. The imx_icc_get_bw sets the Adding some more details about why we switch from icc_std_aggregate to imx_icc_aggregate would be nice. > initial avg and peak to 0 in order to avoid setting them to > INT_MAX by the interconnect core. Do we need a Fixes tag for this? I would recommend to split imx_icc_get_bw and imx_icc_aggregate changes into separate patches. These also seem to be unrelated to the imx_icc_node_adj_desc patchset. Thanks, Georgi > Signed-off-by: Abel Vesa > --- > > No changes since v1. > > drivers/interconnect/imx/imx.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c > index 34bfc7936387..4d8a2a2d2608 100644 > --- a/drivers/interconnect/imx/imx.c > +++ b/drivers/interconnect/imx/imx.c > @@ -25,6 +25,23 @@ struct imx_icc_node { > struct dev_pm_qos_request qos_req; > }; > > +static int imx_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak) > +{ > + *avg = 0; > + *peak = 0; > + > + return 0; > +} > + > +static int imx_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, > + u32 peak_bw, u32 *agg_avg, u32 *agg_peak) > +{ > + *agg_avg = max(*agg_avg, avg_bw); > + *agg_peak = max(*agg_peak, peak_bw); > + > + return 0; > +} > + > static int imx_icc_node_set(struct icc_node *node) > { > struct device *dev = node->provider->dev; > @@ -233,7 +250,8 @@ int imx_icc_register(struct platform_device *pdev, > if (!provider) > return -ENOMEM; > provider->set = imx_icc_set; > - provider->aggregate = icc_std_aggregate; > + provider->get_bw = imx_icc_get_bw; > + provider->aggregate = imx_icc_aggregate; > provider->xlate = of_icc_xlate_onecell; > provider->data = data; > provider->dev = dev; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel