All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: Tero Kristo <t-kristo@ti.com>,
	linux-omap@vger.kernel.org, Nishanth Menon <nm@ti.com>
Subject: Re: HDMI on OMAP4460: clk rate mismatch warning
Date: Wed, 16 Apr 2014 08:40:03 +0300	[thread overview]
Message-ID: <534E17B3.5050109@ti.com> (raw)
In-Reply-To: <CAGhQ9Vx-3H3yCzMv-8Mp83FWv94gOHvHP9hMiaPWHthZR_ezTQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1468 bytes --]

On 15/04/14 20:36, Joachim Eastwood wrote:
> Hello,
> 
> I am trying to get HDMI work with DT on my VAR-STK-OM44 (4460) board.
> But during kernel boot I get the following message:
> 
> [ 0.953796] ------------[ cut here ]------------
> [ 0.953826] WARNING: CPU: 0 PID: 1 at
> drivers/video/omap2/dss/dss.c:483 dss_set_fck_rate+0x7c/0x8c()
> [ 0.953826] clk rate mismatch: 153600000 != 170666666

I have a fix (attached) for this in fbdev-fixes, which I'll probably be
sending to Linus today. I couldn't send it in the main fbdev pull
request, as it depended on clk driver changes. And it's not fatal, most
likely things work fine even with the warning.

> [ 0.954345] OMAP DSS rev 4.0
> [ 0.956970] connector-hdmi connector.10: failed to find video source
> [ 0.957031] connector-hdmi: probe of connector.10 failed with error -22
> [ 0.959167] omapfb omapfb: no displays
> [ 0.961547] omapfb omapfb: failed to setup omapfb
> [ 0.961578] platform omapfb: Driver omapfb requests probe deferral

Your DT data is not right. The shorter endpoint format you use is not
supported. Have a look at arch/arm/boot/dts/omap4-panda-common.dtsi for
an example.

Also the HDMI driver does not currently work if the OMAP HDMI is
directly connected to the HDMI connector. Panda and 4430 SDP boards use
TPD12S015 chip in between. This should be fixed in the future, but at
the moment you'll see problems if your board does not have that chip.

 Tomi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch --]
[-- Type: text/x-diff; name="0001-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch", Size: 1637 bytes --]

From d0e224f9963b79610850b2a10622182176658022 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 13 Feb 2014 11:36:22 +0200
Subject: [PATCH] OMAPDSS: fix rounding when calculating fclk rate

"clk: divider: fix rate calculation for fractional rates" patch (and
similar for TI specific divider) fixes the clk-divider's rounding. This
patch updates the DSS driver to round the rates accordingly.

This fixes the DSS's warnings about clock rate mismatch, and also fixes
the wrong fclk rate being set.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Christoph Fritz <chf.fritz@googlemail.com>
Tested-by: Marek Belisko <marek@goldelico.com>
---
 drivers/video/omap2/dss/dss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 825c019ddee7..d55266c0e029 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -457,7 +457,7 @@ bool dss_div_calc(unsigned long pck, unsigned long fck_min,
 	fckd_stop = max(DIV_ROUND_UP(prate * m, fck_hw_max), 1ul);
 
 	for (fckd = fckd_start; fckd >= fckd_stop; --fckd) {
-		fck = prate / fckd * m;
+		fck = DIV_ROUND_UP(prate, fckd) * m;
 
 		if (func(fck, data))
 			return true;
@@ -506,7 +506,7 @@ static int dss_setup_default_clock(void)
 
 		fck_div = DIV_ROUND_UP(prate * dss.feat->dss_fck_multiplier,
 				max_dss_fck);
-		fck = prate / fck_div * dss.feat->dss_fck_multiplier;
+		fck = DIV_ROUND_UP(prate, fck_div) * dss.feat->dss_fck_multiplier;
 	}
 
 	r = dss_set_fck_rate(fck);
-- 
1.8.3.2


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-04-16  5:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 17:36 HDMI on OMAP4460: clk rate mismatch warning Joachim Eastwood
2014-04-16  5:40 ` Tomi Valkeinen [this message]
2014-04-16 16:11   ` Joachim Eastwood
2014-04-17  7:24     ` Tomi Valkeinen
2014-04-17  8:56       ` Joachim Eastwood
2014-04-17  9:11         ` Joachim Eastwood

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=534E17B3.5050109@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=nm@ti.com \
    --cc=t-kristo@ti.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.