All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-clk@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>
Subject: Re: [PATCH] clk: core: Force setting the phase delay when no change
Date: Mon, 15 Aug 2016 11:29:59 -0700	[thread overview]
Message-ID: <20160815182959.GV361@codeaurora.org> (raw)
In-Reply-To: <20160813164656.DD30A61A06@smtp.codeaurora.org>

On 08/13, Jean-Francois Moine wrote:
> The hardware phase delay may depend on some other settings as clock
> reparenting, so, it has to be set each time.
> Also, when the delay was the same as previously, an error was returned.
> 
> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
> ---

This effectively reverts commit 023bd7166be0 (clk: skip
unnecessary set_phase if nothing to do, 2016-02-26), so I'd like
to see if Shawn has any comments or if that patch was just a
broken optimization.

We may want to go another route and get the phase from the
hardware and compare that to what's requested. That way we don't
set the phase again unnecessarily.

>  drivers/clk/clk.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 820a939..2e6b91e 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1908,10 +1908,6 @@ int clk_set_phase(struct clk *clk, int degrees)
>  
>  	clk_prepare_lock();
>  
> -	/* bail early if nothing to do */
> -	if (degrees == clk->core->phase)
> -		goto out;
> -
>  	trace_clk_set_phase(clk->core, degrees);
>  
>  	if (clk->core->ops->set_phase)

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

       reply	other threads:[~2016-08-15 18:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160813164656.DD30A61A06@smtp.codeaurora.org>
2016-08-15 18:29 ` Stephen Boyd [this message]
2016-08-17  1:00   ` [PATCH] clk: core: Force setting the phase delay when no change Shawn Lin
2016-08-17  6:34     ` Jean-Francois Moine
2016-08-17  7:50       ` Shawn Lin
2016-08-17  8:15       ` Shawn Lin
2016-08-17  9:35         ` Jean-Francois Moine
     [not found] <20160813164412.2671726A@mail.free-electrons.com>
     [not found] ` <20160813164412.2671726A-gkR8zOBocaguO6hRkyHJVMk87cqNqjZ2@public.gmane.org>
2016-08-24  6:15   ` Maxime Ripard
2016-08-24  6:15     ` Maxime Ripard
2016-08-13 16:23 Jean-Francois Moine
  -- strict thread matches above, loose matches on Subject: below --
2016-08-13 16:23 Jean-Francois Moine
2016-08-13 16:23 Jean-Francois Moine
2016-08-13 16:23 Jean-Francois Moine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160815182959.GV361@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=moinejf@free.fr \
    --cc=mturquette@baylibre.com \
    --cc=shawn.lin@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.