lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJMQK-jYb_0+AA_bBrvkJ4JaT1mQTr6uGZQbbpnyA1CJ_NLKuw@mail.gmail.com>
Date:   Tue, 11 May 2021 12:34:09 +0800
From:   Hsin-Yi Wang <hsinyi@...omium.org>
To:     Pi-Hsun Shih <pihsun@...omium.org>
Cc:     Tzung-Bi Shih <tzungbi@...gle.com>,
        Andrzej Hajda <a.hajda@...sung.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Robert Foss <robert.foss@...aro.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...l.net>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Xin Ji <xji@...logixsemi.com>,
        Sam Ravnborg <sam@...nborg.org>,
        "open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] drm/bridge: anx7625: add suspend / resume hooks

On Mon, May 10, 2021 at 1:31 PM Pi-Hsun Shih <pihsun@...omium.org> wrote:
>
> Add suspend / resume hooks for anx7625 driver, that power off the device
> on suspend and power on the device on resume if it was previously
> powered.
>
> Signed-off-by: Pi-Hsun Shih <pihsun@...omium.org>

Tested-by: Hsin-Yi Wang <hsinyi@...omium.org>

Tested on a mt8183 juniper device.

> ---
>
> Changes from v2:
> * No change.
>
> ---
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 27 +++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index e1bf31eafe22..b165ef71e00f 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1705,7 +1705,34 @@ static int __maybe_unused anx7625_runtime_pm_resume(struct device *dev)
>         return 0;
>  }
>
> +static int __maybe_unused anx7625_resume(struct device *dev)
> +{
> +       struct anx7625_data *ctx = dev_get_drvdata(dev);
> +
> +       if (!ctx->pdata.intp_irq)
> +               return 0;
> +
> +       if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev))
> +               anx7625_runtime_pm_resume(dev);
> +
> +       return 0;
> +}
> +
> +static int __maybe_unused anx7625_suspend(struct device *dev)
> +{
> +       struct anx7625_data *ctx = dev_get_drvdata(dev);
> +
> +       if (!ctx->pdata.intp_irq)
> +               return 0;
> +
> +       if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev))
> +               anx7625_runtime_pm_suspend(dev);
> +
> +       return 0;
> +}
> +
>  static const struct dev_pm_ops anx7625_pm_ops = {
> +       SET_SYSTEM_SLEEP_PM_OPS(anx7625_suspend, anx7625_resume)
>         SET_RUNTIME_PM_OPS(anx7625_runtime_pm_suspend,
>                            anx7625_runtime_pm_resume, NULL)
>  };
> --
> 2.31.1.607.g51e8a6a459-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