[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFqt6zY_KUx0RgRiuTt6x6xmtfwD=iR8xR6665eZYmKmXKgDNA@mail.gmail.com>
Date: Thu, 26 Jul 2018 13:37:31 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: z.liuxinliang@...ilicon.com, Zou Rongrong <zourongrong@...il.com>,
kong.kongxinwei@...ilicon.com, puck.chen@...ilicon.com,
airlied@...ux.ie, noralf@...nnes.org,
Souptick Joarder <jrdr.linux@...il.com>,
Sean Paul <seanpaul@...omium.org>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Ajit Linux <ajitn.linux@...il.com>,
Sabyasachi Gupta <sabyasachi.linux@...il.com>,
Brajeswar Ghosh <brajeswar.linux@...il.com>,
Daniel Vetter <daniel@...ll.ch>
Subject: Re: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume()
On Thu, Jul 19, 2018 at 9:34 PM, Souptick Joarder <jrdr.linux@...il.com> wrote:
> convert drm_atomic_helper_suspend/resume() to use
> drm_mode_config_helper_suspend/resume().
>
> Fixed one sparse warning by making hibmc_drm_interrupt
> static.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
> Signed-off-by: Ajit Negi <ajitn.linux@...il.com>
> ---
Any comment on this patch ?
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++----------------
> 1 file changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index d4f6f1f..2261676 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -37,7 +37,7 @@
> .llseek = no_llseek,
> };
>
> -irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
> +static irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
> {
> struct drm_device *dev = (struct drm_device *)arg;
> struct hibmc_drm_private *priv =
> @@ -74,30 +74,22 @@ static int __maybe_unused hibmc_pm_suspend(struct device *dev)
> {
> struct pci_dev *pdev = to_pci_dev(dev);
> struct drm_device *drm_dev = pci_get_drvdata(pdev);
> - struct hibmc_drm_private *priv = drm_dev->dev_private;
> -
> - drm_kms_helper_poll_disable(drm_dev);
> - priv->suspend_state = drm_atomic_helper_suspend(drm_dev);
> - if (IS_ERR(priv->suspend_state)) {
> - DRM_ERROR("drm_atomic_helper_suspend failed: %ld\n",
> - PTR_ERR(priv->suspend_state));
> - drm_kms_helper_poll_enable(drm_dev);
> - return PTR_ERR(priv->suspend_state);
> - }
> + int ret = 0;
>
> - return 0;
> + ret = drm_mode_config_helper_suspend(drm_dev);
> +
> + return ret;
> }
>
> static int __maybe_unused hibmc_pm_resume(struct device *dev)
> {
> struct pci_dev *pdev = to_pci_dev(dev);
> struct drm_device *drm_dev = pci_get_drvdata(pdev);
> - struct hibmc_drm_private *priv = drm_dev->dev_private;
> + int ret = 0;
>
> - drm_atomic_helper_resume(drm_dev, priv->suspend_state);
> - drm_kms_helper_poll_enable(drm_dev);
> + ret = drm_mode_config_helper_resume(drm_dev);
>
> - return 0;
> + return ret;
> }
>
> static const struct dev_pm_ops hibmc_pm_ops = {
> --
> 1.9.1
>
Powered by blists - more mailing lists