Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp861266oof; Tue, 25 Sep 2018 05:45:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV60d4T/HFmWFRubwWJOb2TGlHvgALfhdLAX9ClNZj6JuNFkMaEnGGX9KNjcE1XA088cAPNUF X-Received: by 2002:a63:ef4f:: with SMTP id c15-v6mr932919pgk.368.1537879540942; Tue, 25 Sep 2018 05:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537879540; cv=none; d=google.com; s=arc-20160816; b=k7tAkuy8wK0pysNifDzVXDylxjq8su8cccY8T8TDqIV3YN4Dv0Yy35RmrfBCUFO6vb 3AuyFnAOCSC1LtEnBNT+wIgpC8lww5YyGhEZ10xJh2dH11WfyiaDWV/O4WUwjFMTlKRi /HPiwpl2vmUtjPCkiup8Hb6/iEl/wCkmJZO5vQuNh1hD2pv2XH/ol2o01tfyY/e+DOKg cLJBjLUmP0CtpLhsWFTrA6BJ0NBtoXu7jJ8EozhS+/9qU8r0tHyWFujlA2eTfLBalIJ9 COkSrDLuvD/oYxUx8/1R+OsNm7Xqo/PRooUwwuemLLBpkD1fPtBuYOguLuaenPgDVWsg Ls2w== 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=Clp+MLrTWiDC2LMN7Mi6tOoYK+QihCb8ndogVELRDHc=; b=RFd6ovBtrJQczj3qZrkWD0atLa4ipn+LJLTj4ZdLGPTM14PHnDdyUKd9UXD0Bo8KLG eqkSCRCmohdmnfvxsEmthDBHygBQQ1e+79ywkuI0droyrGZw/81EPeLmA80Gi8eSD20Y mQJUx08CjYOOOjsuDyf7S3LX+zeZKf1/r05bgrZLzmsfA9yRzGLpzqIv8Hi3tisQaxXO 47gAuun/p6s45nHMIimWqy+IS8iwfd82U0ggNbbnhf0NxILHZkBo5wJmR6og94aZ6D5t eIZ6orCUaQljA9KBQJFyBGA27XwrNPwglBkReikfFxpCD5OBhE8cS+9cVIvsXbABQG0H SaPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pMltn7Dx; 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 p13-v6si2297124pgk.344.2018.09.25.05.45.23; Tue, 25 Sep 2018 05:45:40 -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=pMltn7Dx; 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 S1729022AbeIYSvY (ORCPT + 99 others); Tue, 25 Sep 2018 14:51:24 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:33182 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728773AbeIYSvX (ORCPT ); Tue, 25 Sep 2018 14:51:23 -0400 Received: by mail-lj1-f193.google.com with SMTP id l19-v6so7089372ljb.0 for ; Tue, 25 Sep 2018 05:43:58 -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=Clp+MLrTWiDC2LMN7Mi6tOoYK+QihCb8ndogVELRDHc=; b=pMltn7DxVRwEeQOPSuWWdE/CBHMMjrEniigEl+XExhlSFBoyJ4Q1iR4+c1HuGmxDsK w+UXS3WeEZ0qAF1bJ5Wkcxs+txGcQiJRjB3Bj0NwmOLUsJlK5IdH6HaFEqM7l4yHMMen RY2P1pnKzIOErSqtgP2MKddziYHHDkwQVFCvuWiK/rwl8/Mc+rcDgNhQfmnKSe3momXq U6zGTqU7rpUbfYZkk0qsVZ9mvHew4ZHDDtdxFoi5YKBamUUvIwozicDokguhDUGRkYb5 kCe12H5b0med1xMXAMEP97qV4CkVkJ8BvcIMgRSWBT3T/yqKK7rvSEK3CtM5/8m6+Qdu EXQA== 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=Clp+MLrTWiDC2LMN7Mi6tOoYK+QihCb8ndogVELRDHc=; b=I2wMEuXB0n8rnp1b9FI7b7AhXq5caS6e+AQNxB+gctMetwzPxp0jUtlbUZ5vsYHlaX eetXh/YXm/Zx0bJmCymCpJ9pfqjsj3CNs1eMXpSDZsHEc1i8/U0tI71wyErqRAzjTcim DQRHYCTPFIWOKzFh1+iJpYg/Sbl2NbNTX4Q/GpvIZrjtAEBD2zzxDrrbOJraThXPziso 8JgaRR5owEtEgsbEaYiuoBBAfkDrITIvMsbeyHTiUwzx+xPrZbIduzvIXlH//jGfHb75 FbVXxQvR2F2P2cWxsGncL/067bSEZoZGCLYxl7u+tB5N8EBKEtBNdObC2p9QQEpoAljb JEWg== X-Gm-Message-State: ABuFfojrOmY/y7d0pjKj9Roa39dXnSkSTu2RlOKrJVh8wdT+ZzK4KlBp 7RlbLY7G7vC1t+JuQ1YgLBcwsxSMzp5nlBHQhzU= X-Received: by 2002:a2e:1652:: with SMTP id 18-v6mr766842ljw.56.1537879437387; Tue, 25 Sep 2018 05:43:57 -0700 (PDT) MIME-Version: 1.0 References: <20180806144900.GA13925@jordon-HP-15-Notebook-PC> In-Reply-To: From: Souptick Joarder Date: Tue, 25 Sep 2018 18:13:44 +0530 Message-ID: Subject: Re: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume() To: xinliang.liu@linaro.org Cc: xinliang , Zou Rongrong , kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com, airlied@linux.ie, Ajit Linux , Sabyasachi Gupta , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Brajeswar Ghosh 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 25, 2018 at 6:07 PM Xinliang Liu wrote: > > Hi Souptick, > > On Mon, 17 Sep 2018 at 15:40, Souptick Joarder wrote: > > > > 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 ? > > Will send 4.20 drm-next pull for this patch. I am verifying it on our D05 board. Thanks. > > > > > > > --- > > > > 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 > > > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel