From patchwork Thu Jul 19 16:04:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10536355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8FE60603B5 for ; Fri, 20 Jul 2018 09:22:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F73E296B6 for ; Fri, 20 Jul 2018 09:22:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7301A296C0; Fri, 20 Jul 2018 09:22:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 32A9C296B6 for ; Fri, 20 Jul 2018 09:22:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D6E06E3BD; Fri, 20 Jul 2018 09:22:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id C20A16EE27 for ; Thu, 19 Jul 2018 16:01:47 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id r5-v6so4166996pgv.0 for ; Thu, 19 Jul 2018 09:01:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=4FXtzkzJQMVN2arH9YAZRuhMUvsF+J5FY+L94CQLmQk=; b=CAcNteqH9SNFXfVwFn0diOjTsEVm2uV3yVBO8SZyPpd7o+eYZjnrFC+KwdTYc2fisz Jiv9GVZxW2GKr63KE/5StrAU13ZYTwGiiHolg3qA31P3j8bCnXuD9t7p7rXqsto8lmEc 0KcKbVaylRDpLh2kemcRSxsrgmTyTltNOtRR+xdoXyrh/KFPLgi0RrgO5YVAB4A+/mJw dQ7UtkEo11zeWWOyaxbQPF9UIyq+QYgASvd5r9YneHes/Q4jHTisaomIt6TP96votnXd yzH9O1wh/Sa0G9Qz0aVQUg5tK68jvwgnmmXvxqCsdEQ2hlxWqN+Fik9zdpUreoGhqbht L2cg== X-Gm-Message-State: AOUpUlH7EYHip1JXCmReKQq/hAafWZRRLERf3f0kylt9DtrsriarMBUo P6ShL63ht+xwoCaFr47tYsICE8pl X-Google-Smtp-Source: AAOMgpfFnsqpG6Ybamea+epN4yWQ0QLSaRv5u/oYd51OGxOIqkkO2z01bx2hey+qoPwIXDhX8zvVTw== X-Received: by 2002:a63:8648:: with SMTP id x69-v6mr10603407pgd.172.1532016107359; Thu, 19 Jul 2018 09:01:47 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([183.82.19.142]) by smtp.gmail.com with ESMTPSA id p3-v6sm9709897pfo.130.2018.07.19.09.01.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jul 2018 09:01:46 -0700 (PDT) Date: Thu, 19 Jul 2018 21:34:26 +0530 From: Souptick Joarder To: z.liuxinliang@hisilicon.com, zourongrong@gmail.com, kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com, airlied@linux.ie, noralf@tronnes.org, jrdr.linux@gmail.com, seanpaul@chromium.org Subject: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume() Message-ID: <20180719160426.GA21958@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Fri, 20 Jul 2018 09:22:37 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ajitn.linux@gmail.com, sabyasachi.linux@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, brajeswar.linux@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Ajit Negi Reviewed-by: Xinliang Liu --- 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 = {