Re: [PATCH V7 6/6] of: unittest: Statically apply overlays using fdtoverlay

2021-02-08 Thread Viresh Kumar
On 03-02-21, 19:54, Rob Herring wrote: > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index b00855b247e0..886d2e6c58f0 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -66,6 +66,9 @@ multi-used := $(multi-used-y) $(multi-used-m) > real-obj-y := $(foreach m,

Re: drivers/opp/of.c:842:12: warning: stack frame size of 2064 bytes in function '_of_add_opp_table_v2'

2021-02-07 Thread Viresh Kumar
On 07-02-21, 04:09, kernel test robot wrote: > f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 841 /* > Initializes OPP tables based on new bindings */ > 5ed4cecd75e902 drivers/opp/of.c Viresh Kumar 2018-09-12 @842 > static int _of_add_opp_tab

Re: [PATCH V7 4/6] kbuild: Add support to build overlays (%.dtbo)

2021-02-05 Thread Viresh Kumar
On 05-02-21, 10:41, Geert Uytterhoeven wrote: > Hi Viresh, > > On Fri, Feb 5, 2021 at 10:25 AM Viresh Kumar wrote: > > On 05-02-21, 10:02, Geert Uytterhoeven wrote: > > > Thanks for your patch > > > (which I only noticed because it appeared in dt-rh/for-next ;-)

Re: [PATCH V7 4/6] kbuild: Add support to build overlays (%.dtbo)

2021-02-05 Thread Viresh Kumar
On 05-02-21, 10:02, Geert Uytterhoeven wrote: > Hi Viresh, > > Thanks for your patch > (which I only noticed because it appeared in dt-rh/for-next ;-) > > On Fri, Jan 29, 2021 at 8:31 AM Viresh Kumar wrote: > > Add support for building DT overlays (%.dtbo). T

Re: [PATCH V3 1/2] topology: Allow multiple entities to provide sched_freq_tick() callback

2021-02-05 Thread Viresh Kumar
On 03-02-21, 11:45, Ionela Voinescu wrote: > Therefore, I think system level invariance management (checks and > call to rebuild_sched_domains_energy()) also needs to move from arm64 > code to arch_topology code. Here is the 3rd patch of this series then :) From: Viresh Kumar Date: F

Re: [PATCH v6 0/3] Add required-opps support to devfreq passive gov

2021-02-04 Thread Viresh Kumar
On 04-02-21, 16:14, Hsin-Yi Wang wrote: > Saravana Kannan (3): > OPP: Add function to look up required OPP's for a given OPP > PM / devfreq: Cache OPP table reference in devfreq > PM / devfreq: Add required OPPs support to passive governor I have applied all the patches with significant

Re: [PATCH v6 3/3] PM / devfreq: Add required OPPs support to passive governor

2021-02-04 Thread Viresh Kumar
On 04-02-21, 16:14, Hsin-Yi Wang wrote: > From: Saravana Kannan > > Look at the required OPPs of the "parent" device to determine the OPP that > is required from the slave device managed by the passive governor. This > allows having mappings between a parent device and a slave device even when >

Re: [PATCH v6 2/3] PM / devfreq: Cache OPP table reference in devfreq

2021-02-04 Thread Viresh Kumar
On 04-02-21, 17:46, Chanwoo Choi wrote: > > Signed-off-by: Saravana Kannan > > Reviewed-by: Chanwoo Choi > > Acked-by: MyungJoo Ham > > Signed-off-by: Hsin-Yi Wang > > Acked-by: Chanwoo Choi I am not sure if keeping both Acked-by and Reviewed-by make sense. I am keeping Acked-by as it was

Re: [PATCH v6 1/3] OPP: Add function to look up required OPP's for a given OPP

2021-02-04 Thread Viresh Kumar
On 04-02-21, 16:14, Hsin-Yi Wang wrote: > From: Saravana Kannan > > Add a function that allows looking up required OPPs given a source OPP > table, destination OPP table and the source OPP. > > Signed-off-by: Saravana Kannan > Signed-off-by: Hsin-Yi Wang > --- > drivers/opp/core.c | 59

Re: [PATCH V7 6/6] of: unittest: Statically apply overlays using fdtoverlay

