Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3769433imm; Tue, 11 Sep 2018 01:37:07 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda+5eHPWY2HTatOtZAPmxanSkSClXYvjjeOw2u8qdyKwUPshA2rUEaC1+8CTyE2urxuhwtM X-Received: by 2002:a63:a112:: with SMTP id b18-v6mr26983904pgf.384.1536655027593; Tue, 11 Sep 2018 01:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655027; cv=none; d=google.com; s=arc-20160816; b=reCwxQugHgIy/dBRHq5lKHgv8nVlRE+YgQTyY5N54g6S8iW9SobU597AXbHAmSwdTR c+MnFVf/oDsoa4lUKNJEt4dqIPQfm2APr3Uo4zOsy3G/D49YCBi5Jrjmi/i6TDMyBDUv MObm1NuITR/ZjIpZ1OsV5dAtcXyiTBwOeJ/hMAA8wOIu6TkKNmm8FGXVC/MYWIJ+0OVP Fic7MH6MSC2Gb+H7lGdOcDUlyfopL5L1tfwZijhHyczwB4Z7jc5wH3CV0ITuc82S2PID aUV75Io/X1NuDB+QLfHCXkanHQ4qKjPlWbWX1m2TXKz+4yAe9OsOScjb8q8wYsOSR7bc mReg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FSgQ29apxDvxDfzBW5zOf4qJlOnC5PActXTf3yCVU0o=; b=04vFXWV7q3TzAplIgCngetUSYRSp2CZa7tOs9FtK3WUjyLURNYp05wyGxs1OD7h3qj 57RWKhBSfAIgy12X0nCPrgYbvp2gDHHBBeSF2Ykv5QP6Va7nrmsQmASqzMl4cnv7Tpwc sbdIqoXYY9EL8FLZYmHqUbdTKRnKGrJfeLv0O3ygm+DDhWGxdpZKn1DEVrXKQVtrj+e4 BwM/RhkkPIAkc9NI6QWxzBEcZwHZDW5anWwqPZya96jZ7Ifh+RZ1P/4IJjAE5w8w8g0S YdXhlmzOBnfcUWl2rIMLyNwyQn6vMC8lF0gDnlJN1Ht8IkD53aWjNQoqCug/r55zkxCY FlqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eZZ3adUh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12-v6si20381061pgr.267.2018.09.11.01.36.52; Tue, 11 Sep 2018 01:37:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eZZ3adUh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726713AbeIKNd1 (ORCPT + 99 others); Tue, 11 Sep 2018 09:33:27 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:37468 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbeIKNd1 (ORCPT ); Tue, 11 Sep 2018 09:33:27 -0400 Received: by mail-lf1-f65.google.com with SMTP id j8-v6so19646901lfb.4 for ; Tue, 11 Sep 2018 01:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FSgQ29apxDvxDfzBW5zOf4qJlOnC5PActXTf3yCVU0o=; b=eZZ3adUhKKtqpkYkn+f/sNQwYmR8IKbgjiq4ce24QWCBcfu7XUmDs6KkMM/ltOKOGI UNsoPX4HiiOWMakXlkyYKelYlDnsaNM/My5JgDkqaGDWm+VF8bul1pWFt2mA/yJbzK+6 1TVwc8h087zYDMaNLuwgYZ1YbhGldthnvpxtViNFpZJbn7YrZUi/wyJvg6SibBT0Zj/x DCBnZP/yQQcJ/LONyIvlmirHoUMXFN17S0oVXcqNxRez7IbEXONCU42zSPiU0LifHotm BPmKen2yD/Usl5juC9kjwSats5ND17V8/U6fvW64w59GmtFvMDzqXeMMnyqraHq+hDaC RX/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FSgQ29apxDvxDfzBW5zOf4qJlOnC5PActXTf3yCVU0o=; b=ZACen1GM+ir1HIVnYOVzwacBTEu+kKbrYSPAcu5h2xwBi3pCFlLsoHd9rImA5M8pOo r/jeyR8VtbhvWSUqfn2SqH209iOf1nqvR1V4MMO77tAPcD6N2J/fEsNKgYsbcT0haFzG sgoTvcoc4YMKv/xpOM3PHdrqNWYbv1cXmVq+HHmNwQxFgKQDh/hSFOqaRI8sOi3fBboT Hk7stHEGN+kf62W6DyhOBr1RSj0H4gj2f2OprTRA926V0RMNwrcGGqxQXU4dcRQGjYBS c3lBkVhSYRUI22GMvdn5v/jSW1ZkfYN48Siv9+ZXOr1x5U+d3KtYTR7/x3u4cWghUSWr zlcw== X-Gm-Message-State: APzg51BqfsQfAhSNoNZD8KavvaRJsQY5nVmXXLSE8n7o4YqFwZXO14E1 ibNOtJXQlFCKI9huvjXN64wrrCvoOwqT/WIlN0g= X-Received: by 2002:a19:124d:: with SMTP id h74-v6mr14671533lfi.107.1536654911055; Tue, 11 Sep 2018 01:35:11 -0700 (PDT) MIME-Version: 1.0 References: <20180806144900.GA13925@jordon-HP-15-Notebook-PC> In-Reply-To: <20180806144900.GA13925@jordon-HP-15-Notebook-PC> From: Souptick Joarder Date: Tue, 11 Sep 2018 14:04:57 +0530 Message-ID: Subject: Re: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume() To: xinliang , Zou Rongrong , kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com, airlied@linux.ie, Ajit Linux Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Brajeswar Ghosh , Sabyasachi Gupta , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 6, 2018 at 8:16 PM Souptick Joarder 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: Ajit Negi > Signed-off-by: Souptick Joarder > Reviewed-by: Xinliang Liu Can we get this patch in queue for 4.20 ?? > --- > v2: remove ret variable from both suspend and resume. > remove suspend_state from hibmc_drm_private struct. > > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 20 +++----------------- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - > 2 files changed, 3 insertions(+), 18 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..ee24480 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,16 @@ 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); > - } > > - return 0; > + return drm_mode_config_helper_suspend(drm_dev); > } > > 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; > > - drm_atomic_helper_resume(drm_dev, priv->suspend_state); > - drm_kms_helper_poll_enable(drm_dev); > - > - return 0; > + return drm_mode_config_helper_resume(drm_dev); > } > > static const struct dev_pm_ops hibmc_pm_ops = { > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h > index e195521..45c25a4 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h > @@ -47,7 +47,6 @@ struct hibmc_drm_private { > /* drm */ > struct drm_device *dev; > bool mode_config_initialized; > - struct drm_atomic_state *suspend_state; > > /* ttm */ > struct drm_global_reference mem_global_ref; > -- > 1.9.1 >