Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp23489ybb; Tue, 31 Mar 2020 16:15:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvx70gJBXk2q18vN6BXsnJD2Jc7EHp6RAj01qxNM/b2BuTY3iL8U4jyh5Dl6fbl8KKsHXIG X-Received: by 2002:a4a:7355:: with SMTP id e21mr9561805oof.31.1585696500487; Tue, 31 Mar 2020 16:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585696500; cv=none; d=google.com; s=arc-20160816; b=w87ui4D5whB0ZF5TIQLyF0hlDVm6Hmd+NQA1eh9Gr9zX8REZ5rOw9HlAtQc6uthecW aC8vzPiteF7rVqwBoH4MFn1Sj2iB9TjnTmc/fEosnZ2MswKksEuAxQwSzpvkW3tp4zxe KIFJ+uvGnjC1UurS+oZWCEhFQCvySVc7uH/zqRcosJH5cNJhrDqOHUK4q/lNKqGSDu4h f7QLkIVvoPw92hGYZmJEuP/dHJPFoZYt8ETGq+V2cAbBVHspZHMxoFzFujkEDcr3kgTe thJuBAASIdvVtS4HnZz5zB0H6Uv+Qj8WQLNpXpXPeaFDJdfio+qTEWlix8vDqEA8WQwB kO+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=snJ5QtAqJDsNt4Xfl4YcXCTOWzgVAR2yWKPNPvtOn7o=; b=ovQVbn1lrdocz3HZ2MGeRMNZPNFEtnFbIu5cZENBFhQ60U9iVtyD/ny2Bjqc5OjR6+ ZaH/cR4Ajsby8MPUBOw26224jtnaUdYjFKVvHFI6AeJYDe+FRgNebl07SHpNoYT0vslK r17W2AETHvnr9+ePnp2ba6uOMbR5qsvK7mygKGl4YyDvrnQF0StT01QYDWksmSJ7ZEaH zC8sluotAKHlGVKVpA7HEI93fu7AQO+bO1UJlBfNDfXwjUfBRkfZjZ6Wf7Ed7/U1mHOk J44gOr0hJnn8cWjmv7Iq2bqAOTtDtKAcwgEzw5i0ofivzVhhwM2djCoqJfJ7ETux1CQU hQ0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NyBjcxiE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si136063oia.219.2020.03.31.16.14.46; Tue, 31 Mar 2020 16:15:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NyBjcxiE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731545AbgCaXNv (ORCPT + 99 others); Tue, 31 Mar 2020 19:13:51 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:53151 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731536AbgCaXNu (ORCPT ); Tue, 31 Mar 2020 19:13:50 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200331231349epoutp03517d62ac6fd855531639cb6196bad949~BhoA7SIn11657116571epoutp03Z for ; Tue, 31 Mar 2020 23:13:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200331231349epoutp03517d62ac6fd855531639cb6196bad949~BhoA7SIn11657116571epoutp03Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1585696429; bh=snJ5QtAqJDsNt4Xfl4YcXCTOWzgVAR2yWKPNPvtOn7o=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=NyBjcxiE90sj9Bh14AgVAAf/Yhp5WytcqxvMZ7vgV1jHeFxOUJt/d3HdykOEyXYFD VBHT4KVdxyekJkjDH95TR/9/hYyjqlgzO8j/VstlqifBPdcoHROu54XrhhIyqQYaH7 KCgb2jti5hUEOvI38okYSoMR28PJxHQRCU2wUSEw= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20200331231348epcas1p161ca93bc171927e4eeac52e605b47f0e~BhoAIwSsW0986109861epcas1p1E; Tue, 31 Mar 2020 23:13:48 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.40.157]) by epsnrtp3.localdomain (Postfix) with ESMTP id 48sQB20pDmzMqYkZ; Tue, 31 Mar 2020 23:13:46 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 94.F8.04071.4AEC38E5; Wed, 1 Apr 2020 08:13:40 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200331231340epcas1p2aa4b2e9484afcb9d55276d704058bac3~Bhn4khfth0625706257epcas1p2A; Tue, 31 Mar 2020 23:13:40 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200331231340epsmtrp22956baba3080982625fa5b60996b5086~Bhn4jrR681277512775epsmtrp24; Tue, 31 Mar 2020 23:13:40 +0000 (GMT) X-AuditID: b6c32a37-7afff70000000fe7-9b-5e83cea4ca9f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C8.F4.04024.3AEC38E5; Wed, 1 Apr 2020 08:13:40 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200331231339epsmtip2901b266e694dbec2d2a33ceab8b3d5d5~Bhn4RUL3c1925719257epsmtip24; Tue, 31 Mar 2020 23:13:39 +0000 (GMT) Subject: Re: [PATCH v1 4/5] PM / devfreq: tegra30: Use clk_round_rate_unboundly() To: Dmitry Osipenko , Thierry Reding , MyungJoo Ham , Kyungmin Park , Jonathan Hunter , Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <147b571a-bae1-8a58-942c-579a5297299b@samsung.com> Date: Wed, 1 Apr 2020 08:22:45 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <20200330231617.17079-5-digetx@gmail.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Ta0hTYRjHebfj2bSWbzPryaDmKSgNdcc1O1lW0G2glBFE9UE76GmK29nY OdrtQyu7OLNIVlBDM8rSjKxUzIxlLCONEkvK7llKWJa21m0U0bZj5Lff+7z/5/J/L0q52k3G KPN5kbPxrIkiI4jmW3GJCdVdxVnagxc1zAVvP2L2uk4TzP09HxWMt+xVGNPTWkEyvkPtiHF8 dZHMg7srmOe7a0nmz+MrBONvPUksHWcYebJPYbjmeqkwNNQ5SMOh4mHScLipDhl8DdMzyU0F i/I4NpezaTg+x5KbzxvTqPR12cuy9SlaOoFewMynNDxr5tKo5RmZCSvzTYHxKE0RayoMhDJZ QaCSFi+yWQpFTpNnEcQ0irPmmqwLrIkC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sZZJYcfMLO0iCWaBE4sSzf6wQHVsZJV5duMECkmAT0JLY/+IG G4jNL6AocfXHY0YQm1fATuLRw6NgcRYBFYmfe/eB2aICYRI7lzxmgqgRlDg58wnYHE4BM4nJ JzrZIJapS/yZd4kZwhaXuPVkPhOELS+x/e0c5gmMwrOQtM9C0jILScssJC0LGFlWMUqmFhTn pucWGxYY5qWW6xUn5haX5qXrJefnbmIER6CW5g7Gy0viDzEKcDAq8fAqWDXHCbEmlhVX5h5i lOBgVhLhZfNviBPiTUmsrEotyo8vKs1JLT7EKM3BoiTO+zTvWKSQQHpiSWp2ampBahFMlomD U6qBkenStwjrnkVSer4LTBrF/ypuX3Bw5Z6W6LA4rc7mDTqL4vtklx3eH8tyL3x3q76dXU1J 7O09mk+UD5pf0Lm1qH3bgbCLmqGtMzZU6K441eLtsafWMaIyZsL591EcKlc3Zyn0t4ic+Nt2 ls/bx7/ysdi6yxFG07mCZyZcXna3VLfx9uwfOw9EKbEUZyQaajEXFScCAIZ8n/y8AgAA X-CMS-MailID: 20200331231340epcas1p2aa4b2e9484afcb9d55276d704058bac3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200330232025epcas1p37cf026c6e46723d416f94b1f005ac5ab References: <20200330231617.17079-1-digetx@gmail.com> <20200330231617.17079-5-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/31/20 8:16 AM, Dmitry Osipenko wrote: > The clk_round_rate() doesn't work for us properly if clock rate is bounded > by a min/max rate that is requested by some other clk-user because we're > building devfreq's OPP table based on the rounding. > > In particular this becomes a problem if display driver is probed earlier > than devfreq, and thus, display adds a memory bandwidth request using > interconnect API, which results in a minimum clock-rate being set for > the memory clk. In a result, the lowest devfreq OPP rate is getting > limited to the minimum rate imposed by the display driver. > > Let's use new clk_round_rate_unboundly() that resolves the problem by > rounding clock rate without taking into account min/max limits imposed by > active clk users. > > Signed-off-by: Dmitry Osipenko > --- > drivers/devfreq/tegra30-devfreq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c > index 28b2c7ca416e..34f6291e880c 100644 > --- a/drivers/devfreq/tegra30-devfreq.c > +++ b/drivers/devfreq/tegra30-devfreq.c > @@ -834,7 +834,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev) > > reset_control_deassert(tegra->reset); > > - rate = clk_round_rate(tegra->emc_clock, ULONG_MAX); > + rate = clk_round_rate_unboundly(tegra->emc_clock, ULONG_MAX); > if (rate < 0) { > dev_err(&pdev->dev, "Failed to round clock rate: %ld\n", rate); > return rate; > @@ -849,7 +849,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev) > } > > for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) { > - rate = clk_round_rate(tegra->emc_clock, rate); > + rate = clk_round_rate_unboundly(tegra->emc_clock, rate); > > if (rate < 0) { > dev_err(&pdev->dev, > Firstly, patch2 have to be reviewed for this patch. I have no any objection. It looks good to me. If patch1 get the confirmation from clock maintainer, feel free to add my acked tag: Acked-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics