linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] OPP/pmdomain: Assign required_devs for required OPPs through genpd
@ 2024-06-19 14:08 Ulf Hansson
  2024-06-19 14:08 ` [PATCH 1/7] OPP: Fix support for required OPPs for multiple PM domains Ulf Hansson
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Ulf Hansson @ 2024-06-19 14:08 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd
  Cc: Bjorn Andersson, Konrad Dybcio, Nikunj Kela, Prasad Sodagudi,
	Thierry Reding, Jonathan Hunter, Ulf Hansson, linux-pm,
	linux-arm-kernel, linux-kernel

Through dev_pm_opp_set_config() the _opp_attach_genpd() allows consumer
drivers to hook up a device to its PM domains. This works for both a single
and multiple PM domains. Their corresponding virtual devices that are
created by genpd during attach, are later being assigned as the
required_devs for the corresponding required OPPs.

In principle this works fine, but there are some problems. Especially as
the index for a "required-opps" may not necessarily need to match the index
for the "power-domain" in DT, in which case things gets screwed up.

This series intends to improve the situation, but it's also the first step to
enable consumers of _opp_attach_genpd() to start migrating to use the new
dev_pm_domain_attach_list() instead. Down the road, we should then be able to
drop _opp_attach_genpd() completely.

To test this, I have used a QEMU setup, with local PM test-drivers to try to
test all various combinations of single/multi power/performance PM domains for
a device. Hopefully I have covered it all, but I would certainly appreciate if
someone could help to run a slew of tests on some HWs.

Note: Patch1 is actually a fix that has been posted [1] separately too. I
decided to include here for completeness.

Kind regards
Ulf Hansson

[1]
https://lore.kernel.org/linux-kernel/20240618155013.323322-1-ulf.hansson@linaro.org/

Ulf Hansson (7):
  OPP: Fix support for required OPPs for multiple PM domains
  OPP: Drop a redundant in-parameter to _set_opp_level()
  OPP: Rework _set_required_devs() to manage a single device per call
  OPP: Introduce an OF helper function to inform if required-opps is
    used
  pmdomain: core: Manage the default required OPP from a separate
    function
  OPP/pmdomain: Set the required_dev for a required OPP during genpd
    attach
  pmdomain: core: Drop the redundant dev_to_genpd_dev()

 drivers/opp/core.c        | 185 ++++++++++++++++++--------------------
 drivers/opp/of.c          |  32 +++++++
 drivers/opp/opp.h         |   4 +-
 drivers/pmdomain/core.c   | 103 ++++++++++++++++-----
 include/linux/pm_domain.h |   6 --
 include/linux/pm_opp.h    |  16 +++-
 6 files changed, 215 insertions(+), 131 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-07-11 13:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 14:08 [PATCH 0/7] OPP/pmdomain: Assign required_devs for required OPPs through genpd Ulf Hansson
2024-06-19 14:08 ` [PATCH 1/7] OPP: Fix support for required OPPs for multiple PM domains Ulf Hansson
2024-06-19 14:08 ` [PATCH 2/7] OPP: Drop a redundant in-parameter to _set_opp_level() Ulf Hansson
2024-06-26  5:47   ` Viresh Kumar
2024-06-19 14:08 ` [PATCH 3/7] OPP: Rework _set_required_devs() to manage a single device per call Ulf Hansson
2024-06-26  6:33   ` Viresh Kumar
2024-07-11 10:19     ` Ulf Hansson
2024-07-11 13:03       ` Viresh Kumar
2024-06-19 14:08 ` [PATCH 4/7] OPP: Introduce an OF helper function to inform if required-opps is used Ulf Hansson
2024-06-26  5:49   ` Viresh Kumar
2024-06-19 14:08 ` [PATCH 5/7] pmdomain: core: Manage the default required OPP from a separate function Ulf Hansson
2024-06-19 14:08 ` [PATCH 6/7] OPP/pmdomain: Set the required_dev for a required OPP during genpd attach Ulf Hansson
2024-06-26  6:37   ` Viresh Kumar
2024-07-11 10:24     ` Ulf Hansson
2024-06-19 14:08 ` [PATCH 7/7] pmdomain: core: Drop the redundant dev_to_genpd_dev() Ulf Hansson
2024-06-22 12:18 ` [PATCH 0/7] OPP/pmdomain: Assign required_devs for required OPPs through genpd Konrad Dybcio
2024-06-24 15:02   ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).