Lines Matching full:qos
3 * Power Management Quality of Service (PM QoS) support base.
11 * Provided here is an interface for specifying PM QoS dependencies. It allows
12 * entities depending on QoS constraints to register their requests which are
18 * global CPU latency QoS requests and frequency QoS requests are provided.
51 * @c: List of PM QoS constraint requests.
71 WARN(1, "Unknown PM QoS type in %s\n", __func__); in pm_qos_get_value()
82 * pm_qos_update_target - Update a list of PM QoS constraint requests.
83 * @c: List of PM QoS requests.
88 * Update the given list of PM QoS constraint requests, @c, by carrying an
149 * pm_qos_flags_remove_req - Remove device PM QoS flags request.
150 * @pqf: Device PM QoS flags set to remove the request from.
166 * pm_qos_update_flags - Update a set of PM QoS flags.
167 * @pqf: Set of PM QoS flags to update.
213 /* Definitions related to the CPU latency QoS. */
229 * cpu_latency_qos_limit - Return current system-wide CPU latency QoS limit.
237 * cpu_latency_qos_request_active - Check the given PM QoS request.
238 * @req: PM QoS request to check.
240 * Return: 'true' if @req has been added to the CPU latency QoS list, 'false'
245 return req->qos == &cpu_latency_constraints; in cpu_latency_qos_request_active()
252 int ret = pm_qos_update_target(req->qos, &req->node, action, value); in cpu_latency_qos_apply()
258 * cpu_latency_qos_add_request - Add new CPU latency QoS request.
263 * a new entry to the CPU latency QoS list and recompute the effective QoS
267 * QoS request represented by it.
281 req->qos = &cpu_latency_constraints; in cpu_latency_qos_add_request()
287 * cpu_latency_qos_update_request - Modify existing CPU latency QoS request.
288 * @req : QoS request to update.
291 * Use @new_value to update the QoS request represented by @req in the CPU
292 * latency QoS list along with updating the effective constraint value for that
315 * cpu_latency_qos_remove_request - Remove existing CPU latency QoS request.
316 * @req: QoS request to remove.
318 * Remove the CPU latency QoS request represented by @req from the CPU latency
319 * QoS list along with updating the effective constraint value for that list.
338 /* User space interface to the CPU latency QoS via misc device. */
432 /* Definitions related to the frequency QoS below. */
440 * freq_constraints_init - Initialize frequency QoS constraints.
441 * @qos: Frequency QoS constraints to initialize.
443 void freq_constraints_init(struct freq_constraints *qos) in freq_constraints_init() argument
447 c = &qos->min_freq; in freq_constraints_init()
453 c->notifiers = &qos->min_freq_notifiers; in freq_constraints_init()
456 c = &qos->max_freq; in freq_constraints_init()
462 c->notifiers = &qos->max_freq_notifiers; in freq_constraints_init()
467 * freq_qos_read_value - Get frequency QoS constraint for a given list.
468 * @qos: Constraints to evaluate.
469 * @type: QoS request type.
471 s32 freq_qos_read_value(struct freq_constraints *qos, in freq_qos_read_value() argument
478 ret = IS_ERR_OR_NULL(qos) ? in freq_qos_read_value()
480 pm_qos_read_value(&qos->min_freq); in freq_qos_read_value()
483 ret = IS_ERR_OR_NULL(qos) ? in freq_qos_read_value()
485 pm_qos_read_value(&qos->max_freq); in freq_qos_read_value()
496 * freq_qos_apply - Add/modify/remove frequency QoS request.
499 * @value: Value to assign to the QoS request.
510 ret = pm_qos_update_target(&req->qos->min_freq, &req->pnode, in freq_qos_apply()
514 ret = pm_qos_update_target(&req->qos->max_freq, &req->pnode, in freq_qos_apply()
525 * freq_qos_add_request - Insert new frequency QoS request into a given list.
526 * @qos: Constraints to update.
531 * Insert a new entry into the @qos list of requests, recompute the effective
532 * QoS constraint value for that list and initialize the @req object. The
538 int freq_qos_add_request(struct freq_constraints *qos, in freq_qos_add_request() argument
544 if (IS_ERR_OR_NULL(qos) || !req || freq_qos_value_invalid(value)) in freq_qos_add_request()
551 req->qos = qos; in freq_qos_add_request()
555 req->qos = NULL; in freq_qos_add_request()
564 * freq_qos_update_request - Modify existing frequency QoS request.
568 * Update an existing frequency QoS request along with the effective constraint
591 * freq_qos_remove_request - Remove frequency QoS request from its list.
594 * Remove the given frequency QoS request from the list of constraints it
612 req->qos = NULL; in freq_qos_remove_request()
620 * freq_qos_add_notifier - Add frequency QoS change notifier.
621 * @qos: List of requests to add the notifier to.
625 int freq_qos_add_notifier(struct freq_constraints *qos, in freq_qos_add_notifier() argument
631 if (IS_ERR_OR_NULL(qos) || !notifier) in freq_qos_add_notifier()
636 ret = blocking_notifier_chain_register(qos->min_freq.notifiers, in freq_qos_add_notifier()
640 ret = blocking_notifier_chain_register(qos->max_freq.notifiers, in freq_qos_add_notifier()
653 * freq_qos_remove_notifier - Remove frequency QoS change notifier.
654 * @qos: List of requests to remove the notifier from.
658 int freq_qos_remove_notifier(struct freq_constraints *qos, in freq_qos_remove_notifier() argument
664 if (IS_ERR_OR_NULL(qos) || !notifier) in freq_qos_remove_notifier()
669 ret = blocking_notifier_chain_unregister(qos->min_freq.notifiers, in freq_qos_remove_notifier()
673 ret = blocking_notifier_chain_unregister(qos->max_freq.notifiers, in freq_qos_remove_notifier()