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: 5318681 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F12159F2ED for ; Mon, 17 Nov 2014 13:00:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0778320160 for ; Mon, 17 Nov 2014 13:00:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C0952015E for ; Mon, 17 Nov 2014 13:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751064AbaKQNAY (ORCPT ); Mon, 17 Nov 2014 08:00:24 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:35157 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbaKQNAX (ORCPT ); Mon, 17 Nov 2014 08:00:23 -0500 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 linux-samsung-soc@vger.kernel.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 Cc: linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com, kyungmin.park@samsung.com 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/B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imxFGckGmoxFxUnAgAZPiwBrgIAAA== 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 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.