From patchwork Fri Jan 13 08:42:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9514829 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 68B4C6077E for ; Fri, 13 Jan 2017 08:43:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 627F42868D for ; Fri, 13 Jan 2017 08:43:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 574D62869D; Fri, 13 Jan 2017 08:43:16 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4F742868D for ; Fri, 13 Jan 2017 08:43:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F5366ED62; Fri, 13 Jan 2017 08:43:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F69A6ED5F for ; Fri, 13 Jan 2017 08:43:13 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OJP0046OMVXI050@mailout2.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 13 Jan 2017 08:43:09 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170113084308eucas1p21cb4750cfc630c0ab3a66d90d0733c83~ZSD9HqO3i0534605346eucas1p2Q; Fri, 13 Jan 2017 08:43:08 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id C4.59.16908.F1398785; Fri, 13 Jan 2017 08:43:11 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170113084308eucas1p24db5cafc0cc94556beaabfc4cfde8200~ZSD8fWTV71926319263eucas1p2B; Fri, 13 Jan 2017 08:43:08 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-bf-5878931f043c Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 0B.09.06687.15398785; Fri, 13 Jan 2017 08:44:01 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJP007K1MVVEJ40@eusync4.samsung.com>; Fri, 13 Jan 2017 08:43:08 +0000 (GMT) From: Andrzej Hajda To: Inki Dae , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2] drm/exynos/decon5433: set STANDALONE_UPDATE_F also if planes are disabled Date: Fri, 13 Jan 2017 09:42:59 +0100 Message-id: <1484296979-17195-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1484295026-16435-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsWy7djP87rykysiDDqbOS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ljZuZIZxGJonGE+/AqtgE NCX+br7JBmKLCGRKvGxeD1bELNDHKNH4dxVYQlggXuL/+sVgNouAqsTSh7vYQWxeAWeJGVMm MkOsk5O4ea4TzOYUcJHY/7KVCcQWAqp5tGEi2wRG3gWMDKsYRVJLi3PTc4sN9YoTc4tL89L1 kvNzNzECw3XbsZ+bdzBe2hh8iFGAg1GJh3fC7fIIIdbEsuLK3EOMEhzMSiK8JydURAjxpiRW VqUW5ccXleakFh9iNAU6aiKzlGhyPjCW8kriDU0MzS0NjYwtLMyNjJTEeUs+XAkXEkhPLEnN Tk0tSC2C6WPi4JRqYEy66c2tsePLC8/7lj8OHFkRIqhwsvKE1P5wvnOmLZ+CNki/9gtUW17U 3m92tNfPakulheG17qxLrRllai4vDz3meeY3e1dj96vA2qA7T6869l9VnLjsX/Ss/vbc2Z/z a5tOtGlLWhp/yk6v05G+uuaG4wOFBfOF/I8u6Nf5JdUfsjE6OfXsTyWW4oxEQy3mouJEAJSv rA1tAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170113084308eucas1p24db5cafc0cc94556beaabfc4cfde8200 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 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: 20170113084308eucas1p24db5cafc0cc94556beaabfc4cfde8200 X-RootMTR: 20170113084308eucas1p24db5cafc0cc94556beaabfc4cfde8200 References: <1484295026-16435-1-git-send-email-a.hajda@samsung.com> Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz 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-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 Tested-by: Joonyoung Shim --- v2: fixed clear-bit code (Thx Marek) --- 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..77a614d 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); + clear_bit(BIT_REQUEST_UPDATE, &ctx->flags); + } if (ctx->out_type & IFTYPE_I80) set_bit(BIT_WIN_UPDATED, &ctx->flags);