From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 2/2] soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off
Date: Wed, 17 Jan 2018 09:34:27 +0100 [thread overview]
Message-ID: <cd5e69ba-0e48-f8fc-87ba-db71d4436733@baylibre.com> (raw)
In-Reply-To: <c925832c-2420-10f4-4510-a236384181de@gmail.com>
On 21/12/2017 20:41, Heiner Kallweit wrote:
> When operating the system headless headless, the domain is never
> powered on, leaving the clocks disabled. The shutdown function then
> tries to disable the already disabled clocks, resulting in errors.
> Therefore call meson_gx_pwrc_vpu_power_off() only if domain is
> powered on.
> This patch fixes the described issue on my system (Odorid-C2).
>
> Fixes: 339cd0ea0822 "soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader"
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> index 3adb2f2ec..6289965c4 100644
> --- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> +++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> @@ -225,7 +225,11 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
>
> static void meson_gx_pwrc_vpu_shutdown(struct platform_device *pdev)
> {
> - meson_gx_pwrc_vpu_power_off(&vpu_hdmi_pd.genpd);
> + bool powered_off;
> +
> + powered_off = meson_gx_pwrc_vpu_get_power(&vpu_hdmi_pd);
> + if (!powered_off)
> + meson_gx_pwrc_vpu_power_off(&vpu_hdmi_pd.genpd);
> }
>
> static const struct of_device_id meson_gx_pwrc_vpu_match_table[] = {
>
Ok, this occurs using mainline U-Boot, but with Meson DRM driver disabled,
this use case should be covered.
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
next prev parent reply other threads:[~2018-01-17 8:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 19:37 [PATCH 0/2] soc: amlogic: meson-gx-pwrc-vpu: fix two issues Heiner Kallweit
2017-12-21 19:40 ` [PATCH 1/2] soc: amlogic: meson-gx-pwrc-vpu: don't print error message on probe deferral Heiner Kallweit
2018-01-17 8:26 ` Neil Armstrong
2017-12-21 19:41 ` [PATCH 2/2] soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off Heiner Kallweit
2018-01-17 8:34 ` Neil Armstrong [this message]
2018-01-19 18:09 ` [PATCH 0/2] soc: amlogic: meson-gx-pwrc-vpu: fix two issues Kevin Hilman
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=cd5e69ba-0e48-f8fc-87ba-db71d4436733@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=linus-amlogic@lists.infradead.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).