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: 10548585 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 A1D31A754 for ; Mon, 30 Jul 2018 07:21:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88F3F29755 for ; Mon, 30 Jul 2018 07:21:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DC2029947; Mon, 30 Jul 2018 07:21:56 +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 4582929987 for ; Mon, 30 Jul 2018 07:21:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66DB66E083; Mon, 30 Jul 2018 07:21:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x242.google.com (mail-pl0-x242.google.com [IPv6:2607:f8b0:400e:c01::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C9726E046 for ; Sat, 28 Jul 2018 13:36:02 +0000 (UTC) Received: by mail-pl0-x242.google.com with SMTP id e11-v6so3504543plb.3 for ; Sat, 28 Jul 2018 06:36:02 -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=4suSwIq81lCIKz+SBiyuRi6a+w/Rxe0DLRPHTiRBOgk=; b=m9CyK/8nsmpKx4OGcowrPw5qp4+wj+RWWvoagwhux0Vao0r+F8pu94AUlDtws1Dwjv 0KMXGIJ62NDWzRzQfIGE4I1cC0urfX258SVaiMeUjHwm30zv8YFkW4xBhnC5x4DAlbkU uMEqGzmv+gnQQCsiGg8wO016pZTNUdREVi6GMI5fqZ3x39TE4bxzHodnDbtOAvc7REPo j6vMnEpgmmHtFD2KBCbkZ1uK2kVkC2LImTaRdU5kx8USpCiCqgYuImpXP4T7vqxa8pkS HiNsCBsJKHPqSMgI+PhKd0nRxVZ1EKsCIN7fHH+ssiBKsQYKig1QJ42bWi0MhOW8bK1k 5Lng== X-Gm-Message-State: AOUpUlEy/R+4vnvI25IGJgZT8S+FkUWmBe6U7PawyqNaOEwrA0noQx9F 3A5UCGD6gGe168/c8mCssJU= 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-Mailman-Approved-At: Mon, 30 Jul 2018 07:21:17 +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: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.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/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