2021-02-03 Thread Viresh Kumar
On 03-02-21, 19:54, Rob Herring wrote: > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index b00855b247e0..886d2e6c58f0 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -66,6 +66,9 @@ multi-used := $(multi-used-y) $(multi-used-m) > real-obj-y := $(foreach m,

Re: [PATCH v5 1/3] OPP: Add function to look up required OPP's for a given OPP

2021-02-03 Thread Viresh Kumar
On 03-02-21, 17:23, Hsin-Yi Wang wrote: > From: Saravana Kannan > > Add a function that allows looking up required OPPs given a source OPP > table, destination OPP table and the source OPP. > > Signed-off-by: Saravana Kannan > Signed-off-by: Hsin-Yi Wang > --- > drivers/opp/core.c | 58

Re: [PATCH v5 0/3] Add required-opps support to devfreq passive gov

2021-02-03 Thread Viresh Kumar
On 03-02-21, 17:23, Hsin-Yi Wang wrote: > The devfreq passive governor scales the frequency of a "child" device based > on the current frequency of a "parent" device (not parent/child in the > sense of device hierarchy). As of today, the passive governor requires one > of the following to work

Re: [PATCH v5 3/3] PM / devfreq: Add required OPPs support to passive governor

2021-02-03 Thread Viresh Kumar
On 03-02-21, 17:24, Hsin-Yi Wang wrote: > From: Saravana Kannan > > Look at the required OPPs of the "parent" device to determine the OPP that > is required from the slave device managed by the passive governor. This > allows having mappings between a parent device and a slave device even when >

Re: [PATCH v6 13/37] cpufreq: scmi: port driver to the new scmi_perf_proto_ops interface

2021-02-03 Thread Viresh Kumar
On 02-02-21, 22:15, Cristian Marussi wrote: > Port driver to the new SCMI Perf interface based on protocol handles > and common devm_get_ops(). > > Cc: Rafael J. Wysocki > Cc: Viresh Kumar > Signed-off-by: Cristian Marussi > --- > v4 --> v5 > - using

Re: [PATCH V4 0/3] scripts: dtc: Build fdtoverlay

2021-02-03 Thread Viresh Kumar
On 01-02-21, 15:07, David Gibson wrote: > On Mon, Jan 25, 2021 at 09:42:21PM -0600, Frank Rowand wrote: > > Before having looked at libfdt only at a cursory level while debugging the > > proposed > > use of fdtoverlay in Linux, my first thought was that maybe it would be > > possible > > to add

Re: [PATCH v2 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula

2021-02-02 Thread Viresh Kumar
I am sorry but I wasn't able to get the full picture (not your fault, it is me), but ... On 22-01-21, 21:40, Giovanni Gherdovich wrote: > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index d0a3525ce27f..b96677f6b57e 100644 > --- a/drivers/cpufreq/cpufreq.c > +++

Re: [PATCH v6 13/37] cpufreq: scmi: port driver to the new scmi_perf_proto_ops interface

2021-02-02 Thread Viresh Kumar
On 02-02-21, 22:15, Cristian Marussi wrote: > Port driver to the new SCMI Perf interface based on protocol handles > and common devm_get_ops(). > > Cc: Rafael J. Wysocki > Cc: Viresh Kumar > Signed-off-by: Cristian Marussi > --- > v4 --> v5 > - using renamed devm

Re: [PATCH] mailbox: arm_mhuv2: make remove callback return void

2021-02-02 Thread Viresh Kumar
; struct mhuv2 *mhu = amba_get_drvdata(adev); > > if (mhu->frame == SENDER_FRAME) > writel_relaxed(0x0, >send->access_request); > - > - return 0; > } > > static struct amba_id mhuv2_ids[] = { Acked-by: Viresh Kumar -- viresh

Re: [PATCH] cpufreq: Judging new_policy before update related_cpus

2021-02-02 Thread Viresh Kumar
On 02-02-21, 17:36, Xuewen Yan wrote: > From: Xuewen Yan > > When the policy->related_cpus are all offline, and then > bring up one cpu, this time, if the ->online is NULL, > the code would update the ->related_cpus with ->cpus, > and now ->cpus is only one online cpu, as a result, the >

[PATCH] cpufreq: Remove unused flag CPUFREQ_PM_NO_WARN

2021-02-01 Thread Viresh Kumar
This flag is set by one of the drivers but it isn't used in the code otherwise. Remove the unused flag and update the driver. Signed-off-by: Viresh Kumar --- Rebased over: https://lore.kernel.org/lkml/a59bb322b22c247d570b70a8e94067804287623b.1612241683.git.viresh.ku...@linaro.org/ drivers

Re: [PATCH V2 3/3] opp: Add dev_pm_opp_of_add_table_noclk()

2021-02-01 Thread Viresh Kumar
On 01-02-21, 23:00, Dmitry Osipenko wrote: > 28.01.2021 10:00, Viresh Kumar пишет: > > A few drivers have device's clk but they don't want the OPP core to > > handle that. Add a new helper for them, dev_pm_opp_of_add_table_noclk(). > > > > Signed-off-by: Viresh Kumar

[PATCH V2] cpufreq: Remove CPUFREQ_STICKY flag

2021-02-01 Thread Viresh Kumar
it/arch/arm/mach-sa1100/cpu-sa1100.c?id=f59d3bbe35f6268d729f51be82af8325d62f20f5 Signed-off-by: Viresh Kumar --- V2: Detailed commit log. drivers/cpufreq/cpufreq-dt.c | 2 +- drivers/cpufreq/cpufreq.c | 3 +-- drivers/cpufreq/davinci-cpufreq.c | 2 +- drivers/cpufreq/

Re: [PATCH V2] opp: Don't ignore clk_get() errors other than -ENOENT

2021-02-01 Thread Viresh Kumar
On 01-02-21, 22:54, Dmitry Osipenko wrote: > Thanks, looks okay. > > Although, I think the previous variant of coding style was a bit more > appropriate, i.e. like this: > > dev_err_probe(dev, "%s: Couldn't find clock: %d\n", __func__, ret); > > return ERR_PTR(ret); Okay will move to that.

[PATCH] mailmap: Fix name/email for Viresh Kumar

2021-02-01 Thread Viresh Kumar
For some of the patches the email id was misspelled to linaro.com instead of linaro.org and for others Viresh Kumar was written as "viresh kumar" (all small). Fix both with help of mailmap entries. Signed-off-by: Viresh Kumar --- .mailmap | 2 ++ 1 file changed, 2 insertions(+)

Re: [PATCH] cpufreq: Remove CPUFREQ_STICKY flag

2021-02-01 Thread Viresh Kumar
On 01-02-21, 10:44, Dominik Brodowski wrote: > IIRC, it was required on various ARM systems,[*] as CPUs were registered as > subsys_initcall(), while cpufreq used to be initialized only later, as an s/later/earlier ? arch happens before subsys not at least and that is the only way we can break

[PATCH] cpufreq: Remove CPUFREQ_STICKY flag

2021-02-01 Thread Viresh Kumar
ant drivers. [1] https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/include/linux/cpufreq.h?id=7cc9f0d9a1ab04cedc60d64fd8dcf7df224a3b4d Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt.c | 2 +- drivers/cpufreq/cpufreq.c | 3 +-- drivers/cpuf

[PATCH 2/2] opp: Replace ENOTSUPP with EOPNOTSUPP

2021-01-31 Thread Viresh Kumar
Checkpatch gives following warning for new patches, and the new patches normally follow the existing standards for such stuff. Lets fix it properly. WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP. Signed-off-by: Viresh Kumar --- include/linux/pm_opp.h | 64

[PATCH 1/2] opp: Fix "foo * bar" should be "foo *bar"

2021-01-31 Thread Viresh Kumar
Fix checkpatch warning: ERROR: "foo * bar" should be "foo *bar". Signed-off-by: Viresh Kumar --- include/linux/pm_opp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 25e47ab937b9..c6c7d73eb015

[PATCH V2] opp: Don't ignore clk_get() errors other than -ENOENT

2021-01-31 Thread Viresh Kumar
Not all devices that need to use OPP core need to have clocks, a missing clock is fine in which case -ENOENT shall be returned by clk_get(). Anything else is an error and must be handled properly. Reported-by: Dmitry Osipenko Signed-off-by: Viresh Kumar --- V2: - s/ENODEV/ENOENT - Use

Re: [PATCH] docs: thermal: fix spelling mistakes

2021-01-31 Thread Viresh Kumar
roff kicks in after the delay has elapsed > and shuts down > the system. > > If set to 0 emergency poweroff will not be supported. So a carefully > -profiled non-zero positive value is a must for emergerncy poweroff to be > +profiled non-zero positive value is a must for emergency poweroff to be > triggered. Reviewed-by: Viresh Kumar -- viresh

Re: [PATCH] opp: Don't ignore clk_get() errors other than -ENODEV

2021-01-29 Thread Viresh Kumar
On 29-01-21, 18:23, Dmitry Osipenko wrote: > 29.01.2021 13:51, Viresh Kumar пишет: > > Not all devices that need to use OPP core need to have clocks, a missing > > clock is fine in which case -ENODEV shall be returned by clk_get(). > > > > Anything else is an error a

[PATCH V7 5/6] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi

2021-01-28 Thread Viresh Kumar
quot; node to testcases.dts from tests-interrupts.dtsi, as this node has a deliberate error in it and is only relevant for runtime testing done with unittest.c. Signed-off-by: Viresh Kumar --- drivers/of/unittest-data/overlay_base.dts | 90 +- drivers/of/unittest-data/overlay_common.

[PATCH V7 3/6] scripts: dtc: Remove the unused fdtdump.c file

2021-01-28 Thread Viresh Kumar
This was copied from external DTC repository long back and isn't used anymore. Over that the dtc tool can be used to generate the dts source back from the dtb. Remove the unused fdtdump.c file. Signed-off-by: Viresh Kumar --- scripts/dtc/fdtdump.c | 163

[PATCH V7 6/6] of: unittest: Statically apply overlays using fdtoverlay

2021-01-28 Thread Viresh Kumar
checks for. These overlays will cause fdtoverlay to fail, and are thus not included for static builds. Signed-off-by: Viresh Kumar --- drivers/of/unittest-data/Makefile | 56 ++ drivers/of/unittest-data/static_base_1.dts | 4 ++ drivers/of/unittest-data/static_base_2

[PATCH V7 2/6] scripts: dtc: Build fdtoverlay tool

2021-01-28 Thread Viresh Kumar
based on platform specific configurations. Signed-off-by: Viresh Kumar --- scripts/dtc/Makefile | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 4852bf44e913..c8c21e0f2531 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc

[PATCH V7 4/6] kbuild: Add support to build overlays (%.dtbo)

2021-01-28 Thread Viresh Kumar
Add support for building DT overlays (%.dtbo). The overlay's source file will have the usual extension, i.e. .dts, though the blob will have .dtbo extension to distinguish it from normal blobs. Acked-by: Masahiro Yamada Signed-off-by: Viresh Kumar --- .gitignore | 1 + Makefile

[PATCH V7 0/6] dt: build overlays

2021-01-28 Thread Viresh Kumar
Viresh [1] https://github.com/dgibson/dtc/commit/163f0469bf2ed8b2fe5aa15bc796b93c70243ddc [2] https://lore.kernel.org/lkml/74f8aa8f-ffab-3b0f-186f-31fb7395e...@gmail.com/ Viresh Kumar (6): scripts: dtc: Fetch fdtoverlay.c from external DTC project scripts: dtc: Build fdtoverlay tool scripts: d

[PATCH V7 1/6] scripts: dtc: Fetch fdtoverlay.c from external DTC project

2021-01-28 Thread Viresh Kumar
We will start building overlays for platforms soon in the kernel and would need fdtoverlay tool going forward. Lets start fetching it. Signed-off-by: Viresh Kumar --- scripts/dtc/update-dtc-source.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/update-dtc

Re: [PATCH V6 2/6] scripts: dtc: Build fdtoverlay tool

2021-01-28 Thread Viresh Kumar
On 29-01-21, 00:03, Frank Rowand wrote: > On 1/22/21 4:50 AM, Viresh Kumar wrote: > > We will start building overlays for platforms soon in the kernel and > > would need fdtoverlay going forward. Lets start building it. > > > > The fdtoverlay program applies (or merg

[PATCH V3 2/2] cpufreq: cppc: Add support for frequency invariance

2021-01-28 Thread Viresh Kumar
that the arch specific counters have higher priority than CPPC counters if available, though the CPPC driver doesn't need to have any special handling for that. This also exports sched_setattr_nocheck() as the CPPC driver can be built as a module. Signed-off-by: Viresh Kumar --- drivers/cpufreq

[PATCH V3 1/2] topology: Allow multiple entities to provide sched_freq_tick() callback

2021-01-28 Thread Viresh Kumar
of CPPC based counters for example. Note that this also defines SCALE_FREQ_SOURCE_CPUFREQ but doesn't use it and it is added to show that cpufreq is also acts as source of information for FIE and will be used by default if no other counters are supported for a platform. Signed-off-by: Viresh Kumar

[PATCH V3 0/2] cpufreq: cppc: Add support for frequency invariance

2021-01-28 Thread Viresh Kumar
: - The interface for setting the callbacks is improved, so different parts looking to provide their callbacks don't need to think about each other. - Moved to per-cpu storage for storing the callback related data, AMU counters have higher priority with this. -- viresh Viresh Kumar (2

[PATCH] opp: Update bandwidth requirements based on scaling up/down

2021-01-28 Thread Viresh Kumar
and required-opps are programmed. Reported-by: Dmitry Osipenko Reported-by: Akhil P Oommen Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index

[PATCH] opp: Allow lazy-linking of required-opps

2021-01-27 Thread Viresh Kumar
no one can use them. Tested-by: Hsin-Yi Wang Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 45 + drivers/opp/of.c | 122 +++-- drivers/opp/opp.h | 10 +++- 3 files changed, 161 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH V2 3/3] opp: Add dev_pm_opp_of_add_table_noclk()

2021-01-27 Thread Viresh Kumar
A few drivers have device's clk but they don't want the OPP core to handle that. Add a new helper for them, dev_pm_opp_of_add_table_noclk(). Signed-off-by: Viresh Kumar --- V2: - Split this into a separate patch. drivers/opp/of.c | 18 ++ include/linux/pm_opp.h | 6

[PATCH V2 2/3] opp: Defer acquiring the clk until OPPs are added

2021-01-27 Thread Viresh Kumar
dev_pm_opp_set_clkname() or while we initialize the OPPs within the table. Signed-off-by: Viresh Kumar --- V2: - Split the earlier patch into two - Instead of skipping the clk-acquiring in _allocate_opp_table() based on getclk flag, defer it until later and get it only if we need to. drivers/opp/core.c

Re: [PATCH V2 11/13] devfreq: tegra30: Migrate to dev_pm_opp_set_opp()

2021-01-27 Thread Viresh Kumar
On 27-01-21, 18:58, Dmitry Osipenko wrote: > Sadly this doesn't work because we missed that clk is assigned to > opp_table when OPP table is allocated and not when it's added to device. Ahh, I missed that. I have bumped up the other patchset to V2, that should work fine with this patch for

[PATCH V2 1/3] opp: Create _of_add_table_indexed() to reduce code duplication

2021-01-27 Thread Viresh Kumar
dev_pm_opp_of_add_table_indexed(). Signed-off-by: Viresh Kumar --- V2: - No change drivers/opp/of.c | 81 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index d0c0336be39b..c6856dcf4c34 100644 --- a/drivers/opp/of.c +++ b

[PATCH] opp: Staticize _add_opp_table()

2021-01-27 Thread Viresh Kumar
_add_opp_table() isn't used outside of core.c, mark it static. Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 2 +- drivers/opp/opp.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 253bc87b5695..dc7a298f3611 100644

Re: [PATCH] opp: Allow dev_pm_opp_set_opp() to be called without opp

2021-01-27 Thread Viresh Kumar
On 27-01-21, 20:04, Bjorn Andersson wrote: > a6xx_gmu_stop() calls dev_pm_opp_set_opp() with NULL as opp in order to > drop its bandwidth request, which was valid with dev_pm_opp_set_bw(). > But after the transition to dev_pm_opp_set_opp() this leads to a NULL > dereference before jumping into

Re: [PATCH] memory: tegra: Remove calls to dev_pm_opp_set_clkname()

2021-01-27 Thread Viresh Kumar
On 27-01-21, 22:27, Dmitry Osipenko wrote: > 27.01.2021 13:16, Viresh Kumar пишет: > > There is no point calling dev_pm_opp_set_clkname() with the "name" > > parameter set to NULL, this is already done by the OPP core at setup > > time and should work as it is. >

Re: [PATCH 03/13] opp: Keep track of currently programmed OPP

2021-01-27 Thread Viresh Kumar
On 27-01-21, 22:01, Akhil P Oommen wrote: > On 1/22/2021 10:15 AM, Viresh Kumar wrote: > > On 22-01-21, 00:41, Dmitry Osipenko wrote: > > > 21.01.2021 14:17, Viresh Kumar пишет: > > > > @@ -1074,15 +1091,18 @@ int dev_pm_opp_set_rate(struct device *dev, >

Re: [PATCH v3 3/5] OPP: Improve require-opps linking

2021-01-27 Thread Viresh Kumar
On 27-01-21, 22:40, Hsin-Yi Wang wrote: > Hi Viresh, > > I tested this patch with devfreq passive governor[1] and mt8183 > cci[2]. It's also working as expected. I hope I can add your Tested-by for the patch then, right ? > [1] >

Re: [PATCH v3 3/5] OPP: Improve require-opps linking

2021-01-27 Thread Viresh Kumar
sables all of its OPPs to make sure no one can use them. Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 45 + drivers/opp/of.c | 122 +++-- drivers/opp/opp.h | 10 +++- 3 files changed, 161 insertions(+), 16 deletions(-) diff

[PATCH] memory: tegra: Remove calls to dev_pm_opp_set_clkname()

2021-01-27 Thread Viresh Kumar
There is no point calling dev_pm_opp_set_clkname() with the "name" parameter set to NULL, this is already done by the OPP core at setup time and should work as it is. Signed-off-by: Viresh Kumar --- V2: Update tegra124 as well. Krzysztof, please take this through your tree, it doesn'

Re: [RFC][PATCH 0/3] New thermal interface allowing IPA to get max power

2021-01-27 Thread Viresh Kumar
On 27-01-21, 10:11, Lukasz Luba wrote: > > > On 1/27/21 9:15 AM, Viresh Kumar wrote: > > On 26-01-21, 10:39, Lukasz Luba wrote: > > > As it's a RFC, it still misses the cpufreq sysfs implementation, but would > > > be addressed if all agree. > > > >

Re: [PATCH V2 11/13] devfreq: tegra30: Migrate to dev_pm_opp_set_opp()

2021-01-27 Thread Viresh Kumar
On 27-01-21, 14:40, Viresh Kumar wrote: > dev_pm_opp_set_bw() is getting removed and dev_pm_opp_set_opp() should > be used instead. Migrate to the new API. > > We don't want the OPP core to manage the clk for this driver, migrate to > dev_pm_opp_of_add_table_noclk

Re: [RFC][PATCH 0/3] New thermal interface allowing IPA to get max power

2021-01-27 Thread Viresh Kumar
On 26-01-21, 10:39, Lukasz Luba wrote: > As it's a RFC, it still misses the cpufreq sysfs implementation, but would > be addressed if all agree. Not commenting on the whole stuff but if you ever need something for cpufreq, it is already there. Look for these. store_one(scaling_min_freq, min);

[PATCH V2 11/13] devfreq: tegra30: Migrate to dev_pm_opp_set_opp()

2021-01-27 Thread Viresh Kumar
-by: Viresh Kumar --- Dmitry, This is based over the patches sent here: https://lore.kernel.org/lkml/6c2160ff30a8f421563793020264cf9f533f293c.1611738228.git.viresh.ku...@linaro.org/ This should fix the problem you mentioned earlier. Will push this for linux-next unless you have any issues

[PATCH 1/2] opp: Create _of_add_table_indexed() to reduce code duplication

2021-01-27 Thread Viresh Kumar
dev_pm_opp_of_add_table_indexed(). Signed-off-by: Viresh Kumar --- drivers/opp/of.c | 81 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index d0c0336be39b..c6856dcf4c34 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c

[PATCH 2/2] opp: Add dev_pm_opp_of_add_table_noclk()

2021-01-27 Thread Viresh Kumar
A few drivers have device's clk but they don't want the OPP core to handle that. Add a new helper for them, dev_pm_opp_of_add_table_noclk(). Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 28 +--- drivers/opp/of.c | 26 ++ drivers

Re: [PATCH 07/13] opp: Allow _generic_set_opp_clk_only() to work for non-freq devices

2021-01-26 Thread Viresh Kumar
On 26-01-21, 00:09, Dmitry Osipenko wrote: > Please remove unlikely() around IS_ERR(), it already has the unlikely(). Right. > https://elixir.bootlin.com/linux/v5.11-rc4/source/include/linux/err.h#L22 > > I'd also recommend to remove all the unlikely() from OPP code since it > doesn't bring any

Re: [PATCH v4 0/4] OPP API fixes and improvements

2021-01-26 Thread Viresh Kumar
On 22-01-21, 13:04, Viresh Kumar wrote: > Patch 2 can be applied only after the dependency patch for the stub > definition gets merge in Linus's tree. I see that Mark has already > queued that up in his for-5.11 branch, so it might be part of next > -rc. I will app

Re: [PATCH V6 5/6] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi

2021-01-26 Thread Viresh Kumar
On 22-01-21, 16:20, Viresh Kumar wrote: > In order to build-test the same unit-test files using fdtoverlay tool, > move the device nodes from the existing overlay_base.dts and > testcases_common.dts files to .dtsi files. The .dts files now include > the new .dtsi files, resultin

Re: [PATCH 19/21] clk: spear: Move prototype to accessible header

2021-01-26 Thread Viresh Kumar
vious prototype > for ‘spear1340_clk_init’ [-Wmissing-prototypes] > > Cc: Viresh Kumar > Cc: Shiraz Hashim > Cc: Russell King > Cc: Rajeev Kumar > Cc: linux-arm-ker...@lists.infradead.org > Signed-off-by: Lee Jones > --- > arch/arm/mach-spear/generic.h

Re: [PATCH v4 2/4] opp: Add dev_pm_opp_sync_regulators()

2021-01-26 Thread Viresh Kumar
On 26-01-21, 01:30, Dmitry Osipenko wrote: > 21.01.2021 01:26, Dmitry Osipenko пишет: > > Extend OPP API with dev_pm_opp_sync_regulators() function, which syncs > > voltage state of regulators. > > > > Tested-by: Peter Geis > > Tested-by: Nicolas Chauvet > > Tested-by: Matt Merhar > >

Re: [PATCH V6 5/6] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi

2021-01-24 Thread Viresh Kumar
On 23-01-21, 14:07, David Gibson wrote: > On Fri, Jan 22, 2021 at 04:20:35PM +0530, Viresh Kumar wrote: > > In order to build-test the same unit-test files using fdtoverlay tool, > > move the device nodes from the existing overlay_base.dts and > > testcases_common.dts

Re: [PATCH V6 2/6] scripts: dtc: Build fdtoverlay tool

2021-01-24 Thread Viresh Kumar
On 23-01-21, 11:35, David Gibson wrote: > On Fri, Jan 22, 2021 at 04:20:32PM +0530, Viresh Kumar wrote: > > We will start building overlays for platforms soon in the kernel and > > would need fdtoverlay going forward. Lets start building it. > > > > The fdtoverlay prog

Re: [PATCH 11/13] devfreq: tegra30: Migrate to dev_pm_opp_set_opp()

2021-01-24 Thread Viresh Kumar
On 22-01-21, 18:28, Dmitry Osipenko wrote: > Either way will work, but maybe keeping the dev_pm_opp_set_bw() is a bit > more straightforward variant for now since it will avoid the code's > changes and it's probably a bit more obvious variant for the OPP users. The problem is it creates

Re: [PATCH 03/13] opp: Keep track of currently programmed OPP

2021-01-24 Thread Viresh Kumar
On 22-01-21, 17:31, Dmitry Osipenko wrote: > This may not be true for all kinds of hardware, a display controller is > one example. If display's pixclock is raised before the memory bandwidth > of the display's memory client, then display controller may get a memory > underflow since it won't be

Re: [PATCH] memory: tegra: Remove calls to dev_pm_opp_set_clkname()

2021-01-24 Thread Viresh Kumar
On 22-01-21, 18:00, Dmitry Osipenko wrote: > 22.01.2021 09:00, Viresh Kumar пишет: > > There is no point calling dev_pm_opp_set_clkname() with the "name" > > parameter set to NULL, this is already done by the OPP core at setup > > time and should work as it is. >

Re: [PATCH v3] soc/tegra: Add devm_tegra_core_dev_init_opp_table()

2021-01-24 Thread Viresh Kumar
On 22-01-21, 17:41, Dmitry Osipenko wrote: > 22.01.2021 09:35, Viresh Kumar пишет: > > On 21-01-21, 22:01, Dmitry Osipenko wrote: > >> Add common helper which initializes OPP table for Tegra SoC core devices. > >> > >> Tested-by: Peter Geis # Ouya T30 > &g

[PATCH V6 2/6] scripts: dtc: Build fdtoverlay tool

2021-01-22 Thread Viresh Kumar
the overlaid blobs based on platform specific configurations. Signed-off-by: Viresh Kumar --- scripts/dtc/Makefile | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 4852bf44e913..5f19386a49eb 100644 --- a/scripts/dtc/Makefile +++ b

[PATCH V6 5/6] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi

2021-01-22 Thread Viresh Kumar
be reused for compile time tests using fdtoverlay (will be done in a later patch). This is required because the base files passed to fdtoverlay tool shouldn't be overlays themselves (i.e. shouldn't have the /plugin/; tag). Signed-off-by: Viresh Kumar --- drivers/of/unittest-data

[PATCH V6 0/6] dt: build overlays

2021-01-22 Thread Viresh Kumar
...@gmail.com/ Viresh Kumar (6): scripts: dtc: Fetch fdtoverlay.c from external DTC project scripts: dtc: Build fdtoverlay tool scripts: dtc: Remove the unused fdtdump.c file kbuild: Add support to build overlays (%.dtbo) of: unittest: Create overlay_common.dtsi and testcases_common.dtsi

[PATCH V6 3/6] scripts: dtc: Remove the unused fdtdump.c file

2021-01-22 Thread Viresh Kumar
This was copied from external DTC repository long back and isn't used anymore. Over that the dtc tool can be used to generate the dts source back from the dtb. Remove the unused fdtdump.c file. Signed-off-by: Viresh Kumar --- scripts/dtc/fdtdump.c | 163

[PATCH V6 6/6] of: unittest: Statically apply overlays using fdtoverlay

2021-01-22 Thread Viresh Kumar
will cause fdtoverlay to fail, and are thus not included in the static_test.dtb. Signed-off-by: Viresh Kumar --- drivers/of/unittest-data/Makefile| 51 drivers/of/unittest-data/static_base.dts | 5 +++ 2 files changed, 56 insertions(+) create mode 100644 drivers

[PATCH V6 4/6] kbuild: Add support to build overlays (%.dtbo)

2021-01-22 Thread Viresh Kumar
Add support for building DT overlays (%.dtbo). The overlay's source file will have the usual extension, i.e. .dts, though the blob will have .dtbo extension to distinguish it from normal blobs. Signed-off-by: Viresh Kumar --- .gitignore | 1 + Makefile | 5

[PATCH V6 1/6] scripts: dtc: Fetch fdtoverlay.c from external DTC project

2021-01-22 Thread Viresh Kumar
We will start building overlays for platforms soon in the kernel and would need fdtoverlay tool going forward. Lets start fetching it. Signed-off-by: Viresh Kumar --- scripts/dtc/update-dtc-source.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/update-dtc

Re: [PATCH v5 0/7] cpufreq-qcom-hw: Implement full OSM programming

2021-01-22 Thread Viresh Kumar
On 21-01-21, 20:52, AngeloGioacchino Del Regno wrote: > ** > ** NOTE: To "view the full picture", please look at the following > ** patch series: > ** https://patchwork.kernel.org/project/linux-arm-msm/list/?series=413355 > ** This is a subset of that series. > ** > >

Re: [RFC V2 2/2] cpufreq: cppc: Add support for frequency invariance

2021-01-22 Thread Viresh Kumar
On 19-01-21, 19:17, Ionela Voinescu wrote: > Hi, > > Do you know of a current platform that would benefit from this, that we > could run some tests on? Thunderx2 is one. > On Tuesday 15 Dec 2020 at 16:46:36 (+0530), Viresh Kumar wrote: > > @@ -243,7 +256,7 @@ static int

Re: [RFC V2 1/2] topology: Allow multiple entities to provide sched_freq_tick() callback

2021-01-21 Thread Viresh Kumar
On 19-01-21, 19:05, Ionela Voinescu wrote: > I think it would improve clarity a lot by having a single topology > function, with clear comments on which path is taken when. > > In regards to them sharing code, there's not much code they could be > sharing, as one just does some simple math on

Re: [PATCH v4 0/4] OPP API fixes and improvements

2021-01-21 Thread Viresh Kumar
On 21-01-21, 01:26, Dmitry Osipenko wrote: > Dmitry Osipenko (4): > opp: Export devm_pm_opp_attach_genpd() > opp: Add dev_pm_opp_sync_regulators() > opp: Add dev_pm_opp_set_voltage() > opp: Make _set_opp_custom() work without regulators Patch 1 and 3 aren't required anymore, I have

Re: [PATCH v4 4/4] opp: Make _set_opp_custom() work without regulators

2021-01-21 Thread Viresh Kumar
On 21-01-21, 01:26, Dmitry Osipenko wrote: > Check whether OPP table has regulators in _set_opp_custom() and set up > dev_pm_set_opp_data accordingly. Now _set_opp_custom() works properly, > i.e. it doesn't crash if OPP table doesn't have assigned regulators. > > Signed-off-by: Dmitry Osipenko >

Re: [PATCH v3] soc/tegra: Add devm_tegra_core_dev_init_opp_table()

2021-01-21 Thread Viresh Kumar
On 21-01-21, 22:01, Dmitry Osipenko wrote: > Add common helper which initializes OPP table for Tegra SoC core devices. > > Tested-by: Peter Geis # Ouya T30 > Tested-by: Dmitry Osipenko # A500 T20 and Nexus7 T30 > Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 > Tested-by: Matt Merhar #

Re: [PATCH 11/13] devfreq: tegra30: Migrate to dev_pm_opp_set_opp()

2021-01-21 Thread Viresh Kumar
On 22-01-21, 00:36, Dmitry Osipenko wrote: > 21.01.2021 14:17, Viresh Kumar пишет: > > dev_pm_opp_set_bw() is getting removed and dev_pm_opp_set_opp() should > > be used instead. Migrate to the new API. > > > > Signed-off-by: Viresh Kumar > > --- > >

[PATCH] memory: tegra: Remove calls to dev_pm_opp_set_clkname()

2021-01-21 Thread Viresh Kumar
There is no point calling dev_pm_opp_set_clkname() with the "name" parameter set to NULL, this is already done by the OPP core at setup time and should work as it is. Signed-off-by: Viresh Kumar --- Dmitry, am I missing something obvious here ? drivers/memory/tegra/tegra20-

Re: [PATCH 03/13] opp: Keep track of currently programmed OPP

2021-01-21 Thread Viresh Kumar
On 22-01-21, 00:41, Dmitry Osipenko wrote: > 21.01.2021 14:17, Viresh Kumar пишет: > > @@ -1074,15 +1091,18 @@ int dev_pm_opp_set_rate(struct device *dev, > > unsigned long target_freq) > > > > if (!ret) { > > ret = _set_

Re: [PATCH 07/13] opp: Allow _generic_set_opp_clk_only() to work for non-freq devices

2021-01-21 Thread Viresh Kumar
On 21-01-21, 23:26, Dmitry Osipenko wrote: > 21.01.2021 14:17, Viresh Kumar пишет: > > In order to avoid conditional statements at the caller site, this patch > > updates _generic_set_opp_clk_only() to work for devices that don't > > change frequency (like power domains, etc.)

Re: [PATCH V5 5/5] of: unittest: Statically apply overlays using fdtoverlay

2021-01-21 Thread Viresh Kumar
On 22-01-21, 10:39, David Gibson wrote: > No, it definitely will not work in general. It might kinda work in a > few trivial cases, but it absolutely will not do the neccessary > handling in some cases. > > > I > > did inspect the output dtb (made by merging two overlays) using > > fdtdump and

Re: [PATCH V2] opp: Prepare for ->set_opp() helper to work without regulators

2021-01-21 Thread Viresh Kumar
On 22-01-21, 00:02, Dmitry Osipenko wrote: > 21.01.2021 14:30, Viresh Kumar пишет: > > @@ -1952,9 +1930,16 @@ void dev_pm_opp_put_regulators(struct opp_table > > *opp_table) > > for (i = opp_table->regulator_count - 1; i >= 0; i--) > > regu

[PATCH 00/13] opp: Implement dev_pm_opp_set_opp()

2021-01-21 Thread Viresh Kumar
through OPP tree here. Please provide your Acks for platform specific bits. -- Viresh Viresh Kumar (13): opp: Rename _opp_set_rate_zero() opp: No need to check clk for errors opp: Keep track of currently programmed OPP opp: Split _set_opp() out of dev_pm_opp_set_rate() opp: Allow _set_opp

[PATCH 02/13] opp: No need to check clk for errors

2021-01-21 Thread Viresh Kumar
Clock is not optional for users who call into dev_pm_opp_set_rate(). Remove the unnecessary checks. While at it also drop the local variable for clk and use opp_table->clk instead. Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 17 - 1 file changed, 4 insertions(+),

[PATCH 04/13] opp: Split _set_opp() out of dev_pm_opp_set_rate()

2021-01-21 Thread Viresh Kumar
The _set_opp() helper will be used for devices which don't change their frequency (like power domains, etc.) later on, prepare for that by breaking the generic part out of dev_pm_opp_set_rate(). Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 126

[PATCH 05/13] opp: Allow _set_opp() to work for non-freq devices

2021-01-21 Thread Viresh Kumar
The _set_opp() helper will be used for devices which don't change frequency (like power domains, etc.) later on, prepare for that by not relying on frequency for making decisions here. While at it, also update the debug print to contain all relevant information. Signed-off-by: Viresh Kumar

[PATCH 07/13] opp: Allow _generic_set_opp_clk_only() to work for non-freq devices

2021-01-21 Thread Viresh Kumar
In order to avoid conditional statements at the caller site, this patch updates _generic_set_opp_clk_only() to work for devices that don't change frequency (like power domains, etc.). Return 0 if the clk pointer passed to this routine is not valid. Signed-off-by: Viresh Kumar --- drivers/opp

[PATCH 06/13] opp: Allow _generic_set_opp_regulator() to work for non-freq devices

2021-01-21 Thread Viresh Kumar
The _generic_set_opp_regulator() helper will be used for devices which don't change frequency (like power domains, etc.) later on, prepare for that by not relying on frequency for making decisions here. While at it, update its parameters to pass only what is necessary. Signed-off-by: Viresh

[PATCH 09/13] opp: Implement dev_pm_opp_set_opp()

2021-01-21 Thread Viresh Kumar
The new helper dev_pm_opp_set_opp() can be used for configuring the devices for a particular OPP and can be used by different type of devices, even the ones which don't change frequency (like power domains). Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 28

Re: [PATCH v3 05/12] opp: Add dev_pm_opp_set_voltage()

2021-01-21 Thread Viresh Kumar
On 21-01-21, 00:57, Dmitry Osipenko wrote: > 18.01.2021 22:14, Dmitry Osipenko пишет: > > Sounds like it could be a lot of code moving and some extra complexity > > will be added to the code. If nobody will ever need the universal > > dev_pm_opp_set_opp(), then it could become a wasted effort. I'd

[PATCH 13/13] opp: Remove dev_pm_opp_set_bw()

2021-01-21 Thread Viresh Kumar
All the users have migrated to dev_pm_opp_set_opp() now, get rid of the duplicate API, dev_pm_opp_set_bw(), which only performs a part of the new API. While at it, remove the unnecessary parameter to _set_opp_bw(). Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 41

<    1   2   3   4   5   6   7   8   9   10   >