All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] clk: Meson8/8b/8m2: fix the mali clock flags
@ 2019-12-15 21:01 ` Martin Blumenstingl
  0 siblings, 0 replies; 21+ messages in thread
From: Martin Blumenstingl @ 2019-12-15 21:01 UTC (permalink / raw)
  To: linux-amlogic, jbrunet, narmstrong
  Cc: mturquette, sboyd, linux-clk, linux-arm-kernel, linux-kernel,
	Martin Blumenstingl

While playing with devfreq support for the lima driver I experienced
sporadic (random) system lockups. It turned out that this was in
certain cases when changing the mali clock.

The Amlogic vendor GPU platform driver (which is responsible for
changing the clock frequency) uses the following pattern when updating
the mali clock rate:
- at initialization: initialize the two mali_0 and mali_1 clock trees
  with a default setting and enable both clocks
- when changing the clock frequency:
-- set HHI_MALI_CLK_CNTL[31] to temporarily use the mali_1 clock output
-- update the mali_0 clock tree (set the mux, divider, etc.)
-- clear HHI_MALI_CLK_CNTL[31] to temporarily use the mali_0 clock
   output again

With the common clock framework we can even do better:
by setting CLK_SET_RATE_PARENT for the mali_0 and mali_1 output gates
we can force the common clock framework to update the "inactive" clock
and then switch to it's output.

I only tested this patch for a limited time only (approx. 2 hours).
So far I couldn't reproduce the sporadic system lockups with it.
However, broader testing would be great so I would like this to be
applied for -next.


Martin Blumenstingl (1):
  clk: meson: meson8b: make the CCF use the glitch-free "mali" mux

 drivers/clk/meson/meson8b.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-12-26  9:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15 21:01 [PATCH 0/1] clk: Meson8/8b/8m2: fix the mali clock flags Martin Blumenstingl
2019-12-15 21:01 ` Martin Blumenstingl
2019-12-15 21:01 ` Martin Blumenstingl
2019-12-15 21:01 ` [PATCH 1/1] clk: meson: meson8b: make the CCF use the glitch-free "mali" mux Martin Blumenstingl
2019-12-15 21:01   ` Martin Blumenstingl
2019-12-15 21:01   ` Martin Blumenstingl
2019-12-16  9:13 ` [PATCH 0/1] clk: Meson8/8b/8m2: fix the mali clock flags Jerome Brunet
2019-12-16  9:13   ` Jerome Brunet
2019-12-16  9:13   ` Jerome Brunet
2019-12-16 17:50   ` Stephen Boyd
2019-12-16 17:50     ` Stephen Boyd
2019-12-16 17:50     ` Stephen Boyd
2019-12-16 19:17     ` Jerome Brunet
2019-12-16 19:17       ` Jerome Brunet
2019-12-16 19:17       ` Jerome Brunet
2019-12-24  3:36       ` Stephen Boyd
2019-12-24  3:36         ` Stephen Boyd
2019-12-24  3:36         ` Stephen Boyd
2019-12-26  9:06         ` Jerome Brunet
2019-12-26  9:06           ` Jerome Brunet
2019-12-26  9:06           ` Jerome Brunet

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.