From patchwork Sat Jul 28 13:05:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10547967 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 A93AD174A for ; Sat, 28 Jul 2018 13:23:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 995042B34E for ; Sat, 28 Jul 2018 13:23:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DDC22B793; Sat, 28 Jul 2018 13:23:23 +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 45CEE2B34E for ; Sat, 28 Jul 2018 13:23:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AD0D6E15B; Sat, 28 Jul 2018 13:23:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id 851CE6E12D for ; Sat, 28 Jul 2018 13:02:37 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id r5-v6so4769566pgv.0 for ; Sat, 28 Jul 2018 06:02:37 -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=cKVmWbsmRatw9lLoErXDgnioJWcQrmaPhuuoM37+lJQ=; b=BbSeBkbxhKbuI7FwyU7//2Y/yedOBSeOdWRE0cw0U/+1aO6xiI9LCxMX270jfzKrpy rbdtbKrv/wvzzKveo4taTIJb0p9GegOt4ntlMt6oVzGygKEhrhzmfVz9aQ3tJbJ51jBM de8q//1J0AgqLsYKTAxBJXmWiYS9igII1aIu6iEqbUq2oHD3zw86LUtAigWkRlxNCBdX 2dwPxa+xQmQyuqeY3CIehHCfpL7aDvdYNhidGjJNSyW7pfhXeoE3x10JZf4pBfzCxmoa hhhpp/DJwDvgPIr1QZ57f7Ouw4LwCZLA6M1fao8+mPNZ5eacEnSKt6bnkG+XfZVOAxeG QVFA== X-Gm-Message-State: AOUpUlFIv1tmodkEX9Rg/9iqxIRc4R6DWwpin9IlgYFlIo9lMm6CmZM9 6kZ1Xk2F49i3a0DduQd+iBs= X-Google-Smtp-Source: AAOMgpe6KSAiJg5Zdyd2XLOjJOb73B4v609aLWjA1iaa5Cn0998EKp+TydO6JAPfoDNUGREf4LT32A== X-Received: by 2002:a62:3ece:: with SMTP id y75-v6mr10697621pfj.7.1532782957075; Sat, 28 Jul 2018 06:02:37 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([183.82.18.16]) by smtp.gmail.com with ESMTPSA id 13-v6sm9595141pfw.131.2018.07.28.06.02.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 28 Jul 2018 06:02:35 -0700 (PDT) Date: Sat, 28 Jul 2018 18:35:21 +0530 From: Souptick Joarder To: p.zabel@pengutronix.de, airlied@linux.ie Subject: [PATCH] drm/imx: Convert drm_atomic_helper_suspend/resume() Message-ID: <20180728130521.GA6336@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, 28 Jul 2018 13:23:10 +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(). Signed-off-by: Souptick Joarder Signed-off-by: Ajit Negi --- drivers/gpu/drm/imx/imx-drm-core.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 1d053bb..cdd83ea 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -355,37 +355,15 @@ static int imx_drm_platform_remove(struct platform_device *pdev) static int imx_drm_suspend(struct device *dev) { struct drm_device *drm_dev = dev_get_drvdata(dev); - struct imx_drm_device *imxdrm; - - /* The drm_dev is NULL before .load hook is called */ - if (drm_dev == NULL) - return 0; - - drm_kms_helper_poll_disable(drm_dev); - - imxdrm = drm_dev->dev_private; - imxdrm->state = drm_atomic_helper_suspend(drm_dev); - if (IS_ERR(imxdrm->state)) { - drm_kms_helper_poll_enable(drm_dev); - return PTR_ERR(imxdrm->state); - } - return 0; + return drm_mode_config_helper_suspend(drm_dev); } static int imx_drm_resume(struct device *dev) { struct drm_device *drm_dev = dev_get_drvdata(dev); - struct imx_drm_device *imx_drm; - - if (drm_dev == NULL) - return 0; - imx_drm = drm_dev->dev_private; - drm_atomic_helper_resume(drm_dev, imx_drm->state); - drm_kms_helper_poll_enable(drm_dev); - - return 0; + return drm_mode_config_helper_resume(drm_dev); } #endif