Skip to content
Snippets Groups Projects
  1. Dec 03, 2021
  2. Dec 01, 2021
  3. Nov 10, 2021
  4. Oct 21, 2021
  5. Aug 25, 2021
  6. Aug 04, 2021
  7. Mar 18, 2021
  8. Mar 01, 2021
  9. Feb 12, 2021
  10. Jan 27, 2021
  11. Jan 07, 2021
  12. Dec 30, 2020
  13. Dec 22, 2020
    • Daniel Lezcano's avatar
      powercap/drivers/dtpm: Add CPU energy model based support · 0e8f68d7
      Daniel Lezcano authored
      
      With the powercap dtpm controller, we are able to plug devices with
      power limitation features in the tree.
      
      The following patch introduces the CPU power limitation based on the
      energy model and the performance states.
      
      The power limitation is done at the performance domain level. If some
      CPUs are unplugged, the corresponding power will be subtracted from
      the performance domain total power.
      
      It is up to the platform to initialize the dtpm tree and add the CPU.
      
      Here is an example to create a simple tree with one root node called
      "pkg" and the CPU's performance domains.
      
      static int dtpm_register_pkg(struct dtpm_descr *descr)
      {
      	struct dtpm *pkg;
      	int ret;
      
      	pkg = dtpm_alloc(NULL);
      	if (!pkg)
      		return -ENOMEM;
      
      	ret = dtpm_register(descr->name, pkg, descr->parent);
      	if (ret)
      		return ret;
      
      	return dtpm_register_cpu(pkg);
      }
      
      static struct dtpm_descr descr = {
      	.name = "pkg",
      	.init = dtpm_register_pkg,
      };
      DTPM_DECLARE(descr);
      
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Tested-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0e8f68d7
    • Daniel Lezcano's avatar
      powercap/drivers/dtpm: Add API for dynamic thermal power management · a20d0ef9
      Daniel Lezcano authored
      
      On the embedded world, the complexity of the SoC leads to an
      increasing number of hotspots which need to be monitored and mitigated
      as a whole in order to prevent the temperature to go above the
      normative and legally stated 'skin temperature'.
      
      Another aspect is to sustain the performance for a given power budget,
      for example virtual reality where the user can feel dizziness if the
      GPU performance is capped while a big CPU is processing something
      else. Or reduce the battery charging because the dissipated power is
      too high compared with the power consumed by other devices.
      
      The userspace is the most adequate place to dynamically act on the
      different devices by limiting their power given an application
      profile: it has the knowledge of the platform.
      
      These userspace daemons are in charge of the Dynamic Thermal Power
      Management (DTPM).
      
      Nowadays, the dtpm daemons are abusing the thermal framework as they
      act on the cooling device state to force a specific and arbitrary
      state without taking care of the governor decisions. Given the closed
      loop of some governors that can confuse the logic or directly enter in
      a decision conflict.
      
      As the number of cooling device support is limited today to the CPU
      and the GPU, the dtpm daemons have little control on the power
      dissipation of the system. The out of tree solutions are hacking
      around here and there in the drivers, in the frameworks to have
      control on the devices. The common solution is to declare them as
      cooling devices.
      
      There is no unification of the power limitation unit, opaque states
      are used.
      
      This patch provides a way to create a hierarchy of constraints using
      the powercap framework. The devices which are registered as power
      limit-able devices are represented in this hierarchy as a tree. They
      are linked together with intermediate nodes which are just there to
      propagate the constraint to the children.
      
      The leaves of the tree are the real devices, the intermediate nodes
      are virtual, aggregating the children constraints and power
      characteristics.
      
      Each node have a weight on a 2^10 basis, in order to reflect the
      percentage of power distribution of the children's node. This
      percentage is used to dispatch the power limit to the children.
      
      The weight is computed against the max power of the siblings.
      
      This simple approach allows to do a fair distribution of the power
      limit.
      
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Tested-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a20d0ef9
  14. Nov 23, 2020
  15. Nov 10, 2020
  16. Nov 02, 2020
  17. Oct 19, 2020
  18. Oct 16, 2020
  19. Sep 25, 2020
    • Pujin Shi's avatar
      powercap: include header to fix -Wmissing-prototypes · 00610935
      Pujin Shi authored
      
      Include the linux/idle_inject.h header to fix W=1 build warning:
      
          drivers/powercap/idle_inject.c:152:6: warning: no previous prototype for ‘idle_inject_set_duration’ [-Wmissing-prototypes]
          drivers/powercap/idle_inject.c:167:6: warning: no previous prototype for ‘idle_inject_get_duration’ [-Wmissing-prototypes]
          drivers/powercap/idle_inject.c:179:6: warning: no previous prototype for ‘idle_inject_set_latency’ [-Wmissing-prototypes]
          drivers/powercap/idle_inject.c:195:5: warning: no previous prototype for ‘idle_inject_start’ [-Wmissing-prototypes]
          drivers/powercap/idle_inject.c:227:6: warning: no previous prototype for ‘idle_inject_stop’ [-Wmissing-prototypes]
          drivers/powercap/idle_inject.c:299:28: warning: no previous prototype for ‘idle_inject_register’ [-Wmissing-prototypes]
          drivers/powercap/idle_inject.c:345:6: warning: no previous prototype for ‘idle_inject_unregister’ [-Wmissing-prototypes]
      
      Signed-off-by: default avatarPujin Shi <shipj@lemote.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      00610935
  20. Sep 16, 2020
  21. Sep 10, 2020
  22. Jul 27, 2020
  23. Jul 09, 2020
  24. Jun 30, 2020
Loading