From: Stephen Boyd <sboyd@kernel.org>
To: Andrew Jeffery <andrew@aj.id.au>,
Eddie James <eajames@linux.ibm.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>,
Joel Stanley <joel@jms.id.au>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Michael Turquette <mturquette@baylibre.com>
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: Re: [PATCH v2 1/1] media: aspeed: fix clock handling logic
Date: Mon, 08 Feb 2021 23:36:39 -0800 [thread overview]
Message-ID: <161285619930.76967.620222959363595605@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <20201221223225.14723-2-jae.hyun.yoo@linux.intel.com>
Quoting Jae Hyun Yoo (2020-12-21 14:32:25)
> 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.
>
> Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver")
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
> Reviewed-by: Eddie James <eajames@linux.ibm.com>
>
> clk: ast2600: fix reset settings for eclk and vclk
>
> 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.
>
> Fixes: d3d04f6c330a ("clk: Add support for AST2600 SoC")
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
prev parent reply other threads:[~2021-02-09 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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
2021-01-07 10:06 ` Hans Verkuil
2021-02-09 7:36 ` Stephen Boyd [this message]
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=161285619930.76967.620222959363595605@swboyd.mtv.corp.google.com \
--to=sboyd@kernel.org \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jae.hyun.yoo@linux.intel.com \
--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 \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).