From patchwork Fri Nov 14 02:36:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 5302731 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 EBB1B9FD59 for ; Fri, 14 Nov 2014 02:36:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A04B201BB for ; Fri, 14 Nov 2014 02:36:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44AD1201F2 for ; Fri, 14 Nov 2014 02:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934931AbaKNCgN (ORCPT ); Thu, 13 Nov 2014 21:36:13 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:57976 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934682AbaKNCgL (ORCPT ); Thu, 13 Nov 2014 21:36:11 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NF000HAWCK4YIE0@mailout4.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 14 Nov 2014 11:36:04 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id A0.CB.17016.49A65645; Fri, 14 Nov 2014 11:36:04 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-0f-54656a94b494 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 92.FD.20081.49A65645; Fri, 14 Nov 2014 11:36:04 +0900 (KST) Received: from localhost.localdomain ([10.88.100.151]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NF0001L7CK3RZ30@mmp2.samsung.com>; Fri, 14 Nov 2014 11:36:04 +0900 (KST) From: Joonyoung Shim To: dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com, sw0312.kim@samsung.com, yj44.cho@samsung.com Subject: [PATCH 1/2] drm/exynos: move triggering checking Date: Fri, 14 Nov 2014 11:36:03 +0900 Message-id: <1415932564-16463-2-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1415932564-16463-1-git-send-email-jy0922.shim@samsung.com> References: <1415932564-16463-1-git-send-email-jy0922.shim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsWyRsSkUHdKVmqIwcpXMhZXvr5ns5h0fwKL xYzz+5gsZkx+yWaxd+dkRgdWj/vdx5k8+rasYvT4vEkugDmKyyYlNSezLLVI3y6BK+N5e0DB Ve6Kxbe+sDYwHubsYuTkkBAwkZi0ew8bhC0mceHeeiCbi0NIYCmjxLJ1B1hgih5+fgyVmM4o sXFfDwuE08YksWj/CmaQKjYBPYk7244zgdgiAsoSfyeuYgSxmQWyJTbuXMUKYgsLWEpMvvgB rJ5FQFVi0vaT7F2MHBy8Au4S52fZQiyTkzh5bDJYOaeAh8Sy9RfZQWwhoJLmR7vYQfZKCPxm k9g95xI7xBwBiW+TD7GAzJEQkJXYdIAZYo6kxMEVN1gmMAovYGRYxSiaWpBcUJyUXmSoV5yY W1yal66XnJ+7iREYvKf/PevdwXj7gPUhRgEORiUeXga31BAh1sSy4srcQ4ymQBsmMkuJJucD YySvJN7Q2MzIwtTE1NjI3NJMSZxXUepnsJBAemJJanZqakFqUXxRaU5q8SFG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: 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=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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 --- Based on lastest exynos-drm-next branch. 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 7593f62..033b18b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -944,6 +944,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); @@ -964,13 +971,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.