Skip to content
Snippets Groups Projects
  1. Sep 04, 2024
  2. Jun 26, 2024
  3. Mar 27, 2024
  4. Mar 13, 2024
  5. Feb 29, 2024
  6. Feb 12, 2024
  7. Feb 08, 2024
  8. Jan 23, 2024
  9. Dec 19, 2023
  10. Aug 18, 2023
  11. Apr 27, 2023
  12. Feb 01, 2023
  13. Jan 30, 2023
  14. Jul 15, 2022
  15. Jul 08, 2022
  16. Apr 13, 2022
  17. Mar 03, 2022
  18. Dec 27, 2021
  19. Dec 17, 2021
    • Rafael J. Wysocki's avatar
      PM: runtime: Capture device status before disabling runtime PM · c24efa67
      Rafael J. Wysocki authored
      In some cases (for example, during system-wide suspend and resume of
      devices) it is useful to know whether or not runtime PM has ever been
      enabled for a given device and, if so, what the runtime PM status of
      it had been right before runtime PM was disabled for it last time.
      
      For this reason, introduce a new struct dev_pm_info field called
      last_status that will be used for capturing the runtime PM status of
      the device when its power.disable_depth counter changes from 0 to 1.
      
      The new field will be set to RPM_INVALID to start with and whenever
      power.disable_depth changes from 1 to 0, so it will be valid only
      when runtime PM of the device is currently disabled, but it has been
      enabled at least once.
      
      Immediately use power.last_status in rpm_resume() to make it handle
      the case when PM runtime is disabled for the device, but its runtime
      PM status is RPM_ACTIVE more consistently.  Namely, make it return 1
      if power.last_status is also equal to RPM_ACTIVE in that case (the
      idea being that if the status was RPM_ACTIVE last time when
      power.disable_depth was changing from 0 to 1 and it is still
      RPM_ACTIVE, it can be assumed to reflect what happened to the device
      last time when it was using runtime PM) and -EACCES otherwise.
      
      Update the documentation to provide a description of last_status and
      change the description of pm_runtime_resume() in it to reflect the
      new behavior of rpm_active().
      
      While at it, rearrange the code in pm_runtime_enable() to be more
      straightforward and replace the WARN() macro in it with a pr_warn()
      invocation which is less disruptive.
      
      Link: https://lore.kernel.org/linux-pm/20211026222626.39222-1-ulf.hansson@linaro.org/t/#u
      
      
      Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c24efa67
  20. Nov 10, 2021
    • Lukasz Luba's avatar
      Documentation: power: Describe 'advanced' and 'simple' EM models · 08374410
      Lukasz Luba authored
      
      The Energy Model (EM) can be registered in two ways:
      
       1) Using a helper function, which under the hood relies on OPP framework
          and DT entry in CPU node: 'dynamic-power-coefficient'. This is
          a 'simple' EM because it's tied to the math formula:
          Power = dynamic-power-coefficient * V^2 * f
      
       2) Using em_dev_register_perf_domain() API function with a driver
          custom callback which provides power for each performance state.
      
          This is 'advanced' EM, since it can better reflect real power
          measurements for each performance state. It's not limited to any
          math formula and can better reflect real physics of the device.
      
      Add description of these two methods to the documentation, so developers
      could choose the suitable registration method (option).
      
      Signed-off-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      [ rjw: Changelog edits ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      08374410
    • Lukasz Luba's avatar
      Documentation: power: Add description about new callback for EM registration · d704aa0d
      Lukasz Luba authored
      
      The Energy Model (EM) registration for CPUs should now be done using
      a dedicated callback added recently into CPUFreq framework and drivers.
      
      Commit c17495b0 ("cpufreq: Add callback to register with energy model")
      
      The callback guaranties that the EM registration is called at the right
      time during driver setup. To avoid mistakes update the documentation
      to align with the existing code implementation.
      
      Signed-off-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d704aa0d
  21. Sep 07, 2021
  22. Jun 11, 2021
  23. May 31, 2021
  24. Apr 09, 2021
  25. Apr 02, 2021
  26. Jan 27, 2021
  27. Jan 11, 2021
  28. Dec 22, 2020
  29. Nov 10, 2020
  30. Sep 29, 2020
  31. Jul 27, 2020
  32. Jun 24, 2020
  33. May 07, 2020
  34. Apr 24, 2020
Loading