Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4143347pxb; Tue, 17 Nov 2020 12:27:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKH/elF2lvQlB8Yn3ObG+vy0n+23S7PZjlJLIRz+gREgoJUlkcvE9Wdqzxu432idOrJREE X-Received: by 2002:aa7:dcd6:: with SMTP id w22mr22943323edu.19.1605644827005; Tue, 17 Nov 2020 12:27:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605644826; cv=none; d=google.com; s=arc-20160816; b=YDIgfYjCC+6q2sit1MAUAGkj84bwVapsQDz9G+v/clAefkrylnhOtdPAiPHjiqdGuG 7GLenyJU9dlzCtrAjt6lysiy5pBjf0U+7cHC6CZSRk4C2wkPALDtnn8pRZ5VGhO0VHCR d53423vOWC5Y01N7Sqi2YEx/MXSHml6Xy18z/c0GRN+ty7APWyRaD+yZdLxL/dMZASQ2 0gCMTNIxNVHN5puwRznfLM5YsAKaCLSqZuz2oL1BjMy58uUCCmqUDJ5vbmj+CLuDYU42 qLZri4Ja2B01aj2Gqq/iIAaiDFgylUQP+y84iO3jRBcdQkJyNtKf+6JIp11I+s5omHQS XyAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:date:message-id:from:references:cc:to :subject:dkim-signature; bh=uFgfIH0qmM2n17BDKaKrcq4LBODq5k4QOoezQr/yK4Q=; b=uOaNWgW2kZ9JyNJTMvvULkR7YMBRcu0zXSHsvS220/gKsfW66iYEKbEYttDvaRanJ3 eDs4B+uXmoFFslgKvJNyh+jMV4xFaAgPxU1D7MVADcyEhxI3SSc19y6aU2O9GWZBYRlP uKeCPIy7yYObkWuJVABI6V7IwsEk/4VPzh8mXJOtwsd8vcXb5KerXUkP6L+0TEr1ZK/r lPtUv3zjGpTwjdr+/ROEkdBYZFZ2dyD7Q9+t1gZQsh1ei1nBjCaXaVZ4y8UYzTynIjnP Fj3OYBHjungKZ5zzVZFDFPNw5uvDxTutzzcbwyYdxbspsLd+xIi/f0KMM7NRcR7DAUOW inow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vJmRBtG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec4si14455971ejb.549.2020.11.17.12.26.44; Tue, 17 Nov 2020 12:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vJmRBtG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726311AbgKQUYm (ORCPT + 99 others); Tue, 17 Nov 2020 15:24:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgKQUYl (ORCPT ); Tue, 17 Nov 2020 15:24:41 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E631AC0613CF for ; Tue, 17 Nov 2020 12:24:40 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id 10so4720781wml.2 for ; Tue, 17 Nov 2020 12:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=uFgfIH0qmM2n17BDKaKrcq4LBODq5k4QOoezQr/yK4Q=; b=vJmRBtG5Y4PKYnYzUVh08Dqvpcn/A+iQlTefDkvBSaY/otn7EDLv0dIIj3ExHDw5TK DJhn0fmMls/fo3Ji04nfqYpC6VAJIrSLNF1zevXLRp+Mqs0gIX3k1ay250TfmDCvRB05 +OFGUIWqHJivI8tvxU/N+BXqMuYAmxnqziUr/zXER+4xntRWIfLL4Km6b98Y3TvV59GU eCTzi5TRJcLVXq0HVatVqEhWOZJHM4JeETvtJEpY6E3ejXSsyHLJMnRl9ptM2VzXUngX y3G3hvj79F6xHWtKigSGV3YGOmPS8F7zoviWPz5zt2J2EGLFG8jcg5kblMW5AUYS5yq7 YUCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uFgfIH0qmM2n17BDKaKrcq4LBODq5k4QOoezQr/yK4Q=; b=aAairyOfuaBwbW0uhMsCIrrr3qKeKkAC6k383KSmnnYyZGHb2ZyoxaXCzRVhyRHOw/ 8Qdmk5Y0VR7mP3eQhLSh8VTfjjWe0LNydB7cquet21lRm3A6rZ5TjgFqqOofNJ68IDAV KMMEmXlAlanMuGrlGT56hQ+OKe5DR4+JZFmktiZAVOGE5xfyfAaD0SGPi47LfxOWPeQn zei82kKN4BoG+EHEyASm/jU7Q8CnoyFb5t+FvKz6McMUj6g6eah9ifOqEDsxBwBAeHMn +p/RrvTlQwDQf/dLZ8kfYC/8DZ3xdU4kgkPERx0Pyw0jhT08daKGzQXJRNCCJKhLJzCx uNxQ== X-Gm-Message-State: AOAM532xbs+H6AVVlyXqBIHYVmMLmx34IrwfNg0/5t9+M0//9V6/kWxO PnH8Q5Igwr96QcxxJIQkIx1QYTKECdeaRA== X-Received: by 2002:a1c:2643:: with SMTP id m64mr903602wmm.28.1605644679580; Tue, 17 Nov 2020 12:24:39 -0800 (PST) Received: from MacBook-Pro.local ([212.45.64.13]) by smtp.googlemail.com with ESMTPSA id m18sm27902466wru.37.2020.11.17.12.24.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Nov 2020 12:24:38 -0800 (PST) Subject: Re: [PATCH v9 01/17] memory: tegra30: Support interconnect framework To: Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Mikko Perttunen , Viresh Kumar , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20201115212922.4390-1-digetx@gmail.com> <20201115212922.4390-2-digetx@gmail.com> From: Georgi Djakov Message-ID: <61e777d9-b730-02c6-cedf-cf0aa1a50fb8@linaro.org> Date: Tue, 17 Nov 2020 22:24:37 +0200 MIME-Version: 1.0 In-Reply-To: <20201115212922.4390-2-digetx@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, Thank you working on this! On 15.11.20 23:29, Dmitry Osipenko wrote: > Now Internal and External memory controllers are memory interconnection > providers. This allows us to use interconnect API for tuning of memory > configuration. EMC driver now supports OPPs and DVFS. MC driver now > supports tuning of memory arbitration latency, which needs to be done > for ISO memory clients, like a Display client for example. > > Tested-by: Peter Geis > Signed-off-by: Dmitry Osipenko > --- > drivers/memory/tegra/Kconfig | 1 + > drivers/memory/tegra/tegra30-emc.c | 349 +++++++++++++++++++++++++++-- > drivers/memory/tegra/tegra30.c | 173 +++++++++++++- > 3 files changed, 501 insertions(+), 22 deletions(-) > [..]> diff --git a/drivers/memory/tegra/tegra30.c b/drivers/memory/tegra/tegra30.c > index d0314f29608d..ea849003014b 100644 > --- a/drivers/memory/tegra/tegra30.c > +++ b/drivers/memory/tegra/tegra30.c [..] > + > +static int tegra30_mc_icc_set(struct icc_node *src, struct icc_node *dst) > +{ > + struct tegra_mc *mc = icc_provider_to_tegra_mc(src->provider); > + const struct tegra_mc_client *client = &mc->soc->clients[src->id]; > + u64 peak_bandwidth = icc_units_to_bps(src->peak_bw); > + > + /* > + * Skip pre-initialization that is done by icc_node_add(), which sets > + * bandwidth to maximum for all clients before drivers are loaded. > + * > + * This doesn't make sense for us because we don't have drivers for all > + * clients and it's okay to keep configuration left from bootloader > + * during boot, at least for today. > + */ > + if (src == dst) > + return 0; Nit: The "proper" way to express this should be to implement the .get_bw() callback to return zero as initial average/peak bandwidth. I'm wondering if this will work here? The rest looks good to me! Thanks, Georgi