From patchwork Tue Oct 8 12:13:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 3003391 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D2DF5BF924 for ; Tue, 8 Oct 2013 12:13:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B336A201B8 for ; Tue, 8 Oct 2013 12:13:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 87DAD201F5 for ; Tue, 8 Oct 2013 12:13:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6665CE6BC6 for ; Tue, 8 Oct 2013 05:13:52 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id D504DE5F3C for ; Tue, 8 Oct 2013 05:13:37 -0700 (PDT) Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MUC00F6WNANBDN0@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 08 Oct 2013 21:13:35 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.116]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id ED.C1.17682.FE6F3525; Tue, 08 Oct 2013 21:13:35 +0900 (KST) X-AuditID: cbfee68e-b7f756d000004512-31-5253f6ef1435 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E9.B8.05832.EE6F3525; Tue, 08 Oct 2013 21:13:34 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.252.75.62]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MUC000E1NAMG780@mmp1.samsung.com>; Tue, 08 Oct 2013 21:13:34 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/exynos: fimd: clean up pm suspend/resume Date: Tue, 08 Oct 2013 21:13:34 +0900 Message-id: <1381234414-23362-1-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrALMWRmVeSWpSXmKPExsWyRsSkRPf9t+AggxWT2C16z51ksrjy9T2b xaT7E1gcmD22f3vA6nG/+ziTR9+WVYwBzFFcNimpOZllqUX6dglcGYsvzGYquCBQcbRpBWsD 41zeLkZODgkBE4lzBxazQ9hiEhfurWfrYuTiEBJYyigxa+lpNpiiy09vMUMkFjFK7GnuZoJw upkknhy+zghSxSagKjFxxX2wDhEBU4mOSUtZQGxmAWWJi/1LmUFsYQFbiSW988BqWIDqp3Y0 AtVwcPAKuEgc2xIJYkoIKEjMmWQDMl5C4DabxLmXX1ggygUkvk0+xAJRIyux6QAzxG2SEgdX 3GCZwCi4gJFhFaNoakFyQXFSepGRXnFibnFpXrpecn7uJkZg6J3+96xvB+PNA9aHGJOBxk1k lhJNzgeGbl5JvKGxmZGFqYmpsZG5pRlpwkrivGot1oFCAumJJanZqakFqUXxRaU5qcWHGJk4 OKUaGEPkNzQYW7kkzo0wiP65d9sEnZvnNlcrNF+tuKDGm/7/SLB71lO+DM+kG36q/5anKfkF ljl9+f7bNGvds3c7IsSn15++eKjpzAW2f2E7xJtv3teofFKzx0EygqM0ymxP9wG93ovtO+wj Hr0+ofjdK9W98QTj61uv3JxnRTKUH3DOe6W3QNFbVYmlOCPRUIu5qDgRAG3TdBdTAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsVy+t9jAd1334KDDC5/s7HoPXeSyeLK1/ds FpPuT2BxYPbY/u0Bq8f97uNMHn1bVjEGMEc1MNpkpCampBYppOYl56dk5qXbKnkHxzvHm5oZ GOoaWlqYKynkJeam2iq5+AToumXmAK1SUihLzCkFCgUkFhcr6dthmhAa4qZrAdMYoesbEgTX Y2SABhLWMGYsvjCbqeCCQMXRphWsDYxzebsYOTkkBEwkLj+9xQxhi0lcuLeerYuRi0NIYBGj xJ7mbiYIp5tJ4snh64wgVWwCqhITV9xnA7FFBEwlOiYtZQGxmQWUJS72LwWbJCxgK7Gkdx5Y DQtQ/dSORqAaDg5eAReJY1siQUwJAQWJOZNsJjByL2BkWMUomlqQXFCclJ5rpFecmFtcmpeu l5yfu4kRHNjPpHcwrmqwOMQowMGoxMMrcDgoSIg1say4MvcQowQHs5IIb+Dz4CAh3pTEyqrU ovz4otKc1OJDjMlAuycyS4km5wOjLq8k3tDYxMzI0sjc0MLI2Jw0YSVx3oOt1oFCAumJJanZ qakFqUUwW5g4OKUaGCsmTxOQ8mJW81aretRuWmcx675p29uwE7V7tDlE75676f/FYsHfZ5V8 ek9mX/o5O7tYcWFor1bH5JpjJxMPPo63PVM82+r+XCchzSulF5rffv3+4LvU5InV6xVebNiW V37hx/FvzxL2cy+YW7/q9Z1pjzT3zkyN+PGPtzLeRan/k2BGks1SDX4lluKMREMt5qLiRADQ 9bsisAIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes unnecessary runtime pm related function calls from fimd_suspend and fimd_resume functions. Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++--------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 868a14d..81f3521 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -1003,41 +1003,25 @@ static int fimd_suspend(struct device *dev) { struct fimd_context *ctx = get_fimd_context(dev); - /* - * do not use pm_runtime_suspend(). if pm_runtime_suspend() is - * called here, an error would be returned by that interface - * because the usage_count of pm runtime is more than 1. - */ - if (!pm_runtime_suspended(dev)) - return fimd_activate(ctx, false); - - return 0; + return fimd_activate(ctx, false); } static int fimd_resume(struct device *dev) { struct fimd_context *ctx = get_fimd_context(dev); + int ret; + + ret = fimd_activate(ctx, true); + if (ret < 0) + return ret; /* - * if entered to sleep when lcd panel was on, the usage_count - * of pm runtime would still be 1 so in this case, fimd driver - * should be on directly not drawing on pm runtime interface. + * in case of dpms on(standby), fimd_apply function will + * be called by encoder's dpms callback to update fimd's + * registers but in case of sleep wakeup, it's not. + * so fimd_apply function should be called at here. */ - if (!pm_runtime_suspended(dev)) { - int ret; - - ret = fimd_activate(ctx, true); - if (ret < 0) - return ret; - - /* - * in case of dpms on(standby), fimd_apply function will - * be called by encoder's dpms callback to update fimd's - * registers but in case of sleep wakeup, it's not. - * so fimd_apply function should be called at here. - */ - fimd_apply(dev); - } + fimd_apply(dev); return 0; }