Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp852749oof; Tue, 25 Sep 2018 05:38:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV60VUAKeEf+L+YsHR7ddivY828LdKsTyvp5//6i8X+rhkMYtPd/shRjZ2awCDerXgF9tid79 X-Received: by 2002:a17:902:62:: with SMTP id 89-v6mr1053926pla.298.1537879119286; Tue, 25 Sep 2018 05:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537879119; cv=none; d=google.com; s=arc-20160816; b=PltelxqA5E2HeYnMhoZyreCe6YVaWQf4rYIBxqBm62h7ZO9O+OmVobQrXd15dofG2c 3G8ImXKTv77/nzICvxmSWDatEWh3j/QBnJyj6CYS5MaoijmbEtIwpbo5L7TDO/wTZG+i 3xyWwFNpS7cYi2E+vK2Wk4oXdIcQo9gCogcWf+wJixm/7sEF6tWw1xOXyxjtu+g4Et2x l4UqTqp4PJ8WZF7Rw30W283wvaW3gfAuRbyn5RYGOYZ9rTEio06NH9KZfUpry0lqFVVf 6aj2k+hp18Pk9nPrd93GbY8f5HqN6vwZUhObLquoSj1Ce2c20/EnOruUrOBBJQPWRK1e cYBw== 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=ooC413dYCfVW/b6u1msiKl6qqALOlTLOqW/iSWutPXo=; b=EUiRLyULIqGD5qT1rdpV+MI+kgMYHmUSQj00NFmdNke9rVvcCn3KXf4RUlG14+19Az tlE0m6jFe2dWjIAvbUG54p9LU7T2IIzx0Cf6hmF3gNBnsKPjA0qXQgxCr8zF2fGFjgOw br32SlKWNt+VvlrFnPKy77KMXMG8ARe3WyveNGrOxHKZsFonRhfDy2pjzQLAsHLBwzql XuJbCIiWmlDDVBubv2kLjeQ704nIGQstKTLzBKquSAzf6qBbCc6wDQdWVnnFxAmpA8Da 2bEL+0CgMp2eSzaJkuvshA3q9HwCMYdsX8t12rl78U47Cg7idSxHa9r3kq0sgUo4An0X c1zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UJbZp2bs; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7-v6si2283889plt.327.2018.09.25.05.38.23; Tue, 25 Sep 2018 05:38:39 -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=@linaro.org header.s=google header.b=UJbZp2bs; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729177AbeIYSpS (ORCPT + 99 others); Tue, 25 Sep 2018 14:45:18 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34414 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728588AbeIYSpS (ORCPT ); Tue, 25 Sep 2018 14:45:18 -0400 Received: by mail-wm1-f65.google.com with SMTP id j25-v6so12528718wmc.1 for ; Tue, 25 Sep 2018 05:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ooC413dYCfVW/b6u1msiKl6qqALOlTLOqW/iSWutPXo=; b=UJbZp2bs/BQQnX1VnVvMyVk5DVAV0G7rEEOkoIloACQGzPdgSclq5fREWdxiczExTB byla+8wJGDczrkjlmEuvlezj0MRpKLgPbQYCMfvGbCk+n6fBnfe5PP0FVfNb6JYsK97j DMmltV+R0MLuq34uGF30tIH6hr8Yo+2OGbZ44= 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=ooC413dYCfVW/b6u1msiKl6qqALOlTLOqW/iSWutPXo=; b=nWVHpohBZdx7ZVaD99zpm1lhiHJQy1ahxgmSbizeBxujaA460Wz9ZBanba41cfOKxq OUscgVfmCQDhRFwZqjyCAKzkKOsVzYqfznGwkXitITmKTy/mrj5lmUPpfFrfC60AhFLX o2rjGPDK07ouMZ5/CJYo5C4ijWFDzVd2yqxNmErGpeFnLXeHNJpS0cT/09lxuB4cRaUM VobQ8LOEfTbWb/CK4c3bRoWL+vaJ1QI27T3hBAGQ2OUMilRVY9/Z5FMXlV6I8e00qvbe kyvd9IclX1ymv/uHoi+pPFAwo+8kYr6zZ6Unw6zswagmy/0Aik24kCPNO5/V0k3FC6lo Wu1Q== X-Gm-Message-State: ABuFfoihDIUTiaLNESjCb/tclwf7fc5ua1SqZ8+SMfFpP3etBsO5WofP qyoteQZAFCPE4g/gT09v6047B6fKZ68EpkNEg7WfCA== X-Received: by 2002:a1c:d986:: with SMTP id q128-v6mr585466wmg.110.1537879073681; Tue, 25 Sep 2018 05:37:53 -0700 (PDT) MIME-Version: 1.0 References: <20180806144900.GA13925@jordon-HP-15-Notebook-PC> In-Reply-To: From: Xinliang Liu Date: Tue, 25 Sep 2018 20:37:42 +0800 Message-ID: Subject: Re: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume() To: jrdr.linux@gmail.com Cc: "Liuxinliang (Matthew Liu)" , Rongrong Zou , XinWei Kong , Feng Chen , David Airlie , ajitn.linux@gmail.com, sabyasachi.linux@gmail.com, Linux Kernel Mailing List , dri-devel , brajeswar.linux@gmail.com 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 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, Xinliang > > > > > > --- > > > 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