From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424264AbdD1HSC (ORCPT ); Fri, 28 Apr 2017 03:18:02 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:5761 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162010AbdD1HRu (ORCPT ); Fri, 28 Apr 2017 03:17:50 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 28 Apr 2017 00:17:48 -0700 Date: Fri, 28 Apr 2017 10:17:43 +0300 From: Peter De Schrijver To: Stephen Boyd CC: Michael Turquette , , Subject: Re: [PATCH] clk: Re-evaluate clock rate on min/max update Message-ID: <20170428071743.GL30730@tbergstrom-lnx.Nvidia.com> References: <1490103807-21821-1-git-send-email-pdeschrijver@nvidia.com> <20170412164605.GO7065@codeaurora.org> <20170413074819.GS30730@tbergstrom-lnx.Nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170413074819.GS30730@tbergstrom-lnx.Nvidia.com> X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.21.24.170] X-ClientProxiedBy: UKMAIL101.nvidia.com (10.26.138.13) To UKMAIL101.nvidia.com (10.26.138.13) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 13, 2017 at 10:48:19AM +0300, Peter De Schrijver wrote: > On Wed, Apr 12, 2017 at 09:46:05AM -0700, Stephen Boyd wrote: > > On 03/21, Peter De Schrijver wrote: > > > Whenever a user change its min or max rate limit of a clock, we need to > > > re-evaluate the current clock rate and possibly change it if the new limits > > > require so. To do this clk_set_rate_range() already calls > > > clk_core_set_rate_nolock, however this won't have the intended effect > > > because the core clock rate hasn't changed. To fix this, move the test to > > > avoid setting the same core clock rate again, to clk_set_rate() so > > > clk_core_set_rate_nolock() can change the clock rate when min or max have > > > been updated, even when the core clock rate has not changed. > > > > I'd expect some sort of Fixes: tag here? Or it never worked!? > > I don't think this ever worked. > > > > > > > > > Signed-off-by: Peter De Schrijver > > > > I seem to recall some problems here around rate aggregation that > > we fixed after the patches merged. Sorry, but I have to go back > > and look at those conversations to refresh my memory and make > > sure this is all fine. > > > > Are you relying on the rate setting op to be called with the new > > min/max requirements if the aggregated rate is the same? I don't > > understand why clk drivers care. > > > > No. But I do rely on the rate setting op to be called when a new min or max > rate would cause the rate to be changed even when there is no new rate request. > > Eg: > > min = 100MHz, max = 500MHz, current rate request is 400MHz, then max changes to > 300MHz. Today the rate setting op will not be called, while I think it should > be called to lower the rate to 300MHz. > Any news on this? or do you think this is an unreasonable assumption? Thanks, Peter.