From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752625AbdLLVhg (ORCPT ); Tue, 12 Dec 2017 16:37:36 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:45588 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447AbdLLVhe (ORCPT ); Tue, 12 Dec 2017 16:37:34 -0500 X-Google-Smtp-Source: ACJfBotljjsgMjsJEzjajnlXfSqP+UL31DmNi0hXDXAcCz3keUUw6F1ZCEaJkBpGss9msuP8vFYW2g== Subject: Re: [PATCH v1] clk: tegra20: Add 216 MHz entry for PLL_X To: Peter De Schrijver Cc: Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter , linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171212100200.GW32106@tbergstrom-lnx.Nvidia.com> <508cb22d-42cb-d169-dbea-0073d7a4e034@gmail.com> <20171212151749.GA29158@tbergstrom-lnx.Nvidia.com> From: Dmitry Osipenko Message-ID: <1469d692-077a-93c7-8722-1bf86e53f481@gmail.com> Date: Wed, 13 Dec 2017 00:37:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171212151749.GA29158@tbergstrom-lnx.Nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12.12.2017 18:17, Peter De Schrijver wrote: > On Tue, Dec 12, 2017 at 03:08:08PM +0300, Dmitry Osipenko wrote: >> On 12.12.2017 13:02, Peter De Schrijver wrote: >>> On Mon, Dec 11, 2017 at 09:50:09PM +0300, Dmitry Osipenko wrote: >>>> The cpufreq driver uses 216 MHz as the lowest CPU clock frequency, but >>>> clock driver doesn't provide that rate, so the requested clock is rounded >>>> up to 312 MHz. Let's add entry for 216 MHz to match with cpufreq. >>>> >>> >>> This seems odd. If there's no table entry, _calc_rate should kick in and >>> calculate the parameters for 216MHz. Any idea why this is not happening? >> >> Actually, it is happening. Please ignore this patch. >> >> If PLL's rate could be calculated, why do we need the predefined tables? > > The algorithm to calculate the PLL parameters is rather crude. It will > favour undershooting the rate rather than overshooting. This is fine for > DVFS usecases when you want to avoid a too high clock rate, but not good > for eg display or memory, where as close as match as possible is needed. Okay, thank you for the clarification.