linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jean.pihet@newoldbits.com (jean.pihet at newoldbits.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 0/8] OMAP: add PM_CONSTRAINTS framework
Date: Wed,  4 May 2011 15:35:09 +0200	[thread overview]
Message-ID: <1304516117-9334-1-git-send-email-j-pihet@ti.com> (raw)

From: Jean Pihet <j-pihet@ti.com>

Implement OMAP PM layer omap_pm_set_max_dev_wakeup_lat API by
creating a unified API which calls omap_device_set_dev_constraint
for all classes of constraints (devices wake-up latency, devices
throughput...).
The implementation of the constraints framework is at the omap_device
level: management and storage of the constraints, dispatching of the
constraints to the appropriate low level layers.

NOTE: only works for devices which have been converted to use
     omap_device/omap_hwmod.

Longer term, we could possibly remove this API from the OMAP PM layer,
and instead directly use the device level API.

For the devices wake-up latency constraints, the power domains get
the next power state programmed directly in the registers via
pwrdm_wakeuplat_update_pwrst.

Note about PM QOS: the MPU and CORE power domains get the next power
state via cpuidle, which get the strongest wake-up latency constraint
by querying PM QOS. The usage of PM QOS is temporary, until a generic
solution is in place.

The bus throughput constraints framework is supported by still is a
no-op for the moment.

For the wake-up latency constraints framework to have effect on the
power domains states, CONFIG_CPU_IDLE and CONFIG_OMAP_PM_CONSTRAINTS
must be enabled.

Based on Vibhore's original patch and completely reworked using
omap_device, omap_hwmod, powerdomain and PM QOS frameworks.
Cc: Vibhore Vardhan <vvardhan@ti.com>

Tested on OMAP3 Beagleboard in RET/OFF using wake-up latency constraints
on MPU, CORE and PER.

Based on khilman's pm-core branch

v4:
. updated after review comments on linux-omap mailing list,
. bug fix in the use of plist_first and plist_last if the list is empty.

v3:
. updated after review comments from Kevin,
. patches re-ordering for git bisect compliance,
. reworked the constraints storage and management:
  - the omap_device layer stores all constraints in per-omap_device
    constraints lists,
  - the powerdomain layer manages the wake-up latency constraints in
    per-pwrdm constraint list and applies the constraint to the
    corresponding power domain.
. add the support for the INACTIVE power state,
. move the power domains state initialization from pwrdms_setup to an early init call.

v2:
. updated after review comments from Kevin and Paul,
. initial patch split according to the layering,
. added support for ascending or descending order of constraints values,
. added throughput constraints to the framework, although the tput implementation
 currently is a no-op.

To Do:
. refine the wake-up latency figures by defining the conditions of measurements and by
 measuring on actual OMAP3 hardware,
. define the effect of power domains states combinations,
. debug: add some control knobs for the wake-up latencies in /sysfs,
. add a user-space API to request and remove constraints,
. add OMAP4 support when low power modes code is merged in.

Jean Pihet (8):
  OMAP PM: create a PM layer plugin for per-device constraints
  OMAP2+: powerdomain: control power domains next state
  OMAP3: powerdomain data: add wake-up latency figures
  OMAP2+: omap_hwmod: manage the omap_devices the wake-up latency
    constraints
  OMAP: PM CONSTRAINTS: add an enum for the classes of constraint
  OMAP2+: omap_device: implement the constraints management code
  OMAP: PM CONSTRAINTS: implement wake-up latency constraints
  OMAP PM: early init of the pwrdms states

 arch/arm/mach-omap2/omap_hwmod.c              |   26 ++-
 arch/arm/mach-omap2/pm34xx.c                  |    2 +-
 arch/arm/mach-omap2/pm44xx.c                  |    2 +-
 arch/arm/mach-omap2/powerdomain.c             |  213 ++++++++++++++
 arch/arm/mach-omap2/powerdomain.h             |   42 +++-
 arch/arm/mach-omap2/powerdomains3xxx_data.c   |   84 ++++++-
 arch/arm/plat-omap/Kconfig                    |    7 +
 arch/arm/plat-omap/Makefile                   |    1 +
 arch/arm/plat-omap/include/plat/omap-pm.h     |    4 +
 arch/arm/plat-omap/include/plat/omap_device.h |   15 +-
 arch/arm/plat-omap/include/plat/omap_hwmod.h  |    2 +
 arch/arm/plat-omap/omap-pm-constraints.c      |  369 +++++++++++++++++++++++++
 arch/arm/plat-omap/omap_device.c              |  191 +++++++++++++
 13 files changed, 950 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm/plat-omap/omap-pm-constraints.c

-- 
1.7.2.5

             reply	other threads:[~2011-05-04 13:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 13:35 jean.pihet at newoldbits.com [this message]
2011-05-04 13:35 ` [PATCH 1/8] OMAP PM: create a PM layer plugin for per-device constraints jean.pihet at newoldbits.com
2011-05-04 13:59   ` Tony Lindgren
2011-05-04 14:36     ` Kevin Hilman
2011-05-05  6:00       ` Tony Lindgren
2011-05-06  6:20         ` Tony Lindgren
2011-05-04 13:35 ` [PATCH 2/8] OMAP2+: powerdomain: control power domains next state jean.pihet at newoldbits.com
2011-05-04 13:35 ` [PATCH 3/8] OMAP3: powerdomain data: add wake-up latency figures jean.pihet at newoldbits.com
2011-05-04 13:35 ` [PATCH 4/8] OMAP2+: omap_hwmod: manage the omap_devices the wake-up latency constraints jean.pihet at newoldbits.com
2011-05-04 13:35 ` [PATCH 5/8] OMAP: PM CONSTRAINTS: add an enum for the classes of constraint jean.pihet at newoldbits.com
2011-05-04 13:35 ` [PATCH 6/8] OMAP2+: omap_device: implement the constraints management code jean.pihet at newoldbits.com
2011-05-04 22:11   ` Todd Poynor
2011-05-04 13:35 ` [PATCH 7/8] OMAP: PM CONSTRAINTS: implement wake-up latency constraints jean.pihet at newoldbits.com
2011-05-04 13:35 ` [PATCH 8/8] OMAP PM: early init of the pwrdms states jean.pihet at newoldbits.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304516117-9334-1-git-send-email-j-pihet@ti.com \
    --to=jean.pihet@newoldbits.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).