[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5fe5cd77-c82c-23f5-800f-16a7beebf26a@nvidia.com>
Date: Fri, 13 Jan 2023 18:05:15 +0530
From: Sumit Gupta <sumitg@...dia.com>
To: Dmitry Osipenko <digetx@...il.com>, <treding@...dia.com>,
<krzysztof.kozlowski@...aro.org>, <dmitry.osipenko@...labora.com>,
<viresh.kumar@...aro.org>, <rafael@...nel.org>,
<jonathanh@...dia.com>, <robh+dt@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <devicetree@...r.kernel.org>
CC: <sanjayc@...dia.com>, <ksitaraman@...dia.com>, <ishah@...dia.com>,
<bbasu@...dia.com>, Sumit Gupta <sumitg@...dia.com>
Subject: Re: [Patch v1 01/10] memory: tegra: add interconnect support for DRAM
scaling in Tegra234
On 22/12/22 21:26, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 21.12.2022 22:20, Dmitry Osipenko пишет:
>> 20.12.2022 19:02, Sumit Gupta пишет:
>>> +static int tegra_emc_icc_set_bw(struct icc_node *src, struct icc_node *dst)
>>> +{
>>> + struct tegra186_emc *emc = to_tegra186_emc(dst->provider);
>>> + struct tegra_mc *mc = dev_get_drvdata(emc->dev->parent);
>>> + struct mrq_bwmgr_int_request bwmgr_req = { 0 };
>>> + struct mrq_bwmgr_int_response bwmgr_resp = { 0 };
>>> + struct tegra_icc_node *tnode = mc->curr_tnode;
>>> + struct tegra_bpmp_message msg;
>>> + int ret = 0;
>>> +
>>> + /*
>>> + * Same Src and Dst node will happen during boot from icc_node_add().
>>> + * This can be used to pre-initialize and set bandwidth for all clients
>>> + * before their drivers are loaded. We are skipping this case as for us,
>>> + * the pre-initialization already happened in Bootloader(MB2) and BPMP-FW.
>>> + */
>>> + if (src->id == dst->id)
>>> + return 0;
>>> +
>>> + if (mc->curr_tnode->type == TEGRA_ICC_NISO)
>>
>> The mc->curr_tnode usage looks suspicious, why you can't use src node?
>>
>
> This function sets memory BW for a memory client and not for EMC.
> Apparently, you should move the BW setting to tegra234_mc_icc_set() and
> then tegra_emc_icc_set_bw() will be a noop.
>
Yes, will move this code to set_bw() in MC driver. The set_bw call in
EMC will be a dummy function after change.
This change will also help to remove "struct tegra_icc_node
*curr_tnode;" from "struct tegra_mc" which is used for passing data
between MC and EMC drivers to transfer to BPMP.
static int tegra_emc_icc_set_bw(struct icc_node *src, struct icc_node *dst)
{
return 0;
}
Powered by blists - more mailing lists