From patchwork Wed Apr 5 07:28:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9663119 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 C980660353 for ; Wed, 5 Apr 2017 07:28:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA67D284D5 for ; Wed, 5 Apr 2017 07:28:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEE532852E; Wed, 5 Apr 2017 07:28:49 +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 5D930284D5 for ; Wed, 5 Apr 2017 07:28:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753970AbdDEH2r (ORCPT ); Wed, 5 Apr 2017 03:28:47 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:14477 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbdDEH2q (ORCPT ); Wed, 5 Apr 2017 03:28:46 -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 <0ONX00KVPE3V0T10@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 05 Apr 2017 08:28:43 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170405072843eucas1p2049ced8df4e9c7d7014fa2d743b660b3~yb8YOZxVQ3020330203eucas1p2x; Wed, 5 Apr 2017 07:28:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 6A.A1.04459.AAC94E85; Wed, 5 Apr 2017 08:28:42 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170405072842eucas1p131cf311f5f6c368547e7fa5190193492~yb8Xc-sKy2567025670eucas1p1O; Wed, 5 Apr 2017 07:28:42 +0000 (GMT) X-AuditID: cbfec7f1-f796e6d00000116b-87-58e49caa968f Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 00.4F.17452.02D94E85; Wed, 5 Apr 2017 08:30:40 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ONX000HIE3TW560@eusync3.samsung.com>; Wed, 05 Apr 2017 08:28:42 +0100 (BST) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/9] drm/exynos/decon5433: always do sw-trigger when vblanks enabled Date: Wed, 05 Apr 2017 09:28:29 +0200 Message-id: <1491377317-8042-2-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1491377317-8042-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWy7djPc7qr5jyJMHh62sDi1rpzrBYbZ6xn tbjy9T2bxaT7E1gsZpzfx2Sx9shddgc2j/vdx5k8+rasYvT4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0Jf5uvgnWICKgLLFqXzs7SAOzwBVGifZvXewgCWGBMImfnU/AilgEVCU2rprPBGLzCjhJ nGldwwixTU7i5rlOZhCbU8BZ4syOy2wQy5wkWhtfs0xg5F3AyLCKUSS1tDg3PbfYUK84Mbe4 NC9dLzk/dxMjMFy3Hfu5eQfjpY3BhxgFOBiVeHgrpj2OEGJNLCuuzD3EKMHBrCTC+2P6kwgh 3pTEyqrUovz4otKc1OJDjKZAR01klhJNzgfGUl5JvKGJobmloZGxhYW5kZGSOG/JhyvhQgLp iSWp2ampBalFMH1MHJxSDYzhB5ieur4/9CLrorqGp9PxpK5Svj3KPmv3Fj4UiLlwV7hLlMlt 5qx9S4+9OcvN+ih2vce3vAR+gafqBz3js9qv2+3w7mvQT1hwMa55+4Q1x7wOL7fmeX+es4Vp 29qodJYL66WEPCcsPrx64lyJtAKZ28bfq1/f6XFZdKRq30Rujjij7BuNituUWIozEg21mIuK EwFo+JKFbQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170405072842eucas1p131cf311f5f6c368547e7fa5190193492 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: 20170405072842eucas1p131cf311f5f6c368547e7fa5190193492 X-RootMTR: 20170405072842eucas1p131cf311f5f6c368547e7fa5190193492 References: <1491377317-8042-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 When vblanks are enabled userspace and/or kernel can expect vblank interrupt at declared period of time. To generate vblank interrupt image transfer must be triggered. This patch fixes vblank timeouts in case of sw-trigger mode. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 42e8f8c..028a657 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -49,6 +49,7 @@ static const char * const decon_clks_name[] = { enum decon_flag_bits { BIT_CLKS_ENABLED, + BIT_IRQS_ENABLED, BIT_WIN_UPDATED, BIT_SUSPENDED }; @@ -104,6 +105,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc) val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP; writel(val, ctx->addr + DECON_VIDINTCON0); + set_bit(BIT_IRQS_ENABLED, &ctx->flags); return 0; } @@ -112,6 +114,7 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc) { struct decon_context *ctx = crtc->ctx; + clear_bit(BIT_IRQS_ENABLED, &ctx->flags); if (test_bit(BIT_SUSPENDED, &ctx->flags)) return; @@ -518,7 +521,8 @@ static void decon_te_irq_handler(struct exynos_drm_crtc *crtc) (ctx->out_type & I80_HW_TRG)) return; - if (test_and_clear_bit(BIT_WIN_UPDATED, &ctx->flags)) + if (test_and_clear_bit(BIT_WIN_UPDATED, &ctx->flags) || + test_bit(BIT_IRQS_ENABLED, &ctx->flags)) decon_set_bits(ctx, DECON_TRIGCON, TRIGCON_SWTRIGCMD, ~0); }