From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755356AbbCRHoF (ORCPT ); Wed, 18 Mar 2015 03:44:05 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:31614 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755053AbbCRHoB (ORCPT ); Wed, 18 Mar 2015 03:44:01 -0400 X-AuditID: cbfee68d-f79296d000004278-ea-55092cc0b7f3 Date: Wed, 18 Mar 2015 07:44:00 +0000 (GMT) From: MyungJoo Ham Subject: Re: Re: [PATCH v6 5/8] PM / devfreq: tegra: remove operating-points To: Tomeu Vizoso Cc: "linux-tegra@vger.kernel.org" , Mikko Perttunen , =?utf-8?Q?=EB=B0=95=EA=B2=BD=EB=AF=BC?= , Stephen Warren , Thierry Reding , Alexandre Courbot , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Reply-to: myungjoo.ham@samsung.com MIME-version: 1.0 X-MTR: 20150318073447125@myungjoo.ham Msgkey: 20150318073447125@myungjoo.ham X-EPLocale: ko_KR.utf-8 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150318073447125@myungjoo.ham X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-type: text/plain; charset=utf-8 MIME-version: 1.0 Message-id: <1195991181.289821426664636507.JavaMail.weblogic@epmlwas07d> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrIIsWRmVeSWpSXmKPExsWyRsSkQPeADmeowbpGfovLu+awOTB6fN4k F8AYxWWTkpqTWZZapG+XwJVx5gJ7wQb+ih8/PrM1MP7g62Lk5BASUJdYtOQkG4gtIWAi8f3F BHYIW0ziwr31QHEuoJqljBIPNsxmgilqm/qfEaJ5DqPEHYhmFgFViWmXbwHZHBxsAnoSMz8n g4SFBX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Lcy+xQ9i8EjPan7JA2HIS076u YYawpSXOz9oAd/Li74+h4vwSx27vgJojIDH1zEGoGi2JOY1voeJ8EmsWvmWBqd91ajkzzK77 W+ZC1UhIbG15wgpiMwsoSkzpfsgOcjKzgKbE+l36qD4BsT0kLrc9YZrAKDsLSWoWku5ZCN3I ShYwsqxiFE0tSC4oTkqvMNYrTswtLs1L10vOz93ECE4/zxbvYPx/3voQowAHoxIPr8RVjlAh 1sSy4srcQ4wSHMxKIry53JyhQrwpiZVVqUX58UWlOanFhxhNgVE2kVlKNDkfmBrzSuINjY1N zExMLU0sDEzNlcR5/5/LDRESSE8sSc1OTS1ILYLpY+LglGpgNLi7ag1/67GpYfsubFk4v+Kd gsyPoEP//k2JSnUV5z14WkNM8rv6wVexXZWvtt17d2OVkC9HDn9dCHNjaZuC5g27p5FGuXLy IinX486X3/Q86TMlljdRI2jvy+ULFJT+7PjrNSWfZf3lBbeFlmlkvJC5/sd5S+rUpGW307/8 /bGgorRkmcZLFyWW4oxEQy3mouJEAAQxs2BVAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t2I7iBGV007364 > On 18 March 2015 at 06:23, MyungJoo Ham wrote: > >> As the DT bindings don't have an operating-points property any more, > >> build the OPP table from the frequencies supported by the EMC clock. > >> > >> Signed-off-by: Tomeu Vizoso > >> --- [] > >> > >> + for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) { > >> + rate = clk_round_rate(tegra->emc_clock, rate); > >> + dev_pm_opp_add(&pdev->dev, rate, 0); > >> + } > >> + > > > > Although I am not going to NACK for the single-time performance of a > > single device driver for a device that I do not have or fully understand, > > please note that you may be wasting several billion cycles unless > > your product is running at MHZ/kHZ level. > > > > What is going on with this loop? Do you really have such a virtually-continuous > > frequency scaling in your product? (Wow.... but in such a case, I don't think > > OPP is appropriate.) > > Actually, that loop is expected to only execute as many times as > frequencies are supported by the clock. This is using knowledge of the > clock always rounding up when possible, which I think is fine in this > case. Ah. ok. you are using "clk_frac_div_round_rate" of drivers/clk/tegra/clk-divider.c (DIV_ROUND_UP) Great. Thanks for the clarification. Cheers, MyungJoo > > Regards, > > Tomeu > {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I