From patchwork Mon Nov 17 13:00:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 5318811 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2F22A9F2ED for ; Mon, 17 Nov 2014 13:00:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64EA32015A for ; Mon, 17 Nov 2014 13:00:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 893B82015E for ; Mon, 17 Nov 2014 13:00:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 62C676E0DB; Mon, 17 Nov 2014 05:00:30 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 30B2F6E01A for ; Mon, 17 Nov 2014 05:00:25 -0800 (PST) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NF600HBIPGL1R80@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 17 Nov 2014 22:00:21 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.45]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 7F.03.18167.461F9645; Mon, 17 Nov 2014 22:00:21 +0900 (KST) X-AuditID: cbfee690-f79ab6d0000046f7-7f-5469f1641a1d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 53.A8.09430.461F9645; Mon, 17 Nov 2014 22:00:20 +0900 (KST) Received: from localhost.localdomain ([10.252.75.90]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NF60048CPGGHM50@mmp2.samsung.com>; Mon, 17 Nov 2014 22:00:20 +0900 (KST) From: YoungJun Cho To: dri-devel@lists.freedesktop.org Subject: [PATCH 7/9] drm/exynos: use irq_flags instead of triggering Date: Mon, 17 Nov 2014 22:00:14 +0900 Message-id: <1416229216-32018-8-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.9.0 In-reply-to: <1416229216-32018-1-git-send-email-yj44.cho@samsung.com> References: <1416229216-32018-1-git-send-email-yj44.cho@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsVy+t8zXd3Uj5khBjdqLG6tO8dqceXrezaL SfcnsFi8uHeRxeJs0xt2ixnn9zFZzJj8ks2B3eN+93Emj74tqxg9Pm+SC2CO4rJJSc3JLEst 0rdL4MrY90Cu4DF3Rc8mrgbGv5xdjJwcEgImElcvLmaBsMUkLtxbz9bFyMUhJLCMUeLk6sls MEV/1nazQiSmM0qs3P+ZCcJpZZJ4974XrIpNQFPi+ccdrCC2iICyxN+JqxhBbGaBBYwSV29w gNjCAi4Sv16+ZgexWQRUJe7MXQnWywsUv/xwOyvENjmJKb8XgNVwCrhKvJndAzZHCKhmybeT jCCLJQSa2SUmvV0ANUhA4tvkQ0A/cAAlZCU2HWCGmCMpcXDFDZYJjMILGBlWMYqmFiQXFCel F5noFSfmFpfmpesl5+duYoSE84QdjPcOWB9iFOBgVOLh3ZGdGSLEmlhWXJl7iNEUaMNEZinR 5Hxg1OSVxBsamxlZmJqYGhuZW5opifO+lvoZLCSQnliSmp2aWpBaFF9UmpNafIiRiYNTqoFx fVKhYi6DY0rfP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000000@CPGS X-CFilter-Loop: Reflected Cc: linux-samsung-soc@vger.kernel.org, sw0312.kim@samsung.com, a.hajda@samsung.com, kyungmin.park@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 From: Joonyoung Shim The drm_handle_vblank should be called whenever be vsync, te interrupt means vsync on i80 interface. Signed-off-by: Joonyoung Shim --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index e488b80..a8ab3ec 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -1014,7 +1014,7 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr) wake_up(&ctx->wait_vsync_queue); } - if (!atomic_read(&ctx->triggering)) + if (test_bit(0, &ctx->irq_flags)) drm_handle_vblank(ctx->drm_dev, ctx->pipe); } @@ -1052,13 +1052,15 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id) if (ctx->pipe < 0 || !ctx->drm_dev) goto out; - drm_handle_vblank(ctx->drm_dev, ctx->pipe); - exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe); - if (ctx->i80_if) { + exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe); + /* Exits triggering mode */ atomic_set(&ctx->triggering, 0); } else { + drm_handle_vblank(ctx->drm_dev, ctx->pipe); + exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe); + /* set wait vsync event to zero and wake up queue. */ if (atomic_read(&ctx->wait_vsync_event)) { atomic_set(&ctx->wait_vsync_event, 0);