From patchwork Fri Jan 13 08:10:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9514803 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 805856077E for ; Fri, 13 Jan 2017 08:10:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78217285FF for ; Fri, 13 Jan 2017 08:10:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CA2C2863D; Fri, 13 Jan 2017 08:10:45 +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 9E30328658 for ; Fri, 13 Jan 2017 08:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751165AbdAMIKm (ORCPT ); Fri, 13 Jan 2017 03:10:42 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:22515 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdAMIKl (ORCPT ); Fri, 13 Jan 2017 03:10:41 -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 <0OJP00H1BLDQFS40@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 13 Jan 2017 08:10:38 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170113081037eucas1p255878267aba2282ada51fd8d3a1fea59~ZRnkNjHZX2192121921eucas1p2q; Fri, 13 Jan 2017 08:10:37 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id EF.65.30614.D7B88785; Fri, 13 Jan 2017 08:10:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170113081037eucas1p2a87c058901f1bf9544a36b798b8349ff~ZRnjlUiEG0485104851eucas1p2P; Fri, 13 Jan 2017 08:10:37 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-b1-58788b7d4134 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C0.B3.10233.67B88785; Fri, 13 Jan 2017 08:10:30 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJP00B64LDONA40@eusync2.samsung.com>; Fri, 13 Jan 2017 08:10:36 +0000 (GMT) From: Andrzej Hajda To: Inki Dae , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [PATCH] drm/exynos/decon5433: set STANDALONE_UPDATE_F also if planes are disabled Date: Fri, 13 Jan 2017 09:10:26 +0100 Message-id: <1484295026-16435-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsWy7djP87q13RURBvMOa1rcWneO1WLjjPWs Fle+vmezmHR/AovFjPP7mCzWHrnL7sDmcb/7OJNH35ZVjB6fN8kFMEdx2aSk5mSWpRbp2yVw ZUyZP5ml4CBf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H4 6zaodXISN891Mk9g5F7AyLCKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMAC3Hfu5ZQdj17vg Q4wCHIxKPLwTbpdHCLEmlhVX5h5ilOBgVhLhXdtUESHEm5JYWZValB9fVJqTWnyI0RRo+URm KdHkfGB05JXEG5oYmlsaGhlbWJgbGSmJ8079cCVcSCA9sSQ1OzW1ILUIpo+Jg1OqgTHX5q2M 88bXXXmT3lVvMa49nsqjrB2pfUtvx/of8T/mlqz6/77paPvWe/dEZt5J1z1bMk/GcI6R8svt K+/e5hSXL+5V5o/zfcby48HenrAXN57cM1srktJ+4crWS9ZKE680t7l6KAld31vZanJwAzNv Si3nrFdeE3K4vp5I+bd358Mkw6/l7GuUWIozEg21mIuKEwGr3FGcVgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170113081037eucas1p2a87c058901f1bf9544a36b798b8349ff 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: 20170113081037eucas1p2a87c058901f1bf9544a36b798b8349ff X-RootMTR: 20170113081037eucas1p2a87c058901f1bf9544a36b798b8349ff References: 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 STANDALONE_UPDATE_F should be set if something changed in plane configurations, including plane disable. The patch fixes page-faults bugs, caused by decon still using framebuffers of disabled planes. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index ef7fcb5..3999e88 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -46,7 +46,8 @@ enum decon_flag_bits { BIT_CLKS_ENABLED, BIT_IRQS_ENABLED, BIT_WIN_UPDATED, - BIT_SUSPENDED + BIT_SUSPENDED, + BIT_REQUEST_UPDATE }; struct decon_context { @@ -313,6 +314,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, /* window enable */ decon_set_bits(ctx, DECON_WINCONx(win), WINCONx_ENWIN_F, ~0); + set_bit(BIT_REQUEST_UPDATE, &ctx->flags); } static void decon_disable_plane(struct exynos_drm_crtc *crtc, @@ -325,6 +327,7 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc, return; decon_set_bits(ctx, DECON_WINCONx(win), WINCONx_ENWIN_F, 0); + set_bit(BIT_REQUEST_UPDATE, &ctx->flags); } static void decon_atomic_flush(struct exynos_drm_crtc *crtc) @@ -339,8 +342,10 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc) decon_shadow_protect_win(ctx, i, false); /* update iff there are active windows */ - if (crtc->base.state->plane_mask) + if (test_bit(BIT_REQUEST_UPDATE, &ctx->flags)) { decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); + set_bit(BIT_REQUEST_UPDATE, &ctx->flags); + } if (ctx->out_type & IFTYPE_I80) set_bit(BIT_WIN_UPDATED, &ctx->flags);