linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/11] OPP/pmdomain: Simplify assignment of required_devs for required OPPs
@ 2024-10-02 12:22 Ulf Hansson
  2024-10-02 12:22 ` [PATCH v4 01/11] Revert "drm/tegra: gr3d: Convert into dev_pm_domain_attach|detach_list()" Ulf Hansson
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Ulf Hansson @ 2024-10-02 12:22 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd
  Cc: Rafael J . Wysocki, Dikshita Agarwal, Vedang Nagar,
	Bjorn Andersson, Konrad Dybcio, Nikunj Kela, Bryan O'Donoghue,
	Thierry Reding, Mikko Perttunen, Jonathan Hunter, Stephan Gerhold,
	Ilia Lin, Stanimir Varbanov, Vikash Garodia, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

Note, due to dependencies this whole series is best funneled together through my
pmdomain tree. Thus I am looking acks/reviews/tests.

Changes in v4:
	- We realized that genpd can't solely be responsible for assigning
	required-devs. In particular in the multiple PM domain case, we need
	platform code to specify the index for a device's required OPPs [1].
	In this version we take that into account by extending
	dev_pm_domain_attach_list() to cope with required OPPs too.

[1]
https://lore.kernel.org/all/CAPDyKFp2s4mPtdU6pMzPbBqqLFxZa1esrXyqXL6UJO-gU-PsVw@mail.gmail.com/

Through dev_pm_opp_set_config() the *_opp_attach_genpd() allows consumer
drivers to attach a device to its 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.

However, attaching a device to its PM domains is in general better done
with dev_pm_domain_attach|detach_list(). To avoid having two different ways
to manage this, this series prepares for the removal of *_opp_attach_genpd()
to finally also remove it.

Kind regards
Ulf Hansson


Ulf Hansson (11):
  Revert "drm/tegra: gr3d: Convert into
    dev_pm_domain_attach|detach_list()"
  PM: domains: Fix alloc/free in dev_pm_domain_attach|detach_list()
  OPP: Rework _set_required_devs() to manage a single device per call
  PM: domains: Support required OPPs in dev_pm_domain_attach_list()
  pmdomain: core: Manage the default required OPP from a separate
    function
  pmdomain: core: Set the required dev for a required OPP during genpd
    attach
  OPP: Drop redundant code in _link_required_opps()
  drm/tegra: gr3d: Convert into devm_pm_domain_attach_list()
  media: venus: Convert into devm_pm_domain_attach_list() for OPP PM
    domain
  cpufreq: qcom-nvmem: Convert to dev_pm_domain_attach|detach_list()
  OPP: Drop redundant *_opp_attach|detach_genpd()

 drivers/base/power/common.c                   |  44 +++-
 drivers/cpufreq/qcom-cpufreq-nvmem.c          |  82 +++-----
 drivers/gpu/drm/tegra/gr3d.c                  |  11 +-
 drivers/media/platform/qcom/venus/core.c      |   8 +-
 drivers/media/platform/qcom/venus/core.h      |   6 +-
 .../media/platform/qcom/venus/pm_helpers.c    |  44 +---
 drivers/opp/core.c                            | 198 +++++-------------
 drivers/opp/of.c                              |  39 +---
 drivers/opp/opp.h                             |   5 +-
 drivers/pmdomain/core.c                       |  76 +++++--
 include/linux/pm_domain.h                     |   9 +
 include/linux/pm_opp.h                        |  42 +---
 12 files changed, 210 insertions(+), 354 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-10-10 12:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 12:22 [PATCH v4 00/11] OPP/pmdomain: Simplify assignment of required_devs for required OPPs Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 01/11] Revert "drm/tegra: gr3d: Convert into dev_pm_domain_attach|detach_list()" Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 02/11] PM: domains: Fix alloc/free in dev_pm_domain_attach|detach_list() Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 03/11] OPP: Rework _set_required_devs() to manage a single device per call Ulf Hansson
2024-10-03  7:14   ` Viresh Kumar
2024-10-09 13:55     ` Ulf Hansson
2024-10-09 15:48       ` Viresh Kumar
2024-10-09 15:54         ` Ulf Hansson
2024-10-10  7:42           ` Viresh Kumar
2024-10-10 12:28             ` Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 04/11] PM: domains: Support required OPPs in dev_pm_domain_attach_list() Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 05/11] pmdomain: core: Manage the default required OPP from a separate function Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 06/11] pmdomain: core: Set the required dev for a required OPP during genpd attach Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 07/11] OPP: Drop redundant code in _link_required_opps() Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 08/11] drm/tegra: gr3d: Convert into devm_pm_domain_attach_list() Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 09/11] media: venus: Convert into devm_pm_domain_attach_list() for OPP PM domain Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 10/11] cpufreq: qcom-nvmem: Convert to dev_pm_domain_attach|detach_list() Ulf Hansson
2024-10-02 12:22 ` [PATCH v4 11/11] OPP: Drop redundant *_opp_attach|detach_genpd() 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).