From patchwork Sat Jul 28 13:38:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10547981 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 589EE1822 for ; Sat, 28 Jul 2018 13:36:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 449EB2B310 for ; Sat, 28 Jul 2018 13:36:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 378022B55C; Sat, 28 Jul 2018 13:36: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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E0E732B310 for ; Sat, 28 Jul 2018 13:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=AxwAPNQdcbO+RnkBGCSEGPkYnDj9iQg9gEbiEyZQHKA=; b=YQBV8tmAkwdEgj IbgRyOVmvXxidicOKjEhqTEbZeEu23bP1zPTamIAxB7UZE0k/LJWjaycySGvMSmbshxje4RA8EDzn YE0FnU02zjziqjnjYL3KJJgbeQr72uLIIvzS7jAw7uREnMhLYTksSuFirWVHXbtzbOi+tJMq+gwkS aJ/1fZqk7stZWQhp5IHNnLk2IPHhRySciP6uXAicxcj86QvBJKhja1Djv3dQ4yyUJLkUfYbf7JyPy 17v9do46SrVrljvaUnqeDknoNQqlGH03F1HnmktBNFwamV3HAmhx0KJykq3AgX8SIrakb5oChIOBb OhZwo3KCtsXCPBpJtkrg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjPOL-00061h-2T; Sat, 28 Jul 2018 13:36:17 +0000 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fjPOH-00060T-TF; Sat, 28 Jul 2018 13:36:15 +0000 Received: by mail-pl0-x243.google.com with SMTP id f6-v6so3517313plo.1; Sat, 28 Jul 2018 06:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=4suSwIq81lCIKz+SBiyuRi6a+w/Rxe0DLRPHTiRBOgk=; b=nMwFTLzrrPqQsKbagFpb0GeNrMzQSE7baWKMI0P6T5k7qGOyXCyWZxB9kkhux05C74 go4oI8PWxP5UG8BfhOUNmdc4gLd61wge4x8bBJBT4DD8TDXe+n0M2l/11dItzfyfJ6y9 8KLykaynTz6bLS6tl+UVxSguYOnehgfm7iO7bD8ThAkZeCjLiqAe29lLE5YgjGcy9nv4 XM+tJWayx1sB4jdZ/YSkdvNFEVeMULVAlDHtSDCPlNSLlAVddS3sXgb1do9TUwPvjgVv 7gcX+EqZhGiHELtVACVgBkECh/r25Q1b6CsUNGgVi6ftECc5lI1ILQgczV90oo151jjA MyuA== 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=4suSwIq81lCIKz+SBiyuRi6a+w/Rxe0DLRPHTiRBOgk=; b=nRGS82uA00tSyqiVg1aJR7dWCAhVyKYgh3tw+tZQDAfP7IuslgMP8QKtYrALytg9VO JTBXluUaQu4dsgAOSmrmnrvVeyyiijPtI8336QNWypaD9Dl6H+ZHDtL2XIK4xUMh8M0Y gYVTaIFtnbTij719vlFs65h9lD8iPu5wkQzULC1306+Znww/Nd3pCIIMnjbqhIDrCN7+ ZuGdBnux43Zw5Lv/G6DaXV+1M2U2qTwDFFAmW0eRraT3XrpR4eWpGoAk3ALN8o3ABHKu az5HhQZpqFrjtevBQovdXsYlKQ0f3EhhZPeA3aT7vjsV9qm5DY9l2UaZW1XnYLgIVRtP +4GQ== X-Gm-Message-State: AOUpUlHu00FqGQhcsLeZWoztPd6e1kJqY+4JZBlEdH2KsFXphcXPUpHi pHwVAb6Chr4cADin1Q/HdM4= X-Google-Smtp-Source: AAOMgpf8OgXNMuHzzjWEliqxUDXF/NMRZ0sD9Xyc2oKdQon7H6jQtbgH/Q/n0Kepk8+FmXZmzX9cDQ== X-Received: by 2002:a17:902:9348:: with SMTP id g8-v6mr9706991plp.302.1532784960740; Sat, 28 Jul 2018 06:36:00 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([183.82.18.16]) by smtp.gmail.com with ESMTPSA id w81-v6sm14405755pfk.92.2018.07.28.06.35.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 28 Jul 2018 06:35:59 -0700 (PDT) Date: Sat, 28 Jul 2018 19:08:45 +0530 From: Souptick Joarder To: ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, matthias.bgg@gmail.com, ajitn.linux@gmail.com Subject: [PATCH] drm/mediatek: Convert drm_atomic_helper_suspend/resume() Message-ID: <20180728133845.GA15261@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180728_063613_973361_A4B00CC0 X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index a2ca90f..1fcda2de 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -520,29 +520,24 @@ static int mtk_drm_sys_suspend(struct device *dev) { struct mtk_drm_private *private = dev_get_drvdata(dev); struct drm_device *drm = private->drm; + int ret; - drm_kms_helper_poll_disable(drm); - - private->suspend_state = drm_atomic_helper_suspend(drm); - if (IS_ERR(private->suspend_state)) { - drm_kms_helper_poll_enable(drm); - return PTR_ERR(private->suspend_state); - } - + ret = drm_mode_config_helper_suspend(drm); DRM_DEBUG_DRIVER("mtk_drm_sys_suspend\n"); - return 0; + + return ret; } static int mtk_drm_sys_resume(struct device *dev) { struct mtk_drm_private *private = dev_get_drvdata(dev); struct drm_device *drm = private->drm; + int ret; - drm_atomic_helper_resume(drm, private->suspend_state); - drm_kms_helper_poll_enable(drm); - + ret = drm_mode_config_helper_resume(drm); DRM_DEBUG_DRIVER("mtk_drm_sys_resume\n"); - return 0; + + return ret; } #endif