linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add support for devices in the Energy Model
@ 2020-02-06 13:46 lukasz.luba
  2020-02-06 13:46 ` [PATCH v2 1/4] PM / EM: add devices to " lukasz.luba
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: lukasz.luba @ 2020-02-06 13:46 UTC (permalink / raw)
  To: linux-kernel, linux-pm, linux-arm-kernel, dri-devel, linux-omap,
	linux-mediatek, linux-arm-msm, linux-imx
  Cc: Morten.Rasmussen, Dietmar.Eggemann, Chris.Redpath,
	ionela.voinescu, javi.merino, cw00.choi, b.zolnierkie, rjw,
	sudeep.holla, viresh.kumar, nm, sboyd, rui.zhang, amit.kucheria,
	daniel.lezcano, mingo, peterz, juri.lelli, vincent.guittot,
	rostedt, qperret, bsegall, mgorman, shawnguo, s.hauer, festevam,
	kernel, khilman, agross, bjorn.andersson, robh, matthias.bgg,
	steven.price, tomeu.vizoso, alyssa.rosenzweig, airlied, daniel,
	liviu.dudau, lorenzo.pieralisi, lukasz.luba, patrick.bellasi

From: Lukasz Luba <lukasz.luba@arm.com>

Hi all,

This patch set introduces support for devices in the Energy Model (EM)
framework. It will unify the power model for thermal subsystem and make it
simpler. The 1st patch refactors EM framework and adds support for devices.
The 2nd patch changes dev_pm_opp_of_register_em() in OPP/OF which now should
take as an argument struct device pointer. It touches a few trees
(OMAP, NXP, mediatek) updating their CPUfreq drivers to the new interface.
Patch 3/4 changes thermal devfreq cooling removing old code for calculating
local power table. It simplifies the code and uses EM for requested power
calculation. Last patch 4/4 adds EM to Panfrost driver.

The patch set is based on linux-next tag next-20200206 but also applies on
top of today's Linus's master.

Changes:
v2:
- changed EM API em_register_perf_domain() adding cpumask_t pointer
  as last argument (which was discussed with Dietmar and Quentin)
- removed dependency on PM_OPP, thanks to the cpumask_t argument
- removed enum em_type and em->type dependent code
- em_get_pd() can handle CPU device as well as devfreq device
- updated EM documentation
- in devfreq cooling added code which prevents from race condition with
  devfreq governors which are trying to use OPPs while thermal is in the middle
  of disabling them.
- in devfreq cooling added code which updates state of the devfreq device to
  avoid working on stale data when governor has not updated it for a long time
- in devfreq cooling added backward compatibility frequency table for drivers
  which did not provide EM
- added Steven's Reviewed-by to trace code in thermal
- added another CPUFreq driver which needs to be updated to the new API

The v1 can be found here [1].

Regards,
Lukasz Luba

[1] https://lkml.org/lkml/2020/1/16/619


Lukasz Luba (4):
  PM / EM: add devices to Energy Model
  OPP: change parameter to device pointer in dev_pm_opp_of_register_em()
  thermal: devfreq_cooling: Refactor code and switch to use Energy Model
  drm/panfrost: Register to the Energy Model with devfreq device

 Documentation/power/energy-model.rst        | 129 +++---
 drivers/cpufreq/cpufreq-dt.c                |   2 +-
 drivers/cpufreq/imx6q-cpufreq.c             |   2 +-
 drivers/cpufreq/mediatek-cpufreq.c          |   2 +-
 drivers/cpufreq/omap-cpufreq.c              |   2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c           |   2 +-
 drivers/cpufreq/scmi-cpufreq.c              |  11 +-
 drivers/cpufreq/scpi-cpufreq.c              |   2 +-
 drivers/cpufreq/vexpress-spc-cpufreq.c      |   2 +-
 drivers/gpu/drm/panfrost/panfrost_devfreq.c |   3 +
 drivers/opp/of.c                            |  45 +--
 drivers/thermal/cpufreq_cooling.c           |  10 +-
 drivers/thermal/devfreq_cooling.c           | 427 +++++++++-----------
 include/linux/devfreq_cooling.h             |  17 -
 include/linux/energy_model.h                | 108 +++--
 include/linux/pm_opp.h                      |  14 +-
 include/trace/events/thermal.h              |  19 +-
 kernel/power/energy_model.c                 | 399 ++++++++++++++----
 kernel/sched/sched.h                        |   2 +-
 kernel/sched/topology.c                     |   4 +-
 20 files changed, 712 insertions(+), 490 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-02-13 15:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 13:46 [PATCH v2 0/4] Add support for devices in the Energy Model lukasz.luba
2020-02-06 13:46 ` [PATCH v2 1/4] PM / EM: add devices to " lukasz.luba
2020-02-07 12:04   ` Quentin Perret
2020-02-07 15:59     ` Lukasz Luba
2020-02-13 10:59   ` Dietmar Eggemann
2020-02-13 15:25     ` Lukasz Luba
2020-02-06 13:46 ` [PATCH v2 2/4] OPP: change parameter to device pointer in dev_pm_opp_of_register_em() lukasz.luba
2020-02-06 13:46 ` [PATCH v2 3/4] thermal: devfreq_cooling: Refactor code and switch to use Energy Model lukasz.luba
2020-02-08  9:51   ` kbuild test robot
2020-02-08 10:39   ` kbuild test robot
2020-02-06 13:46 ` [PATCH v2 4/4] drm/panfrost: Register to the Energy Model with devfreq device lukasz.luba

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).