From patchwork Wed Mar 15 14:41:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9625843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 105AA60523 for ; Wed, 15 Mar 2017 14:44:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 025C028624 for ; Wed, 15 Mar 2017 14:44:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB63D2862A; Wed, 15 Mar 2017 14:44:42 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7965C28645 for ; Wed, 15 Mar 2017 14:44:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbdCOOmQ (ORCPT ); Wed, 15 Mar 2017 10:42:16 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:12248 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753991AbdCOOlV (ORCPT ); Wed, 15 Mar 2017 10:41:21 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OMV0070C24UK260@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 15 Mar 2017 14:41:18 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170315144117eucas1p2e3885642f0b3edef1a13ddf42fda6b3a~sFTEq6ciR0155501555eucas1p2X; Wed, 15 Mar 2017 14:41:17 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 76.4E.30614.D8259C85; Wed, 15 Mar 2017 14:41:17 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170315144116eucas1p16f15145b78895eac52e8bf399d4f43a9~sFTD6NnKw3036330363eucas1p1f; Wed, 15 Mar 2017 14:41:16 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-04-58c9528d3d8c Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 3F.D0.06687.2F259C85; Wed, 15 Mar 2017 14:42:58 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OMV00GPG24OBF60@eusync2.samsung.com>; Wed, 15 Mar 2017 14:41:16 +0000 (GMT) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Javier Martinez Canillas Subject: [PATCH v3 09/10] drm/exynos/decon5433: kill BIT_IRQS_ENABLED Date: Wed, 15 Mar 2017 15:41:09 +0100 Message-id: <1489588870-7785-10-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1489588870-7785-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRmVeSWpSXmKPExsWy7djP87q9QScjDC4ukbS4te4cq8XGGetZ La58fc9mMen+BBaLN2/XM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YSbYvWskDYYhIX7q1n62Lk 4hASWMIosXfjCSYIp5FJYve5B8wgVWwCmhJ/N99kA7FFBJQlVu1rZwcpYhbYwCRxt+8kK0hC WMBVYv7p22ANLAKqEu/W3GIEsXkFnCVmTvjDCrFOTuLmuU6wGk6g+Ppzs5lAbCEBJ4lXzYeZ JjDyLmBkWMUoklpanJueW2yoV5yYW1yal66XnJ+7iREY2NuO/dy8g/HSxuBDjAIcjEo8vBN8 T0YIsSaWFVfmHmKU4GBWEuG94Q8U4k1JrKxKLcqPLyrNSS0+xGgKdNREZinR5Hxg1OWVxBua GJpbGhoZW1iYGxkpifOWfLgSLiSQnliSmp2aWpBaBNPHxMEp1cDYL/dF8r2sqcK8w4In41iF tk/1Yuwz4Ik7ZiE9K/PDqpRLz62ZZnuzmO206BbftuPvRT2lkA+2oaeCdsTyNMrfOe+9vy0q 2+KGzmaXO+7lvsav2WfwNC4wF2dlnrx8g4ZfSmDf0/dpbV2v7j+8Xu850+Hi7OgO9uD1wRmP HM4XbzBtYNljm6/EUpyRaKjFXFScCABGS2vLggIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170315144116eucas1p16f15145b78895eac52e8bf399d4f43a9 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRvsgrw=?= =?UTF-8?B?7ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRtTYW1z?= =?UTF-8?B?dW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170315144116eucas1p16f15145b78895eac52e8bf399d4f43a9 X-RootMTR: 20170315144116eucas1p16f15145b78895eac52e8bf399d4f43a9 References: <1489588870-7785-1-git-send-email-a.hajda@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP BIT_IRQS_ENABLED flag duplicates drm_vblank_crtc::refcount, it could be safely removed. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 8a2cd4f..a68f0cc 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -49,7 +49,6 @@ static const char * const decon_clks_name[] = { enum decon_flag_bits { BIT_CLKS_ENABLED, - BIT_IRQS_ENABLED, BIT_WIN_UPDATED, BIT_SUSPENDED }; @@ -98,15 +97,13 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc) if (test_bit(BIT_SUSPENDED, &ctx->flags)) return -EPERM; - if (!test_and_set_bit(BIT_IRQS_ENABLED, &ctx->flags)) { - val = VIDINTCON0_INTEN; - if (ctx->out_type & IFTYPE_I80) - val |= VIDINTCON0_FRAMEDONE; - else - val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP; + val = VIDINTCON0_INTEN; + if (ctx->out_type & IFTYPE_I80) + val |= VIDINTCON0_FRAMEDONE; + else + val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP; - writel(val, ctx->addr + DECON_VIDINTCON0); - } + writel(val, ctx->addr + DECON_VIDINTCON0); return 0; } @@ -118,8 +115,7 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc) if (test_bit(BIT_SUSPENDED, &ctx->flags)) return; - if (test_and_clear_bit(BIT_IRQS_ENABLED, &ctx->flags)) - writel(0, ctx->addr + DECON_VIDINTCON0); + writel(0, ctx->addr + DECON_VIDINTCON0); } /* return number of starts/ends of frame transmissions since reset */ @@ -489,10 +485,6 @@ static void decon_enable(struct exynos_drm_crtc *crtc) decon_swreset(ctx); - /* if vblank was enabled status, enable it again. */ - if (test_and_clear_bit(BIT_IRQS_ENABLED, &ctx->flags)) - decon_enable_vblank(ctx->crtc); - decon_commit(ctx->crtc); }