From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> To: Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Eddie James <eajames@linux.ibm.com>, Stephen Boyd <sboyd@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: linux-clk@vger.kernel.org, linux-media@vger.kernel.org, openbmc@lists.ozlabs.org, linux-aspeed@lists.ozlabs.org, Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Subject: [PATCH v2 0/1] Fix kernel panic issues caused by AST2500 Video Engine Date: Mon, 21 Dec 2020 14:32:24 -0800 [thread overview] Message-ID: <20201221223225.14723-1-jae.hyun.yoo@linux.intel.com> (raw) 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 squashed patch. Changes since v1: - Squashed two patches due to dependency. Jae Hyun Yoo (1): 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
WARNING: multiple messages have this Message-ID (diff)
From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> To: Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Eddie James <eajames@linux.ibm.com>, Stephen Boyd <sboyd@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: openbmc@lists.ozlabs.org, Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>, linux-clk@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-media@vger.kernel.org Subject: [PATCH v2 0/1] Fix kernel panic issues caused by AST2500 Video Engine Date: Mon, 21 Dec 2020 14:32:24 -0800 [thread overview] Message-ID: <20201221223225.14723-1-jae.hyun.yoo@linux.intel.com> (raw) 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 squashed patch. Changes since v1: - Squashed two patches due to dependency. Jae Hyun Yoo (1): 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
next reply other threads:[~2020-12-21 22:23 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-21 22:32 Jae Hyun Yoo [this message] 2020-12-21 22:32 ` [PATCH v2 0/1] Fix kernel panic issues caused by AST2500 Video Engine Jae Hyun Yoo 2020-12-21 22:32 ` [PATCH v2 1/1] media: aspeed: fix clock handling logic Jae Hyun Yoo 2020-12-21 22:32 ` Jae Hyun Yoo 2021-01-07 10:06 ` Hans Verkuil 2021-01-07 10:06 ` Hans Verkuil 2021-02-09 7:36 ` Stephen Boyd 2021-02-09 7:36 ` Stephen Boyd
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=20201221223225.14723-1-jae.hyun.yoo@linux.intel.com \ --to=jae.hyun.yoo@linux.intel.com \ --cc=andrew@aj.id.au \ --cc=eajames@linux.ibm.com \ --cc=hverkuil-cisco@xs4all.nl \ --cc=joel@jms.id.au \ --cc=linux-aspeed@lists.ozlabs.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=mchehab@kernel.org \ --cc=mturquette@baylibre.com \ --cc=openbmc@lists.ozlabs.org \ --cc=sboyd@kernel.org \ /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: linkBe 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.