Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v3 00/13] driver core / pmdomain: Add support for fined grained sync_state
@ 2026-05-08 12:38 Ulf Hansson
  2026-05-08 12:38 ` [PATCH v3 01/13] Revert "driver core: move dev_has_sync_state() to drivers/base/base.h" Ulf Hansson
                   ` (12 more replies)
  0 siblings, 13 replies; 21+ messages in thread
From: Ulf Hansson @ 2026-05-08 12:38 UTC (permalink / raw)
  To: Danilo Krummrich, Saravana Kannan, Rafael J . Wysocki,
	Greg Kroah-Hartman, driver-core, linux-pm
  Cc: Sudeep Holla, Cristian Marussi, Kevin Hilman, Stephen Boyd,
	Marek Szyprowski, Bjorn Andersson, Abel Vesa, Peng Fan,
	Tomi Valkeinen, Maulik Shah, Konrad Dybcio, Thierry Reding,
	Jonathan Hunter, Geert Uytterhoeven, Dmitry Baryshkov,
	Ulf Hansson, linux-arm-kernel, linux-kernel

Changes in v3:
	- Dropped tested-by tags from Geert, due to changes in patch2.
	- Addressed the comments from Danilo and Geert, more information in the
	changelog for each patch.

Assuming this is accepted, the best merge strategy would be for Danilo to pick
up the driver core patches (1 to 4) and host a branch that I can pull into my
pmdomain tree so I can take the rest of the series. Danilo, please let me know
what you prefer.

Since the introduction [1] of the common sync_state support for pmdomains
(genpd), we have encountered a lot of various interesting problems. In most
cases the new behaviour of genpd triggered some weird platform specific bugs.

That said, in LPC in Tokyo me and Saravana hosted a session to walk through the
remaining limitations that we have found for genpd's sync state support. In
particular, we discussed the problems we have for the so-called onecell power
domain providers, where a single provider typically provides multiple
independent power domains, all with their own set of consumers.

Note that, onecell power domain providers are very common. It's being used by
many SoCs/platforms/technologies. To name a few:
SCMI, Qualcomm, NXP, Mediatek, Renesas, TI, etc.

Anyway, in these cases, the generic sync_state mechanism with fw_devlink isn't
fine grained enough, as we end up waiting for all consumers for all power
domains before the ->sync_callback gets called for the supplier/provider. In
other words, we may end up keeping unused power domains powered-on, for no good
reasons.

The series intends to fix this problem. Please have a look at the commit
messages for more details and help review/test!

Kind regards
Ulf Hansson

[1]
https://lore.kernel.org/all/20250701114733.636510-1-ulf.hansson@linaro.org/


Ulf Hansson (13):
  Revert "driver core: move dev_has_sync_state() to drivers/base/base.h"
  driver core: Enable suppliers to implement fine grained sync_state
    support
  driver core: Add documentation for dev_set_drv_sync_state()
  driver core: Add dev_set_drv_queue_sync_state()
  pmdomain: core: Move genpd_get_from_provider()
  pmdomain: core: Add initial fine grained sync_state support
  pmdomain: core: Extend fine grained sync_state to more onecell
    providers
  pmdomain: core: Export a common function for ->queue_sync_state()
  pmdomain: renesas: rcar-gen4-sysc: Drop GENPD_FLAG_NO_STAY_ON
  pmdomain: renesas: rcar-sysc: Drop GENPD_FLAG_NO_STAY_ON
  pmdomain: renesas: rmobile-sysc: Drop GENPD_FLAG_NO_STAY_ON
  pmdomain: core: Avoid an unnecessary power off at sync_state
  pmdomain: core: Add a couple of debug prints for sync_state

 drivers/base/base.h                       |  22 ++-
 drivers/base/core.c                       |  77 ++++++--
 drivers/base/driver.c                     |   7 +
 drivers/pmdomain/core.c                   | 227 ++++++++++++++++++----
 drivers/pmdomain/renesas/rcar-gen4-sysc.c |   1 -
 drivers/pmdomain/renesas/rcar-sysc.c      |   1 -
 drivers/pmdomain/renesas/rmobile-sysc.c   |   3 +-
 include/linux/device.h                    |  44 +++++
 include/linux/device/driver.h             |   7 +
 include/linux/pm_domain.h                 |   3 +
 10 files changed, 318 insertions(+), 74 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-11 10:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 12:38 [PATCH v3 00/13] driver core / pmdomain: Add support for fined grained sync_state Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 01/13] Revert "driver core: move dev_has_sync_state() to drivers/base/base.h" Ulf Hansson
2026-05-08 17:23   ` Danilo Krummrich
2026-05-08 12:38 ` [PATCH v3 02/13] driver core: Enable suppliers to implement fine grained sync_state support Ulf Hansson
2026-05-08 18:23   ` Danilo Krummrich
2026-05-11  9:10     ` Ulf Hansson
2026-05-11  5:08   ` Saravana Kannan
2026-05-11  9:42     ` Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 03/13] driver core: Add documentation for dev_set_drv_sync_state() Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 04/13] driver core: Add dev_set_drv_queue_sync_state() Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 05/13] pmdomain: core: Move genpd_get_from_provider() Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 06/13] pmdomain: core: Add initial fine grained sync_state support Ulf Hansson
2026-05-11  5:09   ` Saravana Kannan
2026-05-11 10:24     ` Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 07/13] pmdomain: core: Extend fine grained sync_state to more onecell providers Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 08/13] pmdomain: core: Export a common function for ->queue_sync_state() Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 09/13] pmdomain: renesas: rcar-gen4-sysc: Drop GENPD_FLAG_NO_STAY_ON Ulf Hansson
2026-05-08 12:38 ` [PATCH v3 10/13] pmdomain: renesas: rcar-sysc: " Ulf Hansson
2026-05-08 12:39 ` [PATCH v3 11/13] pmdomain: renesas: rmobile-sysc: " Ulf Hansson
2026-05-08 12:39 ` [PATCH v3 12/13] pmdomain: core: Avoid an unnecessary power off at sync_state Ulf Hansson
2026-05-08 12:39 ` [PATCH v3 13/13] pmdomain: core: Add a couple of debug prints for sync_state Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox