From patchwork Mon Jun 23 05:32:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 4399361 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 0E957BEECB for ; Mon, 23 Jun 2014 05:33:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B47F202A7 for ; Mon, 23 Jun 2014 05:33:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70517202B4 for ; Mon, 23 Jun 2014 05:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751340AbaFWFdb (ORCPT ); Mon, 23 Jun 2014 01:33:31 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:25514 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbaFWFdb (ORCPT ); Mon, 23 Jun 2014 01:33:31 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N7L00IROWRTAN40@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Mon, 23 Jun 2014 14:33:29 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.126]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id F6.3D.13369.92CB7A35; Mon, 23 Jun 2014 14:33:29 +0900 (KST) X-AuditID: cbfee690-b7fb56d000003439-45-53a7bc29bb17 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B8.B8.05196.92CB7A35; Mon, 23 Jun 2014 14:33:29 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N7L00JJKWRH6C90@mmp2.samsung.com>; Mon, 23 Jun 2014 14:33:29 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com, kgene.kim@samsung.com, joshi@samsung.com, r.sh.open@gmail.com, Rahul Sharma Subject: [PATCH 5/5 v2] drm/exynos: enable vsync interrupt while waiting for vblank Date: Mon, 23 Jun 2014 11:02:25 +0530 Message-id: <1403501545-16482-6-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1403501545-16482-1-git-send-email-rahul.sharma@samsung.com> References: <1403501545-16482-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsWyRsSkTldzz/Jgg8aXGhZXvr5ns5h0fwKL xfddX9gtehdcZbOYcX4fk8XCF/EWUxYdZnVg99g56y67x/3u40wefVtWMXp83iQXwBLFZZOS mpNZllqkb5fAldF65CtzwUzOit7l/1kaGN+wdzFyckgImEisfDCFBcIWk7hwbz1bFyMXh5DA UkaJJbt/MsMU7Vp6AioxnVFi17eL7BBOO5PEpgs9YO1sAroSsw8+YwSxRQSUJf5OXMUIUsQs sJxR4uXmFjaQhLBAqMTq61tYQWwWAVWJ5rOvwBp4BTwkutpamLoYOYDWKUjMmWQDEuYU8JTo uvQdrEQIqOThowVgiyUEJrNLLGtsZoSYIyDxbfIhFoheWYlNB6CulpQ4uOIGywRG4QWMDKsY RVMLkguKk9KLTPSKE3OLS/PS9ZLzczcxAoP79L9nE3Yw3jtgfYgxGWjcRGYp0eR8YHTklcQb GpsZWZiamBobmVuakSasJM6r9igpSEggPbEk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FxUnAgB0B+wtswIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 mixer_wait_for_vblank function expects that the upcoming vsync interrupt handler routine will clear the wait_vsync_event atomic variable. For this to happen, interrupts should be enabled and disabled properly. Signed-off-by: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_mixer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 6f18581..7529946 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1019,6 +1019,8 @@ static void mixer_wait_for_vblank(struct exynos_drm_manager *mgr) } mutex_unlock(&mixer_ctx->mixer_mutex); + drm_vblank_get(mgr->crtc->dev, mixer_ctx->pipe); + atomic_set(&mixer_ctx->wait_vsync_event, 1); /* @@ -1029,6 +1031,8 @@ static void mixer_wait_for_vblank(struct exynos_drm_manager *mgr) !atomic_read(&mixer_ctx->wait_vsync_event), HZ/20)) DRM_DEBUG_KMS("vblank wait timed out.\n"); + + drm_vblank_put(mgr->crtc->dev, mixer_ctx->pipe); } static void mixer_window_suspend(struct exynos_drm_manager *mgr)