From patchwork Fri Jun 12 08:27:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 6595911 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EAE49C0433 for ; Fri, 12 Jun 2015 08:27:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 22F4820665 for ; Fri, 12 Jun 2015 08:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C2B72066D for ; Fri, 12 Jun 2015 08:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751335AbbFLI1S (ORCPT ); Fri, 12 Jun 2015 04:27:18 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:34219 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbbFLI1P (ORCPT ); Fri, 12 Jun 2015 04:27:15 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NPT0145BOTDKY60@mailout3.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 12 Jun 2015 17:27:13 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id A2.A2.29324.1E79A755; Fri, 12 Jun 2015 17:27:13 +0900 (KST) X-AuditID: cbfee68d-f79106d00000728c-a2-557a97e18df1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6F.F3.25346.1E79A755; Fri, 12 Jun 2015 17:27:13 +0900 (KST) Received: from localhost.localdomain ([10.252.81.123]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NPT004G6OTC6N40@mmp2.samsung.com>; Fri, 12 Jun 2015 17:27:13 +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, m.szyprowski@samsung.com, gustavo.padovan@collabora.co.uk, jy0922.shim@samsung.com, a.hajda@samsung.com Subject: [PATCH v2 3/3] drm/exynos: initialize VIDCON0 when fimd is disabled Date: Fri, 12 Jun 2015 17:27:16 +0900 Message-id: <1434097636-10709-3-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1434097636-10709-1-git-send-email-jy0922.shim@samsung.com> References: <1434097636-10709-1-git-send-email-jy0922.shim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkRPfh9KpQg+3b1CxurTvHanHl63s2 i0+rW9ktJt2fwGLx4t5FFosZ5/cxWaw9cpfdYsbkl2wOHB5/n19n8bjffZzJo2/LKkaPz5vk AliiuGxSUnMyy1KL9O0SuDLmv/nEXDCNo+LU+80sDYwf2boYOTkkBEwkOjd9ZIawxSQu3FsP FOfiEBJYyihx9sJnRpiirZNfs0MkpjNKfLrfD1X1g1HiT8NuFpAqNgE9iTvbjjOB2CICyhJ/ J65iBCliFjjAKNEy9xtYkbCAj8Srbc1gu1kEVCVOtq4Csjk4eAXcJbZ8FofYJidx8thkVhCb U8BD4uPN+2CtQkAln469ZwGZKSEwnV1i5+mN7BBzBCS+TT7EAjJHQkBWYtMBqHckJQ6uuMEy gVF4ASPDKkbR1ILkguKk9CJDveLE3OLSvHS95PzcTYzAQD/971nvDsbbB6wPMQpwMCrx8CZo VYUKsSaWFVfmHmI0BdowkVlKN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b veD9+8NP9d74wP9V84Zo96Vp2cf//oxztV7+TiqW11+JpTgj0VCLuag4EQCuV8HRuQIAAA== 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 When the fimd is disabled by fimd_disable(), enabled overlay layers also are disabled. If clocks for fimd are enabled by fimd_enable() on this case, it can lead IOMMU page fault. The reason is that VIDCON0_ENVID and VIDCON0_ENVID_F bits of VIDCON0 register are set still even though fimd is disabled, so it may continue display output of prior when clocks for fimd are enabled again. Signed-off-by: Joonyoung Shim Reviewed-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index b45e09b..3b0e0f6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -791,6 +791,8 @@ static void fimd_disable(struct exynos_drm_crtc *crtc) for (i = 0; i < WINDOWS_NR; i++) fimd_win_disable(crtc, i); + writel(0, ctx->regs + VIDCON0); + clk_disable_unprepare(ctx->lcd_clk); clk_disable_unprepare(ctx->bus_clk);