Lines Matching +full:max +full:- +full:memory +full:- +full:bandwidth

1 // SPDX-License-Identifier: GPL-2.0-only
6 #include <dt-bindings/memory/nvidia,tegra264.h>
10 #include <linux/tegra-icc.h>
16 #include "tegra264-bwmgr.h"
192 * tegra264_mc_icc_set() - Pass MC client info to the BPMP-FW
193 * @src: ICC node for Memory Controller's (MC) Client
194 * @dst: ICC node for Memory Controller (MC)
196 * Passing the current request info from the MC to the BPMP-FW where
198 * based on client_id, type, latency and bandwidth.
206 struct tegra_mc *mc = icc_provider_to_tegra_mc(dst->provider); in tegra264_mc_icc_set()
209 const struct tegra_mc_client *pclient = src->data; in tegra264_mc_icc_set()
215 * This can be used to pre-initialize and set bandwidth for all clients in tegra264_mc_icc_set()
217 * the pre-initialization already happened in Bootloader(MB2) and BPMP-FW. in tegra264_mc_icc_set()
219 if (src->id == dst->id) in tegra264_mc_icc_set()
222 if (!mc->bwmgr_mrq_supported) in tegra264_mc_icc_set()
225 if (!mc->bpmp) { in tegra264_mc_icc_set()
226 dev_err(mc->dev, "BPMP reference NULL\n"); in tegra264_mc_icc_set()
227 return -ENOENT; in tegra264_mc_icc_set()
230 if (pclient->type == TEGRA_ICC_NISO) in tegra264_mc_icc_set()
231 bwmgr_req.bwmgr_calc_set_req.niso_bw = src->avg_bw; in tegra264_mc_icc_set()
233 bwmgr_req.bwmgr_calc_set_req.iso_bw = src->avg_bw; in tegra264_mc_icc_set()
235 bwmgr_req.bwmgr_calc_set_req.client_id = pclient->bpmp_id; in tegra264_mc_icc_set()
238 bwmgr_req.bwmgr_calc_set_req.mc_floor = src->peak_bw; in tegra264_mc_icc_set()
248 ret = tegra_bpmp_transfer(mc->bpmp, &msg); in tegra264_mc_icc_set()
250 dev_err(mc->dev, "BPMP transfer failed: %d\n", ret); in tegra264_mc_icc_set()
254 pr_err("failed to set bandwidth for %u: %d\n", in tegra264_mc_icc_set()
256 ret = -EINVAL; in tegra264_mc_icc_set()
266 struct icc_provider *p = node->provider; in tegra264_mc_icc_aggregate()
269 if (!mc->bwmgr_mrq_supported) in tegra264_mc_icc_aggregate()
273 *agg_peak = max(*agg_peak, peak_bw); in tegra264_mc_icc_aggregate()