All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix kernel panic issues caused by AST2500 Video Engine
@ 2020-12-07 16:42 ` Jae Hyun Yoo
  0 siblings, 0 replies; 22+ messages in thread
From: Jae Hyun Yoo @ 2020-12-07 16:42 UTC (permalink / raw)
  To: Joel Stanley, Andrew Jeffery, Eddie James, Stephen Boyd,
	Michael Turquette, Mauro Carvalho Chehab, Hans Verkuil
  Cc: linux-clk, linux-media, openbmc, linux-aspeed, Jae Hyun Yoo

Video engine uses eclk and vclk for its clock sources and its reset
control is coupled with eclk so the current clock enabling sequence works
like below.

 Enable eclk
 De-assert Video Engine reset
 10ms delay
 Enable vclk

It introduces improper reset on the Video Engine hardware and eventually
the hardware generates unexpected DMA memory transfers that can corrupt
memory region in random and sporadic patterns. This issue is observed
very rarely on some specific AST2500 SoCs but it causes a critical
kernel panic with making a various shape of signature so it's extremely
hard to debug. Moreover, the issue is observed even when the video
engine is not actively used because udevd turns on the video engine
hardware for a short time to make a query in every boot.

To fix this issue, this commit changes the clock handling logic to make
the reset de-assertion triggered after enabling both eclk and vclk. Also,
it adds clk_unprepare call for a case when probe fails.

In case of AST2600, the video engine reset setting should be coupled with
eclk to match it with the setting for previous Aspeed SoCs which is defined
in clk-aspeed.c since all Aspeed SoCs are sharing a single video engine
driver. Also, reset bit 6 is defined as 'Video Engine' reset in datasheet
so it should be de-asserted when eclk is enabled. This commit fixes the
setting too.

Please review this patch series.

Jae Hyun Yoo (2):
  clk: ast2600: fix reset settings for eclk and vclk
  media: aspeed: fix clock handling logic

 drivers/clk/clk-ast2600.c             | 4 ++--
 drivers/media/platform/aspeed-video.c | 9 ++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-12-21 20:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 16:42 [PATCH 0/2] Fix kernel panic issues caused by AST2500 Video Engine Jae Hyun Yoo
2020-12-07 16:42 ` Jae Hyun Yoo
2020-12-07 16:42 ` [PATCH 1/2] clk: ast2600: fix reset settings for eclk and vclk Jae Hyun Yoo
2020-12-07 16:42   ` Jae Hyun Yoo
2020-12-08  2:27   ` Joel Stanley
2020-12-08  2:27     ` Joel Stanley
2020-12-07 16:42 ` [PATCH 2/2] media: aspeed: fix clock handling logic Jae Hyun Yoo
2020-12-07 16:42   ` Jae Hyun Yoo
2020-12-08  2:39   ` Joel Stanley
2020-12-08  2:39     ` Joel Stanley
2020-12-08 17:16     ` Jae Hyun Yoo
2020-12-08 17:16       ` Jae Hyun Yoo
2020-12-17 10:46       ` Stephen Boyd
2020-12-17 10:46         ` Stephen Boyd
2020-12-17 19:54         ` Jae Hyun Yoo
2020-12-17 19:54           ` Jae Hyun Yoo
2020-12-20  0:08           ` Stephen Boyd
2020-12-20  0:08             ` Stephen Boyd
2020-12-21 20:31             ` Jae Hyun Yoo
2020-12-21 20:31               ` Jae Hyun Yoo
2020-12-08  2:44   ` Eddie James
2020-12-08  2:44     ` Eddie James

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.