mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PM QoS: Implement per-device PM QoS constraints
Implement the per-device PM QoS constraints by creating a device PM QoS API, which calls the PM QoS constraints management core code. The per-device latency constraints data strctures are stored in the device dev_pm_info struct. The device PM code calls the init and destroy of the per-device constraints data struct in order to support the dynamic insertion and removal of the devices in the system. To minimize the data usage by the per-device constraints, the data struct is only allocated at the first call to dev_pm_qos_add_request. The data is later free'd when the device is removed from the system. A global mutex protects the constraints users from the data being allocated and free'd. Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
parent
abe98ec2d8
commit
91ff4cb803
5 changed files with 394 additions and 2 deletions
|
@ -419,6 +419,13 @@ enum rpm_request {
|
|||
RPM_REQ_RESUME,
|
||||
};
|
||||
|
||||
/* Per-device PM QoS constraints data struct state */
|
||||
enum dev_pm_qos_state {
|
||||
DEV_PM_QOS_NO_DEVICE, /* No device present */
|
||||
DEV_PM_QOS_DEVICE_PRESENT, /* Device present, data not allocated */
|
||||
DEV_PM_QOS_ALLOCATED, /* Device present, data allocated */
|
||||
};
|
||||
|
||||
struct wakeup_source;
|
||||
|
||||
struct pm_domain_data {
|
||||
|
@ -480,6 +487,8 @@ struct dev_pm_info {
|
|||
unsigned long accounting_timestamp;
|
||||
#endif
|
||||
struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */
|
||||
struct pm_qos_constraints *constraints;
|
||||
enum dev_pm_qos_state constraints_state;
|
||||
};
|
||||
|
||||
extern void update_pm_runtime_accounting(struct device *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue