Lines Matching refs:qn
57 struct qcom_icc_node *qn = src->data; in qcom_icc_set_qnoc_qos() local
58 struct qcom_icc_qos *qos = &qn->qos; in qcom_icc_set_qnoc_qos()
101 struct qcom_icc_node *qn; in qcom_icc_set_bimc_qos() local
107 qn = src->data; in qcom_icc_set_bimc_qos()
111 if (qn->qos.qos_mode != NOC_QOS_MODE_INVALID) in qcom_icc_set_bimc_qos()
112 mode = qn->qos.qos_mode; in qcom_icc_set_bimc_qos()
120 &qn->qos, i); in qcom_icc_set_bimc_qos()
130 qp->qos_offset + M_BKE_EN_ADDR(qn->qos.qos_port), in qcom_icc_set_bimc_qos()
156 struct qcom_icc_node *qn; in qcom_icc_set_noc_qos() local
161 qn = src->data; in qcom_icc_set_noc_qos()
165 if (qn->qos.qos_port < 0) { in qcom_icc_set_noc_qos()
168 qn->name); in qcom_icc_set_noc_qos()
172 if (qn->qos.qos_mode == NOC_QOS_MODE_FIXED) { in qcom_icc_set_noc_qos()
173 dev_dbg(src->provider->dev, "NoC QoS: %s: Set Fixed mode\n", qn->name); in qcom_icc_set_noc_qos()
175 rc = qcom_icc_noc_set_qos_priority(qp, &qn->qos); in qcom_icc_set_noc_qos()
178 } else if (qn->qos.qos_mode == NOC_QOS_MODE_BYPASS) { in qcom_icc_set_noc_qos()
179 dev_dbg(src->provider->dev, "NoC QoS: %s: Set Bypass mode\n", qn->name); in qcom_icc_set_noc_qos()
186 qp->qos_offset + NOC_QOS_MODEn_ADDR(qn->qos.qos_port), in qcom_icc_set_noc_qos()
193 struct qcom_icc_node *qn = node->data; in qcom_icc_qos_set() local
195 dev_dbg(node->provider->dev, "Setting QoS for %s\n", qn->name); in qcom_icc_qos_set()
207 static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 *bw) in qcom_icc_rpm_set() argument
212 if (qn->qos.ap_owned) in qcom_icc_rpm_set()
218 if (qn->mas_rpm_id != -1) { in qcom_icc_rpm_set()
221 qn->mas_rpm_id, in qcom_icc_rpm_set()
225 qn->mas_rpm_id, ret); in qcom_icc_rpm_set()
230 if (qn->slv_rpm_id != -1) { in qcom_icc_rpm_set()
233 qn->slv_rpm_id, in qcom_icc_rpm_set()
237 qn->slv_rpm_id, ret); in qcom_icc_rpm_set()
252 struct qcom_icc_node *qn; in qcom_icc_pre_bw_aggregate() local
255 qn = node->data; in qcom_icc_pre_bw_aggregate()
257 qn->sum_avg[i] = 0; in qcom_icc_pre_bw_aggregate()
258 qn->max_peak[i] = 0; in qcom_icc_pre_bw_aggregate()
275 struct qcom_icc_node *qn; in qcom_icc_bw_aggregate() local
277 qn = node->data; in qcom_icc_bw_aggregate()
284 qn->sum_avg[i] += avg_bw; in qcom_icc_bw_aggregate()
285 qn->max_peak[i] = max_t(u32, qn->max_peak[i], peak_bw); in qcom_icc_bw_aggregate()
294 static u64 qcom_icc_calc_rate(struct qcom_icc_provider *qp, struct qcom_icc_node *qn, int ctx) in qcom_icc_calc_rate() argument
298 if (qn->channels) in qcom_icc_calc_rate()
299 agg_avg_rate = div_u64(qn->sum_avg[ctx], qn->channels); in qcom_icc_calc_rate()
301 agg_avg_rate = qn->sum_avg[ctx]; in qcom_icc_calc_rate()
303 if (qn->ab_coeff) { in qcom_icc_calc_rate()
304 agg_avg_rate = agg_avg_rate * qn->ab_coeff; in qcom_icc_calc_rate()
308 if (qn->ib_coeff) { in qcom_icc_calc_rate()
309 agg_peak_rate = qn->max_peak[ctx] * 100; in qcom_icc_calc_rate()
310 agg_peak_rate = div_u64(agg_peak_rate, qn->ib_coeff); in qcom_icc_calc_rate()
312 agg_peak_rate = qn->max_peak[ctx]; in qcom_icc_calc_rate()
317 return div_u64(agg_rate, qn->buswidth); in qcom_icc_calc_rate()
328 struct qcom_icc_node *qn; in qcom_icc_bus_aggregate() local
337 qn = node->data; in qcom_icc_bus_aggregate()
340 qcom_icc_calc_rate(qp, qn, ctx)); in qcom_icc_bus_aggregate()