Thread (39 messages) 39 messages, 5 authors, 2017-12-02

[PATCH v2 05/18] drm/sun4i: Force the mixer rate at 150MHz

From: Maxime Ripard <hidden>
Date: 2017-11-28 08:58:40
Also in: dri-devel, linux-clk, lkml

On Mon, Nov 27, 2017 at 05:07:04PM +0100, Jernej ?krabec wrote:
Hi Maxime,

Dne ponedeljek, 27. november 2017 ob 16:41:29 CET je Maxime Ripard napisal(a):
quoted
It seems like the mixer can only run properly when clocked at 150MHz. In
order to have something more robust than simply a fire-and-forget
assigned-clocks-rate, let's put that in the code.

Signed-off-by: Maxime Ripard <redacted>
---
 drivers/gpu/drm/sun4i/sun8i_mixer.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c
b/drivers/gpu/drm/sun4i/sun8i_mixer.c index cb193c5f1686..c0cdccf772a2
100644
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
@@ -315,6 +315,13 @@ static int sun8i_mixer_bind(struct device *dev, struct
device *master, }
 	clk_prepare_enable(mixer->mod_clk);

+	/*
+	 * It seems that we need to enforce that rate for whatever
+	 * reason for the mixer to be functional. Make sure it's the
+	 * case.
+	 */
+	clk_set_rate(mixer->mod_clk, 150000000);
+
H3 mixer works at much higher rate and if we want to support tv out, it must 
be dividable by 432 MHz, so either 432 MHz or maybe even 864 MHz.

We talked about that few months ago.

I guess this should be read from mixer configuration structure.
That works for me. Actually, I didn't need it at all for the LVDS
output on the A83t, the default seems to work just fine. Do you know
what it's related to? Maybe we can make that a bit more dynamic?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171128/c95f43bf/attachment-0001.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help