mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Taniya Das <tdas@codeaurora.org>
To: spanda@codeaurora.org, Stephen Boyd <sboyd@kernel.org>
Cc: Abhinav Kumar <abhinavk@codeaurora.org>,
	Michael Turquette <mturquette@baylibre.com>,
	ryadav@codeaurora.org, Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Amit Nischal <anischal@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] clk: qcom: Add display clock controller driver for SDM845
Date: Mon, 16 Jul 2018 11:27:48 +0530	[thread overview]
Message-ID: <9210818b-ed68-bbfc-2140-a872a6621f0e@codeaurora.org> (raw)
In-Reply-To: <9509c88c112d59874e28459d8f87509f@codeaurora.org>

Hello Stephen,

On 7/13/2018 1:55 PM, spanda@codeaurora.org wrote:
> On 2018-07-13 01:11, Stephen Boyd wrote:
>> Quoting Taniya Das (2018-07-12 10:21:33)
>>> ++ Display driver team,
>>>
>>> On 7/9/2018 8:36 PM, Stephen Boyd wrote:
>>> > Quoting Taniya Das (2018-07-09 02:34:07)
>>> >>
>>> >>
>>> >> On 7/9/2018 1:07 PM, Stephen Boyd wrote:
>>> >>> Quoting Taniya Das (2018-07-09 00:07:21)
>>> >>>>
>>> >>>>
>>> >>>> On 7/9/2018 11:46 AM, Stephen Boyd wrote:
>>> >>>>>>
>>> >>>>>>     > Why is the nocache flag needed? Applies to all clks in 
>>> this file.
>>> >>>>>>     >
>>> >>>>>>
>>> >>>>>> This flag is required for all RCGs whose PLLs are controlled 
>>> outside the
>>> >>>>>> clock controller. The display code would require the 
>>> recalculated rate
>>> >>>>>> always.
>>> >>>>>
>>> >>>>> Right. Why is the PLL controlled outside of the clock 
>>> controller? The
>>> >>>>> rate should propagate upward to the PLL from here, so who's going
>>> >>>>> outside of that?
>>> >>>>>
>>> >>>> The DSI0/1 PLL are not part of the display clock controller, but 
>>> in the
>>> >>>> display subsystem which are managed by the DRM drivers. When DRM 
>>> drivers
>>> >>>> query for the rate clock driver should always return the non 
>>> cached rates.
>>> >>>
>>> >>> Why? Is the DSI PLL changing rate all the time, randomly, without 
>>> going
>>> >>> through the clk APIs to do so?
>>> >>>
>>> >>
>>> >> Hmm, I am afraid I do not have an answer for this, but this was the
>>> >> requirement to always return the non cached rates from the clock 
>>> driver.
>>> >>
>>> >
>>> > Ok. Who knows about this requirement? Can we add someone from the
>>> > display driver to understand more?
>>> >
>>> As per my discussions offline with the display teams,
>>>
>>> There is a use-case where the clock framework is unaware of the PLL VCO
>>> frequency change and thus the drivers would query to get the actual HW
>>> frequency rather than the cached one.
>>>
>>> Do you think keeping these flags would have any impact other than always
>>> getting the non-cached rates?
>>>
>>
>> The flag will make it so clk_get_rate() works in spite of something
>> changing the frequency behind the framework's back, but I want to
>> understand what and why it's changing without framework involvement. We
>> shouldn't need the flag here, because this flag is typically for clks
>> that are controlled by some other entity that the kernel doesn't have
>> control over. In this case, it seems like we have full control of the
>> clk tree for the display PLL down to this clk, so it should be perfectly
>> fine to not have this flag. The presence of the flag means that the
>> display driver is doing something wrong.
> 
> These clocks are sourced from DSI PLL. In dsi command mode there is an 
> idle use case when there
> is no activity on display, we switch of the source DSI PLL to save power 
> by calling clk_disable_unprepare().
> In this scenario if some client queries the clk_get_rate(), then if 
> NO_CACHE flag is used the clk
> driver will return the cached rate which is some non-zero value set when 
> we last called clk_set_rate(),
> before enabling the clock, whereas actually in HW this clk is disabled. 
> So we used the NO_CACHE flag
> for the call to land in clk_recalc_rate and we return zero if the PLL is 
> disabled.
> I remember some customer had scripts that runs through all the clocks 
> during idle screen scenario
> and call clk_get_rate(), where they complained display clk_get_rate 
> returns none zero value.
> 
> 

Do you think the clock driver needs any update for flag for the next series?

> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

  reply	other threads:[~2018-07-16  5:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-23 14:19 [PATCH v3 0/3] " Taniya Das
2018-06-23 14:19 ` [PATCH v3 1/3] clk: qcom: Move frequency table macro to common file Taniya Das
2018-07-08 23:49   ` Stephen Boyd
2018-06-23 14:19 ` [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Display clock bindings Taniya Das
2018-07-08 23:50   ` Stephen Boyd
2018-06-23 14:19 ` [PATCH v3 3/3] clk: qcom: Add display clock controller driver for SDM845 Taniya Das
2018-07-08 23:54   ` Stephen Boyd
2018-07-09  3:38     ` Taniya Das
2018-07-09  6:16       ` Stephen Boyd
2018-07-09  7:07         ` Taniya Das
2018-07-09  7:37           ` Stephen Boyd
2018-07-09  9:34             ` Taniya Das
2018-07-09 15:06               ` Stephen Boyd
2018-07-12 17:21                 ` Taniya Das
2018-07-12 19:41                   ` Stephen Boyd
2018-07-13  8:25                     ` spanda
2018-07-16  5:57                       ` Taniya Das [this message]
2018-07-24 17:32                       ` Stephen Boyd

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=9210818b-ed68-bbfc-2140-a872a6621f0e@codeaurora.org \
    --to=tdas@codeaurora.org \
    --cc=abhinavk@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=anischal@codeaurora.org \
    --cc=david.brown@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rnayak@codeaurora.org \
    --cc=ryadav@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=spanda@codeaurora.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®