From patchwork Wed Mar 15 14:41:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9625833 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 1F7F06048C for ; Wed, 15 Mar 2017 14:44:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 114B728624 for ; Wed, 15 Mar 2017 14:44:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04ACB28639; 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 769D828624 for ; Wed, 15 Mar 2017 14:44:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbdCOOmT (ORCPT ); Wed, 15 Mar 2017 10:42:19 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:65062 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753315AbdCOOlS (ORCPT ); Wed, 15 Mar 2017 10:41:18 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OMV00GWS24RCP50@mailout3.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 15 Mar 2017 14:41:15 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170315144114eucas1p19be1387daaa4873329ae483b1c81befa~sFTB3usBA0136601366eucas1p1U; Wed, 15 Mar 2017 14:41:14 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id A8.FC.16908.D8259C85; Wed, 15 Mar 2017 14:41:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170315144113eucas1p19ef427bc9c629ba8ed9571bf1e1e3bb3~sFTBJFPqK0087700877eucas1p1G; Wed, 15 Mar 2017 14:41:13 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-2b-58c9528dae7e Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E0.63.10233.69259C85; Wed, 15 Mar 2017 14:41:26 +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:13 +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 01/10] drm/exynos: simplify completion event handling Date: Wed, 15 Mar 2017 15:41:01 +0100 Message-id: <1489588870-7785-2-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+NgFrrAIsWRmVeSWpSXmKPExsWy7djP87q9QScjDOa3cFncWneO1WLjjPWs Fle+vmezmHR/AovFm7drmCzOn9/AbjHj/D4mi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M0LYYhIX7q1n62Lk 4hASWMIoMe/qMRaQhJBAI5PE2ivRIDabgKbE38032UBsEQFliVX72tlBGpgFNjBJ3O07yQqS EBbwkLh/tBmsmUVAVeLA0QvMIDavgJPEjWkPWCC2yUncPNcJFucUcJZYf242E8QyJ4lXzYeZ JjDyLmBkWMUoklpanJueW2ykV5yYW1yal66XnJ+7iREY1tuO/dyyg7HrXfAhRgEORiUe3gm+ JyOEWBPLiitzDzFKcDArifDuCwQK8aYkVlalFuXHF5XmpBYfYjQFOmois5Rocj4w5vJK4g1N DM0tDY2MLSzMjYyUxHmnfrgSLiSQnliSmp2aWpBaBNPHxMEp1cA4Z902M48v8mmPli5eLem7 1ftVVf9sD/uvxxcEOT3kkH2jq/n0XX595sq1HxZHSKja3w5aaLx6a3smS3eT6LaE/FPpBs3i ihNi1098crOI+1H+W9ZnVeuPVCi+U71rmmK27tUknQBWBhExmRDZOR4MLKz2qaY8Gk+mn21V 95v1TrXs5EGG+SFKLMUZiYZazEXFiQAo6bgYgQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170315144113eucas1p19ef427bc9c629ba8ed9571bf1e1e3bb3 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 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: 20170315144113eucas1p19ef427bc9c629ba8ed9571bf1e1e3bb3 X-RootMTR: 20170315144113eucas1p19ef427bc9c629ba8ed9571bf1e1e3bb3 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 All Exynos CRTC drivers shouldn't fail at referencing vblank events, alternate path is actually dead code. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 0620d3c..9184974 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -105,16 +105,15 @@ void exynos_crtc_handle_event(struct exynos_drm_crtc *exynos_crtc) struct drm_pending_vblank_event *event = crtc->state->event; unsigned long flags; - if (event) { - crtc->state->event = NULL; - spin_lock_irqsave(&crtc->dev->event_lock, flags); - if (drm_crtc_vblank_get(crtc) == 0) - drm_crtc_arm_vblank_event(crtc, event); - else - drm_crtc_send_vblank_event(crtc, event); - spin_unlock_irqrestore(&crtc->dev->event_lock, flags); - } + if (!event) + return; + crtc->state->event = NULL; + + WARN_ON(drm_crtc_vblank_get(crtc) != 0); + spin_lock_irqsave(&crtc->dev->event_lock, flags); + drm_crtc_arm_vblank_event(crtc, event); + spin_unlock_irqrestore(&crtc->dev->event_lock, flags); } static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)