Lines Matching refs:clamp_id
1379 #define for_each_clamp_id(clamp_id) \ argument
1380 for ((clamp_id) = 0; (clamp_id) < UCLAMP_CNT; (clamp_id)++)
1387 static inline unsigned int uclamp_none(enum uclamp_id clamp_id) in uclamp_none() argument
1389 if (clamp_id == UCLAMP_MIN) in uclamp_none()
1403 uclamp_idle_value(struct rq *rq, enum uclamp_id clamp_id, in uclamp_idle_value() argument
1411 if (clamp_id == UCLAMP_MAX) { in uclamp_idle_value()
1419 static inline void uclamp_idle_reset(struct rq *rq, enum uclamp_id clamp_id, in uclamp_idle_reset() argument
1426 uclamp_rq_set(rq, clamp_id, clamp_value); in uclamp_idle_reset()
1430 unsigned int uclamp_rq_max_value(struct rq *rq, enum uclamp_id clamp_id, in uclamp_rq_max_value() argument
1433 struct uclamp_bucket *bucket = rq->uclamp[clamp_id].bucket; in uclamp_rq_max_value()
1447 return uclamp_idle_value(rq, clamp_id, clamp_value); in uclamp_rq_max_value()
1482 uclamp_tg_restrict(struct task_struct *p, enum uclamp_id clamp_id) in uclamp_tg_restrict() argument
1485 struct uclamp_se uc_req = p->uclamp_req[clamp_id]; in uclamp_tg_restrict()
1517 uclamp_eff_get(struct task_struct *p, enum uclamp_id clamp_id) in uclamp_eff_get() argument
1519 struct uclamp_se uc_req = uclamp_tg_restrict(p, clamp_id); in uclamp_eff_get()
1520 struct uclamp_se uc_max = uclamp_default[clamp_id]; in uclamp_eff_get()
1524 trace_android_rvh_uclamp_eff_get(p, clamp_id, &uc_max, &uc_eff, &ret); in uclamp_eff_get()
1535 unsigned long uclamp_eff_value(struct task_struct *p, enum uclamp_id clamp_id) in uclamp_eff_value() argument
1540 if (p->uclamp[clamp_id].active) in uclamp_eff_value()
1541 return (unsigned long)p->uclamp[clamp_id].value; in uclamp_eff_value()
1543 uc_eff = uclamp_eff_get(p, clamp_id); in uclamp_eff_value()
1560 enum uclamp_id clamp_id) in uclamp_rq_inc_id() argument
1562 struct uclamp_rq *uc_rq = &rq->uclamp[clamp_id]; in uclamp_rq_inc_id()
1563 struct uclamp_se *uc_se = &p->uclamp[clamp_id]; in uclamp_rq_inc_id()
1569 p->uclamp[clamp_id] = uclamp_eff_get(p, clamp_id); in uclamp_rq_inc_id()
1575 uclamp_idle_reset(rq, clamp_id, uc_se->value); in uclamp_rq_inc_id()
1584 if (uc_se->value > uclamp_rq_get(rq, clamp_id)) in uclamp_rq_inc_id()
1585 uclamp_rq_set(rq, clamp_id, uc_se->value); in uclamp_rq_inc_id()
1598 enum uclamp_id clamp_id) in uclamp_rq_dec_id() argument
1600 struct uclamp_rq *uc_rq = &rq->uclamp[clamp_id]; in uclamp_rq_dec_id()
1601 struct uclamp_se *uc_se = &p->uclamp[clamp_id]; in uclamp_rq_dec_id()
1651 rq_clamp = uclamp_rq_get(rq, clamp_id); in uclamp_rq_dec_id()
1658 bkt_clamp = uclamp_rq_max_value(rq, clamp_id, uc_se->value); in uclamp_rq_dec_id()
1659 uclamp_rq_set(rq, clamp_id, bkt_clamp); in uclamp_rq_dec_id()
1665 enum uclamp_id clamp_id; in uclamp_rq_inc() local
1679 for_each_clamp_id(clamp_id) in uclamp_rq_inc()
1680 uclamp_rq_inc_id(rq, p, clamp_id); in uclamp_rq_inc()
1689 enum uclamp_id clamp_id; in uclamp_rq_dec() local
1703 for_each_clamp_id(clamp_id) in uclamp_rq_dec()
1704 uclamp_rq_dec_id(rq, p, clamp_id); in uclamp_rq_dec()
1708 enum uclamp_id clamp_id) in uclamp_rq_reinc_id() argument
1710 if (!p->uclamp[clamp_id].active) in uclamp_rq_reinc_id()
1713 uclamp_rq_dec_id(rq, p, clamp_id); in uclamp_rq_reinc_id()
1714 uclamp_rq_inc_id(rq, p, clamp_id); in uclamp_rq_reinc_id()
1720 if (clamp_id == UCLAMP_MAX && (rq->uclamp_flags & UCLAMP_FLAG_IDLE)) in uclamp_rq_reinc_id()
1727 enum uclamp_id clamp_id; in uclamp_update_active() local
1747 for_each_clamp_id(clamp_id) in uclamp_update_active()
1748 uclamp_rq_reinc_id(rq, p, clamp_id); in uclamp_update_active()
1933 enum uclamp_id clamp_id, in uclamp_reset() argument
1942 if (clamp_id == UCLAMP_MIN && in uclamp_reset()
1948 if (clamp_id == UCLAMP_MAX && in uclamp_reset()
1960 enum uclamp_id clamp_id; in __setscheduler_uclamp() local
1962 for_each_clamp_id(clamp_id) { in __setscheduler_uclamp()
1963 struct uclamp_se *uc_se = &p->uclamp_req[clamp_id]; in __setscheduler_uclamp()
1966 if (!uclamp_reset(attr, clamp_id, uc_se)) in __setscheduler_uclamp()
1973 if (unlikely(rt_task(p) && clamp_id == UCLAMP_MIN)) in __setscheduler_uclamp()
1976 value = uclamp_none(clamp_id); in __setscheduler_uclamp()
2002 enum uclamp_id clamp_id; in uclamp_fork() local
2008 for_each_clamp_id(clamp_id) in uclamp_fork()
2009 p->uclamp[clamp_id].active = false; in uclamp_fork()
2014 for_each_clamp_id(clamp_id) { in uclamp_fork()
2015 uclamp_se_set(&p->uclamp_req[clamp_id], in uclamp_fork()
2016 uclamp_none(clamp_id), false); in uclamp_fork()
2027 enum uclamp_id clamp_id; in init_uclamp_rq() local
2030 for_each_clamp_id(clamp_id) { in init_uclamp_rq()
2031 uc_rq[clamp_id] = (struct uclamp_rq) { in init_uclamp_rq()
2032 .value = uclamp_none(clamp_id) in init_uclamp_rq()
2042 enum uclamp_id clamp_id; in init_uclamp() local
2048 for_each_clamp_id(clamp_id) { in init_uclamp()
2049 uclamp_se_set(&init_task.uclamp_req[clamp_id], in init_uclamp()
2050 uclamp_none(clamp_id), false); in init_uclamp()
2055 for_each_clamp_id(clamp_id) { in init_uclamp()
2056 uclamp_default[clamp_id] = uc_max; in init_uclamp()
2058 root_task_group.uclamp_req[clamp_id] = uc_max; in init_uclamp()
2059 root_task_group.uclamp[clamp_id] = uc_max; in init_uclamp()
10328 enum uclamp_id clamp_id; in alloc_uclamp_sched_group() local
10330 for_each_clamp_id(clamp_id) { in alloc_uclamp_sched_group()
10331 uclamp_se_set(&tg->uclamp_req[clamp_id], in alloc_uclamp_sched_group()
10332 uclamp_none(clamp_id), false); in alloc_uclamp_sched_group()
10333 tg->uclamp[clamp_id] = parent->uclamp[clamp_id]; in alloc_uclamp_sched_group()
10598 enum uclamp_id clamp_id; in cpu_util_update_eff() local
10608 for_each_clamp_id(clamp_id) { in cpu_util_update_eff()
10610 eff[clamp_id] = css_tg(css)->uclamp_req[clamp_id].value; in cpu_util_update_eff()
10613 eff[clamp_id] > uc_parent[clamp_id].value) { in cpu_util_update_eff()
10614 eff[clamp_id] = uc_parent[clamp_id].value; in cpu_util_update_eff()
10623 for_each_clamp_id(clamp_id) { in cpu_util_update_eff()
10624 if (eff[clamp_id] == uc_se[clamp_id].value) in cpu_util_update_eff()
10626 uc_se[clamp_id].value = eff[clamp_id]; in cpu_util_update_eff()
10627 uc_se[clamp_id].bucket_id = uclamp_bucket_id(eff[clamp_id]); in cpu_util_update_eff()
10628 clamps |= (0x1 << clamp_id); in cpu_util_update_eff()
10685 enum uclamp_id clamp_id) in cpu_uclamp_write() argument
10700 if (tg->uclamp_req[clamp_id].value != req.util) in cpu_uclamp_write()
10701 uclamp_se_set(&tg->uclamp_req[clamp_id], req.util, false); in cpu_uclamp_write()
10707 tg->uclamp_pct[clamp_id] = req.percent; in cpu_uclamp_write()
10733 enum uclamp_id clamp_id) in cpu_uclamp_print() argument
10742 util_clamp = tg->uclamp_req[clamp_id].value; in cpu_uclamp_print()
10750 percent = tg->uclamp_pct[clamp_id]; in cpu_uclamp_print()