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: 4406011 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 B29AABEEAA for ; Tue, 24 Jun 2014 00:59:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCF2C20357 for ; Tue, 24 Jun 2014 00:59:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 167142034E for ; Tue, 24 Jun 2014 00:59:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 981066E4A9; Mon, 23 Jun 2014 17:59:51 -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 E1B176E0F8 for ; Sun, 22 Jun 2014 22:33:31 -0700 (PDT) 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 dri-devel@lists.freedesktop.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 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 GpsZWZiamBobmVuakSasJM6r9igpSEggPbEkNTs1tSC1KL6oNCe1+BAjEwenVAOjwpOCYAND LqdHuySPdgXEvjh9q1uv7bsUl0hF2pyACTPUNkVNrZrAfThaUu6KabZ/UFVK2QfBzMv7ngcu ro3QPblP6JL5zeJypsxNme+D26T4fuxNtxX8r1C5acOEp3kaDZYLlkhMi47hqd4U6bh9XuGy pjWH81oOu231ZWbyiq+stPjz6aQSS3FGoqEWc1FxIgAm6TSwhAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAIsWRmVeSWpSXmKPExsVy+t9jQV3NPcuDDU7/VrC48vU9m8Wk+xNY LL7v+sJu0bvgKpvFjPP7mCwWvoi3mLLoMKsDu8fOWXfZPe53H2fy6NuyitHj8ya5AJaoBkab jNTElNQihdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKALlBTKEnNK gUIBicXFSvp2mCaEhrjpWsA0Ruj6hgTB9RgZoIGENYwZrUe+MhfM5KzoXf6fpYHxDXsXIyeH hICJxK6lJ9ggbDGJC/fWA9lcHEIC0xkldn27yA7htDNJbLrQwwJSxSagKzH74DNGEFtEQFni 78RVjCBFzALLGSVebm4BGyUsECqx+voWVhCbRUBVovnsK7AGXgEPia62FqYuRg6gdQoScybZ gIQ5BTwlui59BysRAip5+GgB+wRG3gWMDKsYRVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgmPn mfQOxlUNFocYBTgYlXh4NdyWBwuxJpYVV+YeYpTgYFYS4W1sAArxpiRWVqUW5ccXleakFh9i NAU6aiKzlGhyPjCu80riDY1NzE2NTS1NLEzMLJXEeQ+2WgcKCaQnlqRmp6YWpBbB9DFxcEo1 MHZVrZi+tvmL+UyPJ6a82hsfn9kssPHhxkNM++3PrJRaxsmks/FCWd6j39bPZxitOHWl1bI3 UE80SD/85pXN24UFL6Rf+Vehwl7wuetZkeMEplke12aHy7clSlyflSuw0WdW+pudJfVVTesE xS7vWJR/sWOR4P49SUJOPEqyYfJeHw1MBVK5fimxFGckGmoxFxUnAgB0B+wtswIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Mon, 23 Jun 2014 17:59:40 -0700 Cc: kgene.kim@samsung.com, joshi@samsung.com, linux-samsung-soc@vger.kernel.org, Rahul Sharma X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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 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)