From patchwork Wed Aug 8 16:16:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10563463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37F6414C0 for ; Sat, 11 Aug 2018 12:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10D3C2A157 for ; Sat, 11 Aug 2018 12:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 052A52A6F5; Sat, 11 Aug 2018 12:08:48 +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 BADDC2A157 for ; Sat, 11 Aug 2018 12:08:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C2836E1D2; Sat, 11 Aug 2018 12:06:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8ADB86E04F for ; Wed, 8 Aug 2018 16:13:52 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id j8-v6so1375619pff.6 for ; Wed, 08 Aug 2018 09:13:52 -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=kWbgqFWnf7rarNatQL16OW5agW56H2KnxyqqbjZLOvs=; b=IA37GeNYS5X7k2MdG5PHJMg7zde6ZG42nR7cTJs1bFiIlgdkd7IewkFTbq4R6uODsm glKZ0MPM8lptpmmfkMei2YYTCfztw4SQR1SjJL9agMEXxtEFZOQ8ic3pPz6ubIeRjRck OzlKruhRGb+50icok+hJ4DCAloQstdBr3rT/c2Vn7GaTuvconF8+Aao3twoxHOWYRNFi PeG8zsFI+igP25Jm3gRoOknCw84/JMMOT4B2PvtuYCuoaXjbjm7RKM3EnZC2uvvPNVTe L8zH+3qupDmC41dDH7yGK0c0uALDVj/UTzX8EM8JEZvbvg7W4d8bJ3Y1kVMnTEZPgRVu Zbpw== X-Gm-Message-State: AOUpUlGbMI5sGNaUXe8RCNLqqtp4zMZH6iyHJCwQudm/fn8jzPKy67aK Ea9rPhLWQkDWFQyKHMPy/1w= X-Google-Smtp-Source: AA+uWPxCYbGgJUrswKl5/yspqrX+FuVDek91z9RIZQ6fLCtYD9j2yRelC/q/a3LQ/BRUevNrH42VaA== X-Received: by 2002:a62:1647:: with SMTP id 68-v6mr3646958pfw.6.1533744832129; Wed, 08 Aug 2018 09:13:52 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([49.205.217.252]) by smtp.gmail.com with ESMTPSA id t19-v6sm13144752pfk.182.2018.08.08.09.13.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Aug 2018 09:13:50 -0700 (PDT) Date: Wed, 8 Aug 2018 21:46:41 +0530 From: Souptick Joarder To: jsarha@ti.com, tomi.valkeinen@ti.com, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH] drm/tilcdc: Convert drm_atomic_helper_suspend/resume() Message-ID: <20180808161641.GA20483@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: Sat, 11 Aug 2018 12:05:13 +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, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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(). saved_state in tilcdc_drm_private will not be used anymore, so it can be removed. Signed-off-by: Ajit Negi Signed-off-by: Souptick Joarder Reviewed-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 14 ++++---------- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 --- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 0fb300d..33e5332 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -554,29 +554,23 @@ static int tilcdc_debugfs_init(struct drm_minor *minor) static int tilcdc_pm_suspend(struct device *dev) { struct drm_device *ddev = dev_get_drvdata(dev); - struct tilcdc_drm_private *priv = ddev->dev_private; + int ret = 0; - priv->saved_state = drm_atomic_helper_suspend(ddev); + ret = drm_mode_config_helper_suspend(ddev); /* Select sleep pin state */ pinctrl_pm_select_sleep_state(dev); - return 0; + return ret; } static int tilcdc_pm_resume(struct device *dev) { struct drm_device *ddev = dev_get_drvdata(dev); - struct tilcdc_drm_private *priv = ddev->dev_private; - int ret = 0; /* Select default pin state */ pinctrl_pm_select_default_state(dev); - - if (priv->saved_state) - ret = drm_atomic_helper_resume(ddev, priv->saved_state); - - return ret; + return drm_mode_config_helper_resume(ddev); } #endif diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h index ead5122..62cea5f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -70,9 +70,6 @@ struct tilcdc_drm_private { const uint32_t *pixelformats; uint32_t num_pixelformats; - /* The context for pm susped/resume cycle is stored here */ - struct drm_atomic_state *saved_state; - #ifdef CONFIG_CPU_FREQ struct notifier_block freq_transition; #endif