linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] devfreq_cooling: let the driver supply the dynamic power every time we need it
@ 2016-09-15 14:44 Lukasz Luba
  2016-09-15 14:44 ` [PATCH 1/4] devfreq_cooling: make the structs devfreq_cooling_xxx visible for all Lukasz Luba
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Lukasz Luba @ 2016-09-15 14:44 UTC (permalink / raw)
  To: linux-pm; +Cc: rui.zhang, edubezval, lukasz.luba, javi.merino, orjan.eide

Hello,

This patchset introduces a new interface for devfreq cooling in thermal
framework. I am resending it without the RFC tag.
It supports direct call to driver's functions registered as
'get_dynamic_power' and 'power2state'.


The current implementation in the thermal devfreq cooling subsystem uses
precalculated power table for each device to make a decision about allowed
running state. When the driver registers itself to the thermal devfreq cooling
subsystem, the framework creates the power table. The table is then used by the
thermal subsystem to keep the device in the thermal envelope. The current
implementation uses a fixed assumption of the complexity of the logic in the
cooling_device and assumes power consumption varies directly in proportion to
the frequency/voltage

The proposed implementation provides the possibility to register a driver to
thermal devfreq cooling subsystem and use the driver's code during the
calculation of the power in runtime. You can still use precalculated power
table when the GET_DIRECT_DYNAMIC_POWER flag is not set (the new extension can
co-exist with the current implementation).

This idea meets the expectations of the devices which know better the power
they consume (and the power is not strictly related to OPP table entries
(frequency, voltage) (i.e. some parts/features of the device can be unused)).

The first patch is just for fixing some compiler warnings.  The second patch is
the same as the one sent already to the linux-pm list which adds passing the
devfreq pointer to the driver functions 'get_static|dynamic_power'.  The third
one implements the main change in the devfreq cooling subsystem.  The last one
is a simple fix for an unnecessary check.

Best Regards,
Lukasz Luba

Javi Merino (1):
  devfreq_cooling: pass a pointer to devfreq in the power model
    callbacks

Lukasz Luba (3):
  devfreq_cooling: make the structs devfreq_cooling_xxx visible for all
  devfreq_cooling: let the driver supply the dynamic power every time we
    need it
  devfreq_cooling: fix unnecessary check of unsigned long value

 drivers/thermal/devfreq_cooling.c | 193 +++++++++++++++++++++++++++-----------
 include/linux/devfreq_cooling.h   |  34 +++++--
 2 files changed, 165 insertions(+), 62 deletions(-)

-- 
2.9.2


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

end of thread, other threads:[~2016-11-17 17:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 14:44 [PATCH 0/4] devfreq_cooling: let the driver supply the dynamic power every time we need it Lukasz Luba
2016-09-15 14:44 ` [PATCH 1/4] devfreq_cooling: make the structs devfreq_cooling_xxx visible for all Lukasz Luba
2016-09-15 14:44 ` [PATCH 2/4] devfreq_cooling: pass a pointer to devfreq in the power model callbacks Lukasz Luba
2016-09-15 14:44 ` [PATCH 3/4] devfreq_cooling: let the driver supply the dynamic power every time we need it Lukasz Luba
2016-11-17  3:13   ` Eduardo Valentin
2016-11-17 15:26     ` Lukasz Luba
2016-09-15 14:44 ` [PATCH 4/4] devfreq_cooling: fix unnecessary check of unsigned long value Lukasz Luba
2016-09-27 14:43 ` [PATCH 0/4] devfreq_cooling: let the driver supply the dynamic power every time we need it Lukasz Luba
2016-09-28  1:26   ` Zhang Rui

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