mbox series

[v3,00/12] OPP API fixes and improvements

Message ID 20210118005524.27787-1-digetx@gmail.com
Headers show
Series OPP API fixes and improvements | expand

Message

Dmitry Osipenko Jan. 18, 2021, 12:55 a.m. UTC
Hi,

This series fixes problems and adds features to OPP API that are required
for implementation of a power domain driver for NVIDIA Tegra SoCs.

It is a continuation of [1], where Viresh Kumar asked to factor OPP
patches into a separate series. I factored out the patches into this
series, addressed the previous review comments and re-based patches
on top of [2], which replaced some of my patches that added resource-managed
helpers.

[1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
[2] https://lore.kernel.org/linux-pm/20210101165507.19486-1-tiny.windzz@gmail.com/

Changelog:

v3: - Reordered patches by importance.

    - Added locking to dev_pm_opp_set_voltage().

    - Reworked "Fix adding OPP entries in a wrong order if rate is unavailable"
      patch, like it was suggested by Viresh Kumar.

    - Reworked "Support set_opp() customization without requiring to use
      regulators" patch, like it was suggested by Viresh Kumar.

      The opp_table->set_opp_data is now allocated by dev_pm_opp_register_set_opp_helper().

      The set_opp_data is refcounted now and can be allocated by any other
      OPP functions if this will become needed in the future for other OPP API
      changes.

Dmitry Osipenko (12):
  opp: Fix adding OPP entries in a wrong order if rate is unavailable
  opp: Filter out OPPs based on availability of a required-OPP
  opp: Correct debug message in _opp_add_static_v2()
  opp: Add dev_pm_opp_sync_regulators()
  opp: Add dev_pm_opp_set_voltage()
  opp: Add dev_pm_opp_find_level_ceil()
  opp: Add dev_pm_opp_get_required_pstate()
  opp: Add devm_pm_opp_register_set_opp_helper
  opp: Add devm_pm_opp_attach_genpd
  opp: Support set_opp() customization without requiring to use
    regulators
  opp: Handle missing OPP table in dev_pm_opp_xlate_performance_state()
  opp: Print OPP level in debug message of _opp_add_static_v2()

 drivers/opp/core.c     | 309 +++++++++++++++++++++++++++++++++++++++--
 drivers/opp/of.c       |   9 +-
 include/linux/pm_opp.h |  49 +++++++
 3 files changed, 349 insertions(+), 18 deletions(-)

Comments

Viresh Kumar Jan. 18, 2021, 11:46 a.m. UTC | #1
On 18-01-21, 03:55, Dmitry Osipenko wrote:
> Hi,
> 
> This series fixes problems and adds features to OPP API that are required
> for implementation of a power domain driver for NVIDIA Tegra SoCs.
> 
> It is a continuation of [1], where Viresh Kumar asked to factor OPP
> patches into a separate series. I factored out the patches into this
> series, addressed the previous review comments and re-based patches
> on top of [2], which replaced some of my patches that added resource-managed
> helpers.
> 
> [1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
> [2] https://lore.kernel.org/linux-pm/20210101165507.19486-1-tiny.windzz@gmail.com/

Hi Dmitry,

I have applied 9 out of 12 patches already. Thanks.
Dmitry Osipenko Jan. 19, 2021, 5:35 p.m. UTC | #2
18.01.2021 14:46, Viresh Kumar пишет:
> On 18-01-21, 03:55, Dmitry Osipenko wrote:
>> Hi,
>>
>> This series fixes problems and adds features to OPP API that are required
>> for implementation of a power domain driver for NVIDIA Tegra SoCs.
>>
>> It is a continuation of [1], where Viresh Kumar asked to factor OPP
>> patches into a separate series. I factored out the patches into this
>> series, addressed the previous review comments and re-based patches
>> on top of [2], which replaced some of my patches that added resource-managed
>> helpers.
>>
>> [1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
>> [2] https://lore.kernel.org/linux-pm/20210101165507.19486-1-tiny.windzz@gmail.com/
> 
> Hi Dmitry,
> 
> I have applied 9 out of 12 patches already. Thanks.
> 

Thanks, I checked that everything is applied properly using today's
linux-next.
Dmitry Osipenko Jan. 20, 2021, 3:41 p.m. UTC | #3
19.01.2021 20:35, Dmitry Osipenko пишет:
> 18.01.2021 14:46, Viresh Kumar пишет:
>> On 18-01-21, 03:55, Dmitry Osipenko wrote:
>>> Hi,
>>>
>>> This series fixes problems and adds features to OPP API that are required
>>> for implementation of a power domain driver for NVIDIA Tegra SoCs.
>>>
>>> It is a continuation of [1], where Viresh Kumar asked to factor OPP
>>> patches into a separate series. I factored out the patches into this
>>> series, addressed the previous review comments and re-based patches
>>> on top of [2], which replaced some of my patches that added resource-managed
>>> helpers.
>>>
>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
>>> [2] https://lore.kernel.org/linux-pm/20210101165507.19486-1-tiny.windzz@gmail.com/
>>
>> Hi Dmitry,
>>
>> I have applied 9 out of 12 patches already. Thanks.
>>
> 
> Thanks, I checked that everything is applied properly using today's
> linux-next.
> 

Turned out that one minor issue was actually introduced, the
devm_pm_opp_attach_genpd() lost the export. I'll make a patch to fix this.
Viresh Kumar Jan. 21, 2021, 7:51 a.m. UTC | #4
On 20-01-21, 18:41, Dmitry Osipenko wrote:
> 19.01.2021 20:35, Dmitry Osipenko пишет:
> > 18.01.2021 14:46, Viresh Kumar пишет:
> >> On 18-01-21, 03:55, Dmitry Osipenko wrote:
> >>> Hi,
> >>>
> >>> This series fixes problems and adds features to OPP API that are required
> >>> for implementation of a power domain driver for NVIDIA Tegra SoCs.
> >>>
> >>> It is a continuation of [1], where Viresh Kumar asked to factor OPP
> >>> patches into a separate series. I factored out the patches into this
> >>> series, addressed the previous review comments and re-based patches
> >>> on top of [2], which replaced some of my patches that added resource-managed
> >>> helpers.
> >>>
> >>> [1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
> >>> [2] https://lore.kernel.org/linux-pm/20210101165507.19486-1-tiny.windzz@gmail.com/
> >>
> >> Hi Dmitry,
> >>
> >> I have applied 9 out of 12 patches already. Thanks.
> >>
> > 
> > Thanks, I checked that everything is applied properly using today's
> > linux-next.
> > 
> 
> Turned out that one minor issue was actually introduced, the
> devm_pm_opp_attach_genpd() lost the export. I'll make a patch to fix this.

I have fixed the original patch for that.
Dmitry Osipenko Jan. 21, 2021, 8:30 p.m. UTC | #5
21.01.2021 10:51, Viresh Kumar пишет:
> On 20-01-21, 18:41, Dmitry Osipenko wrote:
>> 19.01.2021 20:35, Dmitry Osipenko пишет:
>>> 18.01.2021 14:46, Viresh Kumar пишет:
>>>> On 18-01-21, 03:55, Dmitry Osipenko wrote:
>>>>> Hi,
>>>>>
>>>>> This series fixes problems and adds features to OPP API that are required
>>>>> for implementation of a power domain driver for NVIDIA Tegra SoCs.
>>>>>
>>>>> It is a continuation of [1], where Viresh Kumar asked to factor OPP
>>>>> patches into a separate series. I factored out the patches into this
>>>>> series, addressed the previous review comments and re-based patches
>>>>> on top of [2], which replaced some of my patches that added resource-managed
>>>>> helpers.
>>>>>
>>>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=221130
>>>>> [2] https://lore.kernel.org/linux-pm/20210101165507.19486-1-tiny.windzz@gmail.com/
>>>>
>>>> Hi Dmitry,
>>>>
>>>> I have applied 9 out of 12 patches already. Thanks.
>>>>
>>>
>>> Thanks, I checked that everything is applied properly using today's
>>> linux-next.
>>>
>>
>> Turned out that one minor issue was actually introduced, the
>> devm_pm_opp_attach_genpd() lost the export. I'll make a patch to fix this.
> 
> I have fixed the original patch for that.
> 

Okay, thank you.