Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3563127imm; Sun, 16 Sep 2018 22:17:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbZo9370kxVrRaW8+WYoUjsALCxc6YEXSG9APiSUPh/52uTnRJJ+gXPbDSuz8UOl9mrJVUa X-Received: by 2002:aa7:8713:: with SMTP id b19-v6mr24082913pfo.151.1537161472675; Sun, 16 Sep 2018 22:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537161472; cv=none; d=google.com; s=arc-20160816; b=O+vTZmz066QZOiKoanU7b+6OLr1IvgGVIha4DSWqtaAyvJJHKAluiHUVDTzExRLLqJ 1hnNplylSySXIp9T6DnF/TTrYPPSY6wUGA1KLI35UVaCQt0fK9rCEZYCs5vpWLuo2+0w 73Rjjy7yZAb5gghbKy5Fis1YoQf3c1aIdtBDgjeWRx6TVGCUBqBESZNSQDfzQYul9o0x Yob2R38llU1pvlF9Z8gSEQZrfkStsLa6u1Qqy4eQLQn1PXT3l/uXFHidid1TjQUss2aG q+AiqGuLx/ezfqmGgEeDSykFdzJ4Rrij9r91oK0Sz9gYpAyaSinZk4qA+7TI4SVJHMhq g+DA== 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=z+S/xVSlFt4RjonH7tI/KM5sUlNiH6lX11CBOmk2DTo=; b=EZEWV58vKyalu/D6xjiqZLmDJhC/Cotw5QPXmgJE6dGsyFG06G/6EZOtktWzy+npz8 GMiCmiZ7kLefvKyVvU31xKAIiu0NyPRfctcAEK+zOmG0IUHW7dh80Hk1mJcrDP/l7V/z ShL5hOF+nl4WMDUM3cLF9RvgQ56gBJBEtgzHiOrFb3F/CIEquNXb/Y9fiNFjv5UM3NLn vJC3/KcZgCXaVtGRFvx28gksSlZd69jQT27PmSebgk6Trv+bLsC7AM3NvEi7Xmd3iFqv aKOClyATR5lSNNk++e4PZGy7MbOxegVV4T2fVAQCkP80zeY9lGvPGjpEb+Eh9fQgm58v HhoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bZyFeQZM; 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 o33-v6si14882692pld.180.2018.09.16.22.17.35; Sun, 16 Sep 2018 22:17:52 -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=bZyFeQZM; 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 S1728264AbeIQKnO (ORCPT + 99 others); Mon, 17 Sep 2018 06:43:14 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41605 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbeIQKnO (ORCPT ); Mon, 17 Sep 2018 06:43:14 -0400 Received: by mail-lj1-f193.google.com with SMTP id y17-v6so12000072ljy.8 for ; Sun, 16 Sep 2018 22:17:30 -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=z+S/xVSlFt4RjonH7tI/KM5sUlNiH6lX11CBOmk2DTo=; b=bZyFeQZMKEoQf34Ddex2xHaGvPtj8HHkc7qzoUTF3FelnxDvOy30qsoZL/+EyXD3XB T6NlSINCiBQgWg0TEEP8eiU4HNY9gPOiONR9Ro6nYl57KJTLbmF98EThXfYpclcv64X1 T9GfYVKsghWHeSZl2SsOuNYPJmY1nxWpbNDV/SFFvbPZNfciqeQzZ616ovnAbxu8Lh7p e3wjzne/WlANOFsgI7LeL1IFT7uiV8g9RA1mzXVRbQb3v3F82kFhnmNq9DavVu/qyA3W DKxQoWClch4SFGdK+xxI8QhE6jh364fK7/iy52ugHt/DC4iNoBymoeVrWRfVu6Tzm2z+ uRqw== 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=z+S/xVSlFt4RjonH7tI/KM5sUlNiH6lX11CBOmk2DTo=; b=YwHdL4A2t5c+l1a3TrLzPgf5hSxIKQG89SWynBKMc/tynWFAPJGbP3ZRYyk5+Mx/Ej ccJsASbJ5imXNygY0+nGItwYZ8W+mV7BiXdpBWTijFFtpiBg7hLKY2RhhX49bZUQOexD 11II/1FkVArHcy84ahN4THVGZKd8xihvSFrJ5CniHLDpGiRZsqF9t2UswsP1YFBg0Zgx esLrk5gtbGWPTEZO1wD2jnlaN55bRES6/m5j3mGwHEKjRJbS8XLlCp2N27nOR2GvF8GM N4A68Tl7FMQzkbewt7zTS80Xv9R0WBoaikJrW9/9FIYgZQWcjoi4FeIoTO5STZX/y09Z Q8og== X-Gm-Message-State: APzg51BpRjVFPFImsj6J6B+YHMvyRDxp8KbtbYSM4E/y7JlNodCtlGCf fLsuPIXjPyr8Pl3I3IyNXFv5NwxpDNsiimdihgozkw== X-Received: by 2002:a2e:8ed1:: with SMTP id e17-v6mr13572662ljl.86.1537161449113; Sun, 16 Sep 2018 22:17:29 -0700 (PDT) MIME-Version: 1.0 References: <20180806144900.GA13925@jordon-HP-15-Notebook-PC> In-Reply-To: From: Souptick Joarder Date: Mon, 17 Sep 2018 10:47:16 +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 Tue, Sep 11, 2018 at 2:04 PM Souptick Joarder wrote: > > 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 ?? Daniel, can we get this patch in queue for 4.20, if no further comment ? > > > --- > > 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 > >