mbox series

[0/9] PM: domains/opp/arm_scmi: Extend performance scaling support

Message ID 20230925131715.138411-1-ulf.hansson@linaro.org (mailing list archive)
Headers show
Series PM: domains/opp/arm_scmi: Extend performance scaling support | expand

Message

Ulf Hansson Sept. 25, 2023, 1:17 p.m. UTC
Consumer drivers for devices that are attached to the SCMI performance domain,
are currently not able to use the OPP library to scale performance. This series
is enabling the support for this.

The OPPs for SCMI performance domain are encoded in the FW, rather than being
described through DT. To better support this, some changes have also been done
to the OPP library and for PM domains in general. More details are available in
the commit messages.

I have based the series on the scmi tree and the for-next/scmi/updates branch,
so the OPP and PM domain changes would require acks from Viresh and Rafael to
be allow to be picked up and funneled through the scmi tree. Or, let's just
discuss what works best for us in this regards.

Note that, I am running this on the Qemu virt platform with Optee running an
SCMI server. If you want some more details about my test setup, I can certainly
share this with you, just let me know.

Looking forward to your feedback!

Kind regards
Ulf Hansson


Ulf Hansson (9):
  PM: domains: Introduce dev_pm_domain_set_performance_state()
  PM: domains: Implement the ->set_performance_state() callback for
    genpd
  OPP: Add dev_pm_opp_add_dynamic() to allow more flexibility
  OPP: Extend dev_pm_opp_data with a level
  OPP: Switch to use dev_pm_domain_set_performance_state()
  OPP: Extend support for the opp-level beyond required-opps
  firmware: arm_scmi: Simplify error path in scmi_dvfs_device_opps_add()
  firmware: arm_scmi: Specify the performance level when adding an OPP
  firmware: arm_scmi: Add generic OPP support to the SCMI performance
    domain

 drivers/base/power/common.c             | 21 ++++++++++
 drivers/base/power/domain.c             | 33 +++++++++------
 drivers/firmware/arm_scmi/perf.c        | 22 +++++-----
 drivers/opp/core.c                      | 54 +++++++++++++++++++------
 drivers/opp/of.c                        | 10 +++--
 drivers/opp/opp.h                       |  2 +-
 drivers/pmdomain/arm/scmi_perf_domain.c | 34 ++++++++++++++++
 include/linux/pm.h                      |  2 +
 include/linux/pm_domain.h               |  6 +++
 include/linux/pm_opp.h                  | 31 ++++++++++++--
 10 files changed, 168 insertions(+), 47 deletions(-)

Comments

Rafael J. Wysocki Sept. 26, 2023, 4:54 p.m. UTC | #1
On Mon, Sep 25, 2023 at 3:17 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> Consumer drivers for devices that are attached to the SCMI performance domain,
> are currently not able to use the OPP library to scale performance. This series
> is enabling the support for this.
>
> The OPPs for SCMI performance domain are encoded in the FW, rather than being
> described through DT. To better support this, some changes have also been done
> to the OPP library and for PM domains in general. More details are available in
> the commit messages.
>
> I have based the series on the scmi tree and the for-next/scmi/updates branch,
> so the OPP and PM domain changes would require acks from Viresh and Rafael to
> be allow to be picked up and funneled through the scmi tree. Or, let's just
> discuss what works best for us in this regards.
>
> Note that, I am running this on the Qemu virt platform with Optee running an
> SCMI server. If you want some more details about my test setup, I can certainly
> share this with you, just let me know.
>
> Looking forward to your feedback!
>
> Kind regards
> Ulf Hansson
>
>
> Ulf Hansson (9):
>   PM: domains: Introduce dev_pm_domain_set_performance_state()
>   PM: domains: Implement the ->set_performance_state() callback for
>     genpd

I have no strong opinion regarding the two patches above, so if you
need ACKs from me on them, please feel free to add them.

>   OPP: Add dev_pm_opp_add_dynamic() to allow more flexibility
>   OPP: Extend dev_pm_opp_data with a level
>   OPP: Switch to use dev_pm_domain_set_performance_state()
>   OPP: Extend support for the opp-level beyond required-opps
>   firmware: arm_scmi: Simplify error path in scmi_dvfs_device_opps_add()
>   firmware: arm_scmi: Specify the performance level when adding an OPP
>   firmware: arm_scmi: Add generic OPP support to the SCMI performance
>     domain
>
>  drivers/base/power/common.c             | 21 ++++++++++
>  drivers/base/power/domain.c             | 33 +++++++++------
>  drivers/firmware/arm_scmi/perf.c        | 22 +++++-----
>  drivers/opp/core.c                      | 54 +++++++++++++++++++------
>  drivers/opp/of.c                        | 10 +++--
>  drivers/opp/opp.h                       |  2 +-
>  drivers/pmdomain/arm/scmi_perf_domain.c | 34 ++++++++++++++++
>  include/linux/pm.h                      |  2 +
>  include/linux/pm_domain.h               |  6 +++
>  include/linux/pm_opp.h                  | 31 ++++++++++++--
>  10 files changed, 168 insertions(+), 47 deletions(-)
>
> --
Sudeep Holla Oct. 6, 2023, 2:30 p.m. UTC | #2
On Mon, 25 Sep 2023 15:17:06 +0200, Ulf Hansson wrote:
> Consumer drivers for devices that are attached to the SCMI performance domain,
> are currently not able to use the OPP library to scale performance. This series
> is enabling the support for this.
> 
> The OPPs for SCMI performance domain are encoded in the FW, rather than being
> described through DT. To better support this, some changes have also been done
> to the OPP library and for PM domains in general. More details are available in
> the commit messages.
> 
> [...]

Applied to sudeep.holla/linux (for-next/scmi/updates), thanks!

[1/9 - 6/9] Merged via branch 'opp/pm-domain-scmi' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

[7/9] firmware: arm_scmi: Simplify error path in scmi_dvfs_device_opps_add()
      https://git.kernel.org/sudeep.holla/c/033ca4de1296
[8/9] firmware: arm_scmi: Specify the performance level when adding an OPP
      https://git.kernel.org/sudeep.holla/c/5a6a10419352
[9/9] firmware: arm_scmi: Add generic OPP support to the SCMI performance domain
      https://git.kernel.org/sudeep.holla/c/0a81b0eb81ca
--
Regards,
Sudeep