Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2715003pxx; Sun, 1 Nov 2020 07:28:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWmEBlyr7k7Xk2WmyIwZTJXUbQS04H9zQXmsWnVI0JKnYeZ3fUz0WLYDe3tntLqOU8KsbT X-Received: by 2002:a17:907:204c:: with SMTP id pg12mr10953680ejb.464.1604244487859; Sun, 01 Nov 2020 07:28:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604244487; cv=none; d=google.com; s=arc-20160816; b=odDjUE5iwpwn6e8khLpv19mO/wzYQsIl53WIZ3bWANup7Ixh/A2ja+fcE71vizNfwX +XscUJLxX2qhSGEOmOaqYduazq/6NQkjL6us5ZqN3Zk89AddjkCa4A8VIWb0gcAHhmYL wM9jwD0lCvriGLkUuE1rldhS0+LclPtwMfaPJ0SbGChreENDktSXVOUzR/GgywEbNtof wj1Pdad3z62sER4NnEQ/pC1LWs0ARlQlceM3FDyuEt/Z3QUhJwZb+dToNkC2YylxRGf2 oMqvfUtnBAPhlMgRqR/vBFgkqZeOWqlwUSlUf3bpSS2nT6DTQiXp7TijDbq8JJ3mUInC 6cig== 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:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TvSbmYTBbiH/6uQP+ocL/XJvZrWVgoLgTGEXcKMdRKw=; b=Kku31RdCa0QMdYw/ygKR1JO8eGlCW7e4sP8+zquWvBoNFX2grouPadsg2P3Qi9QZol fD8P4GEl1iuOub/U6zKYkVpsAD0fuZQwfjSYLXBmUuEigjsa+gWOiwhuildbmrUadAk5 vgSvB8Eryn6SZvYwc+12dOZKE470ZXBx56YGASaXw2H0ANY0jFPe4zWqWXIdtjibej1+ vLtxSo0kOEbu39lUTnTKmd8elX7MnkoAv9ybKM15G60T1+hLQXQgPsLO81nPM7YV/QBI HT7y0kl6qb6+8Tt0fp/YLqSrz7LBtkm4j9YISVIr8IHFD5EiFFIoVmmb7ZiB+Fp3Klpx oBDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TZsCakYK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si9271826edm.444.2020.11.01.07.27.44; Sun, 01 Nov 2020 07:28:07 -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=@gmail.com header.s=20161025 header.b=TZsCakYK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgKAPYO (ORCPT + 99 others); Sun, 1 Nov 2020 10:24:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbgKAPYO (ORCPT ); Sun, 1 Nov 2020 10:24:14 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16C2CC0617A6; Sun, 1 Nov 2020 07:24:14 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id m16so12235544ljo.6; Sun, 01 Nov 2020 07:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TvSbmYTBbiH/6uQP+ocL/XJvZrWVgoLgTGEXcKMdRKw=; b=TZsCakYKTg1FrKZSl+qwJefjMXzq1vVG0ZESq6jgcr/4B0WepUkCLgNCIT825Cjwqn sN2TNLubmUwOOpeHaxS2Wxr5ISuxvb/BNkkbmzmdGNCCeLgHBEH5/v955E3Jzx5JPlx8 JWM+MvTOeJ+NoAyeYCA/YQ39cN82ngBc1zcVZQpZIqlIhgilmgT9/4cAH1hq7bMU526Q gg9nt1msByT0vADvdhYYKgaL2i+2pYaPtCHC4AH0kcjt6Rcn0R6+hkOC57E4kZd+f1Zp 0PD9+LHvLkidvjJDl2+0A+YPfA/b7sSvJYsRnLKvnqytrAyol9XBixf2WmxSIrzFsRws GqGw== 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 :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TvSbmYTBbiH/6uQP+ocL/XJvZrWVgoLgTGEXcKMdRKw=; b=A5ftxPhkfabiH4/9K6gYjeUyOhIkEv20KxYtYtkGkoG4aWhvIswpV8b+mnb6jwmSBj 0oqK4Kn57a3Ailuf2TXCgMM6J5johgWGNYJNXVNlURh6g5tWdBtpxXraGPlbJ9zk9jBA QTnD86QoR/0OL4MEOmXdbo0U2VEeaamn669TUdjN2iLGRyq6ocyAD9AiENLo2/FRKfq6 Yl2dgh6rv2FTRCmKGhr32F3O/xyQFW+RhQw1gshjQ3Qzwd/k5ee+rMcW+2w5TKBo+jGV JkDNl5PIsuhx0L11kZW61yn4fZiLrP9kjp/vSm/5ayHULplQv54kZ8PafOdkDAutua7t KejA== X-Gm-Message-State: AOAM5310b3x+FvBqQMqzsqlE57ZMlcKDwhvezjvQKSzNTJlVi/oJfVlz oNy30xngJG6H6ipyOwLpkxuEPVcM5TQ= X-Received: by 2002:a2e:681a:: with SMTP id c26mr5126010lja.56.1604244252401; Sun, 01 Nov 2020 07:24:12 -0800 (PST) Received: from [192.168.2.145] (109-252-193-177.dynamic.spd-mgts.ru. [109.252.193.177]) by smtp.googlemail.com with ESMTPSA id l9sm1778384ljc.86.2020.11.01.07.24.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Nov 2020 07:24:11 -0800 (PST) Subject: Re: [PATCH v6 51/52] PM / devfreq: tegra30: Support interconnect and OPPs from device-tree To: cwchoi00@gmail.com Cc: Thierry Reding , Jonathan Hunter , Georgi Djakov , 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 , linux-tegra@vger.kernel.org, Linux PM list , linux-kernel , dri-devel , devicetree References: <20201025221735.3062-1-digetx@gmail.com> <20201025221735.3062-52-digetx@gmail.com> From: Dmitry Osipenko Message-ID: <961863f7-933d-d455-cd5d-99bab898ee75@gmail.com> Date: Sun, 1 Nov 2020 18:24:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 01.11.2020 17:44, Chanwoo Choi пишет: > Hi Dmitry, > > On Mon, Oct 26, 2020 at 7:22 AM Dmitry Osipenko wrote: >> >> This patch moves ACTMON driver away from generating OPP table by itself, >> transitioning it to use the table which comes from device-tree. This >> change breaks compatibility with older device-trees in order to bring >> support for the interconnect framework to the driver. This is a mandatory >> change which needs to be done in order to implement interconnect-based >> memory DVFS. Users of legacy device-trees will get a message telling that >> theirs DT needs to be upgraded. Now ACTMON issues memory bandwidth request >> using dev_pm_opp_set_bw(), instead of driving EMC clock rate directly. >> >> Tested-by: Peter Geis >> Tested-by: Nicolas Chauvet >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/devfreq/tegra30-devfreq.c | 91 ++++++++++++++++--------------- >> 1 file changed, 48 insertions(+), 43 deletions(-) >> >> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c >> index 3f732ab53573..1b0b91a71886 100644 >> --- a/drivers/devfreq/tegra30-devfreq.c >> +++ b/drivers/devfreq/tegra30-devfreq.c >> @@ -19,6 +19,8 @@ >> #include >> #include >> >> +#include >> + > > This patch touches the OPP. Is it related to this change? Yes, this is needed for the dev_pm_opp_set_supported_hw(). >> #include "governor.h" >> >> #define ACTMON_GLB_STATUS 0x0 >> @@ -155,6 +157,7 @@ struct tegra_devfreq_device { >> >> struct tegra_devfreq { >> struct devfreq *devfreq; >> + struct opp_table *opp_table; >> >> struct reset_control *reset; >> struct clk *clock; >> @@ -612,34 +615,19 @@ static void tegra_actmon_stop(struct tegra_devfreq *tegra) >> static int tegra_devfreq_target(struct device *dev, unsigned long *freq, >> u32 flags) >> { >> - struct tegra_devfreq *tegra = dev_get_drvdata(dev); >> - struct devfreq *devfreq = tegra->devfreq; >> struct dev_pm_opp *opp; >> - unsigned long rate; >> - int err; >> + int ret; >> >> opp = devfreq_recommended_opp(dev, freq, flags); >> if (IS_ERR(opp)) { >> - dev_err(dev, "Failed to find opp for %lu Hz\n", *freq); >> + dev_err(dev, "failed to find opp for %lu Hz\n", *freq); > > You used the 'Failed to' format in almost every error case. > Don't need to change it. > (snip) Good catch, thanks.