Re: HDMI on OMAP4460: clk rate mismatch warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

From d0e224f9963b79610850b2a10622182176658022 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
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@xxxxxx>
Tested-by: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx>
Tested-by: Marek Belisko <marek@xxxxxxxxxxxxx>
---
 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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux