linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Adam Ford <aford173@gmail.com>, Tero Kristo <t-kristo@ti.com>
Cc: "Tony Lindgren" <tony@atomide.com>,
	Linux-OMAP <linux-omap@vger.kernel.org>,
	"Adam Ford" <adam.ford@logicpd.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	devicetree <devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/omap: Migrate minimum FCK/PCK ratio from Kconfig to dts
Date: Mon, 30 Sep 2019 16:35:38 +0300	[thread overview]
Message-ID: <d2bec234-be61-5ac1-2899-63d29660a80c@ti.com> (raw)
In-Reply-To: <CAHCN7xKKNpQwWZkg-JBncp9=VOcLJFEkcvST=rZqv-i9+5_Q2g@mail.gmail.com>

On 30/09/2019 16:17, Adam Ford wrote:

>>> It looks like it's unhappy that its trying to get one frequency and
>>> getting something different instead.
>>>
>>> [   10.014099] WARNING: CPU: 0 PID: 111 at
>>> drivers/gpu/drm/omapdrm/dss/dss.c:655 dss_set_fck_rate+0x70/0x90
>>> [omapdss]
>>> [   10.014129] clk rate mismatch: 27870968 != 27000000
>>
>> I believe this one is for Tomi to comment, his driver does some magic
>> compares for the requested vs. actual received clock rates. If I am not
>> mistaken, we are only modifying an integer divider here, and thus it is
>> physically impossible to get accurate 27MHz rate to display.
> 
> I didn't expect exactly 27MHz,but the back trace is what concerns me more.

Ah sorry... DSS driver knows the max divider value, so that it can 
iterate over all the rates to find a good one.

I'll send a patch later, but look for omap3630_dss_feats in dss.c, and 
change fck_div_max from 32 to 16.

> However, looking at
> # cat clk/dpll4_ck/clk_rate
> 864000000
> 
> It seems like 864000000 / 32 would be 27 MHz, but instead we're
> dividing it by 31 yielding 27870968.  I don't know the clocking
> architecture, so I don't know what your patch actually did or how the
> divide by 16 limit worked into this.  If lck cannot divide by 32, it
> would be nice to see if it could divide by 27 to get to 32MHz.  From
> there, the pck could then divide by 4 yielding 9MHz.

That's pretty odd. With Tero's patch (I didn't test it though) the max 
divider should be 16. So the minimum fclk rate should be 54MHz. But 
somehow the clock framework managed to produce 27870968...

  Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  reply	other threads:[~2019-09-30 13:35 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 19:42 [PATCH] drm/omap: Migrate minimum FCK/PCK ratio from Kconfig to dts Adam Ford
2019-05-28 11:11 ` Tomi Valkeinen
2019-05-28 15:09   ` Adam Ford
2019-05-28 15:20     ` H. Nikolaus Schaller
2019-05-28 15:53     ` Tomi Valkeinen
2019-05-31 12:13       ` Adam Ford
2019-09-25 20:51       ` Adam Ford
2019-09-26  6:55         ` Tomi Valkeinen
2019-09-26 14:12           ` Adam Ford
2019-09-27  6:21             ` Tomi Valkeinen
2019-09-27 12:13               ` Adam Ford
2019-09-27 13:45                 ` Tomi Valkeinen
2019-09-27  7:55             ` Tomi Valkeinen
2019-09-27 12:33               ` Adam Ford
2019-09-27 13:47                 ` Tomi Valkeinen
2019-09-27 15:37                   ` Tero Kristo
2019-09-27 15:47                     ` Tomi Valkeinen
2019-09-30  6:45                       ` Tomi Valkeinen
2019-09-30  8:53                         ` Tero Kristo
2019-09-30 12:41                           ` Adam Ford
2019-09-30 12:47                             ` Tero Kristo
2019-09-30 13:17                               ` Adam Ford
2019-09-30 13:35                                 ` Tomi Valkeinen [this message]
2019-09-30 13:38                           ` H. Nikolaus Schaller
2019-09-30 13:54                             ` Adam Ford
2019-09-30 14:04                               ` Adam Ford
2019-09-30 14:12                                 ` Adam Ford
2019-09-30 14:20                                   ` Tomi Valkeinen
2019-09-30 14:27                                     ` Tomi Valkeinen
2019-09-30 14:56                                       ` H. Nikolaus Schaller
2019-09-30 15:10                                       ` Adam Ford
2019-09-30 17:48                                         ` Tero Kristo
2019-10-01  5:07                                           ` Tomi Valkeinen
2019-10-01  5:12                                             ` Tero Kristo
2019-10-01  8:12                                             ` Tero Kristo
2019-10-01  9:31                                               ` Tomi Valkeinen
2019-10-01 13:06                                                 ` Adam Ford
2019-10-01 13:14                                                   ` Tomi Valkeinen
2019-09-25 21:26   ` Andrew F. Davis
2019-06-13 20:22 ` Rob Herring

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=d2bec234-be61-5ac1-2899-63d29660a80c@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=adam.ford@logicpd.com \
    --cc=aford173@gmail.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).