From patchwork Wed Mar 8 14:58:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9611407 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 5DC6F60414 for ; Wed, 8 Mar 2017 15:10:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A159285E3 for ; Wed, 8 Mar 2017 15:10:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EFAE285EA; Wed, 8 Mar 2017 15:10:28 +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 989D2285E7 for ; Wed, 8 Mar 2017 15:10:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752390AbdCHPK0 (ORCPT ); Wed, 8 Mar 2017 10:10:26 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:8308 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752131AbdCHPKY (ORCPT ); Wed, 8 Mar 2017 10:10:24 -0500 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 <0OMI00C8X4AERSA0@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 08 Mar 2017 14:59:03 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170308145902eucas1p2bb8f6f0eaeb02a3f4e9e922441b0d521~p8BkfeFi12371623716eucas1p2Z; Wed, 8 Mar 2017 14:59:02 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 59.F7.09557.63C10C85; Wed, 8 Mar 2017 14:59:02 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170308145901eucas1p2e7695c1d9fa43378d0a298b029d11269~p8Bj1oJiU2371623716eucas1p2V; Wed, 8 Mar 2017 14:59:01 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-a0-58c01c36616f Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 2F.B7.10233.04C10C85; Wed, 8 Mar 2017 14:59:12 +0000 (GMT) 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 <0OMI0059P4AC5T30@eusync3.samsung.com>; Wed, 08 Mar 2017 14:59:01 +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 v2 02/12] drm/exynos: simplify completion event handling Date: Wed, 08 Mar 2017 15:58:36 +0100 Message-id: <1488985126-25288-3-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1488985126-25288-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRmVeSWpSXmKPExsWy7djP87pmMgciDGZd5Le4te4cq8XGGetZ La58fc9mMen+BBaLN2/XMF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jJ4eEgInEg+Ub2SFsMYkL99azdTFy cQgJLGGU+PJxLyuE08gk8ev2TlaQKjYBTYm/m2+ygdgiAsoSq/a1s4MUMQtsYJK423cSrEhY wENiTccJZhCbRUBV4u2Ov2AreAWcJf7PfMcEsU5O4ua5TrAaTgEXib6Pk4FsDqBtzhJL+3Um MPIuYGRYxSiSWlqcm55bbKRXnJhbXJqXrpecn7uJERjW24793LKDsetd8CFGAQ5GJR7eHQIH IoRYE8uKK3MPMUpwMCuJ8F74uj9CiDclsbIqtSg/vqg0J7X4EKMp0E0TmaVEk/OBMZdXEm9o YmhuaWhkbGFhbmSkJM479cOVcCGB9MSS1OzU1ILUIpg+Jg5OqQbGK9dy9n01u8Wsmjb7+0Lb mB3cquW8oSXfjNk3/7dxmT91fsuFSQtPtcodbNsQMZ3hUZmM4DabnVMmVV/+PfdIzM7PZzaX F4pPc21vc5NyPCzllm1yIUY/ci5fHdNGtUkRRprtJ2sF2aRv8GQysb/iZejWmKO51YO1+6VJ MA9Lwqcgzr/x7xyVWIozEg21mIuKEwEOKNrugQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170308145901eucas1p2e7695c1d9fa43378d0a298b029d11269 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: 20170308145901eucas1p2e7695c1d9fa43378d0a298b029d11269 X-RootMTR: 20170308145901eucas1p2e7695c1d9fa43378d0a298b029d11269 References: <1488985126-25288-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)