From patchwork Mon Nov 17 13:00:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 5318751 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 63C01C11AC for ; Mon, 17 Nov 2014 13:00:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98D88201FB for ; Mon, 17 Nov 2014 13:00:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5F3F22015E for ; Mon, 17 Nov 2014 13:00:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DFAC66E15A; Mon, 17 Nov 2014 05:00:25 -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 6EBDB6E01A for ; Mon, 17 Nov 2014 05:00:23 -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 <0NF600LK5PGK9T40@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 17 Nov 2014 22:00:20 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.45]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 6E.03.18167.461F9645; Mon, 17 Nov 2014 22:00:20 +0900 (KST) X-AuditID: cbfee690-f79ab6d0000046f7-7b-5469f164862a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 51.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 1/9] drm/exynos: move triggering checking Date: Mon, 17 Nov 2014 22:00:08 +0900 Message-id: <1416229216-32018-2-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+NgFrrILMWRmVeSWpSXmKPExsVy+t8zXd2Uj5khBv3bFS1urTvHanHl63s2 i0n3J7BYvLh3kcXibNMbdosZ5/cxWcyY/JLNgd3jfvdxJo++LasYPT5vkgtgjuKySUnNySxL LdK3S+DKOH5mN3vBbe6KzhXnWBsYT3F2MXJySAiYSKx69ZAdwhaTuHBvPVsXIxeHkMAyRok7 H78ywRSt2D+BHSIxnVHi66sVjBBOK5PEu/e9bCBVbAKaEs8/7mAFsUUElCX+TlzFCGIzCyxg lLh6gwPEFhawlGj6sB1sKouAqkT3sVlANgcHr4CLxNt/ZRDL5CSm/F4AdhGngKvEm9k9YGOE gEqWfDsJtldCoJtd4tL0LSwQcwQkvk0+xAIyR0JAVmLTAWaIOZISB1fcYJnAKLyAkWEVo2hq QXJBcVJ6kYlecWJucWleul5yfu4mRkhIT9jBeO+A9SFGAQ5GJR7eHdmZIUKsiWXFlbmHGE2B NkxklhJNzgdGTl5JvKGxmZGFqYmpsZG5pZmSOO9rqZ/BQgLpiSWp2ampBalF8UWlOanFhxiZ ODilGhjdDS4vUxCbyJDulxD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000000000000000@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 It's better to be checking whether triggerring in fimd_trigger function. Also it will return if in triggerring on fimd_te_handler, then it can't execute remain codes. Signed-off-by: Joonyoung Shim --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 0673a39..ec2d170 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -949,6 +949,13 @@ static void fimd_trigger(struct device *dev) void *timing_base = ctx->regs + driver_data->timing_base; u32 reg; + /* + * Skips to trigger if in triggering state, because multiple triggering + * requests can cause panel reset. + */ + if (atomic_read(&ctx->triggering)) + return; + atomic_set(&ctx->triggering, 1); reg = readl(ctx->regs + VIDINTCON0); @@ -969,13 +976,6 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr) if (ctx->pipe < 0 || !ctx->drm_dev) return; - /* - * Skips to trigger if in triggering state, because multiple triggering - * requests can cause panel reset. - */ - if (atomic_read(&ctx->triggering)) - return; - /* * If there is a page flip request, triggers and handles the page flip * event so that current fb can be updated into panel GRAM.