From patchwork Mon Jan 9 14:33:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9504909 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 A1419606E1 for ; Mon, 9 Jan 2017 14:33:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9478F2832F for ; Mon, 9 Jan 2017 14:33:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8997B28406; Mon, 9 Jan 2017 14:33:28 +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 06D5E2832F for ; Mon, 9 Jan 2017 14:33:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940081AbdAIOd0 (ORCPT ); Mon, 9 Jan 2017 09:33:26 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:28372 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032232AbdAIOdJ (ORCPT ); Mon, 9 Jan 2017 09:33:09 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OJI00HFGOF7DR80@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Mon, 09 Jan 2017 14:33:07 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170109143306eucas1p1345db7750176103d6e83d1837ddfc90f~YIQXqObtU2895328953eucas1p1x; Mon, 9 Jan 2017 14:33:06 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 73.59.28517.22F93785; Mon, 9 Jan 2017 14:33:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170109143305eucas1p24cb7e4ef9559afcdcb1b6c6854d9c5e3~YIQW9gDAF0748207482eucas1p2N; Mon, 9 Jan 2017 14:33:05 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-39-58739f223ac1 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A1.D0.10233.91F93785; Mon, 9 Jan 2017 14:32:57 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJI00DINOF43J70@eusync1.samsung.com>; Mon, 09 Jan 2017 14:33:05 +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: update shadow registers iff there are active windows Date: Mon, 09 Jan 2017 15:33:02 +0100 Message-id: <1483972382-15984-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsWy7djP87pK84sjDB7M4Le4te4cq8XGGetZ La58fc9mMen+BBaLGef3MVmsPXKX3YHN4373cSaPvi2rGD0+b5ILYI7isklJzcksSy3St0vg yth1Yh9rwUTeime3f7I0MPZwdzFycE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tTDaIdXISN891Mk9g5F7AyLCKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMAC3Hfu5ZQdj 17vgQ4wCHIxKPLwRE4ojhFgTy4orcw8xSnAwK4nw9s0ECvGmJFZWpRblxxeV5qQWH2I0BVo+ kVlKNDkfGB15JfGGJobmloZGxhYW5kZGSuK8Uz9cCRcSSE8sSc1OTS1ILYLpY+LglGpgdLwm 4q2RVGd9fWvM7As3mc+p601Qn5nlJKBZ9LbumMPVn//+Zyl/nP8yJ33j48gD6mV7nNLXx61f ZrDpiTGvYviV3cf0poa8S9U+HWw8u4L15btsuTvs3vdSXf38LUpPxNcVfd4jNHPHBAHdj2+P vty4Yb6m66yNNSe2TV35wPRv5atTXHwJf5RYijMSDbWYi4oTAQpqEKBWAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170109143305eucas1p24cb7e4ef9559afcdcb1b6c6854d9c5e3 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: 20170109143305eucas1p24cb7e4ef9559afcdcb1b6c6854d9c5e3 X-RootMTR: 20170109143305eucas1p24cb7e4ef9559afcdcb1b6c6854d9c5e3 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 Improper usage of DECON_UPDATE register leads to subtle errors. If it set in decon_commit when there are no active windows it results in slow registry updates - all subsequent shadow registry updates takes more than full vblank. On the other side if it is not set when there are active windows it results in garbage on the screen after suspend/resume of FB console. The patch hopefully fixes it. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index ca75fe1..f15d9b1 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -209,8 +209,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc) /* enable output and display signal */ decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID | VIDCON0_ENVID_F, ~0); - - decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); } static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win, @@ -361,8 +359,9 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc) for (i = ctx->first_win; i < WINDOWS_NR; i++) decon_shadow_protect_win(ctx, i, false); - /* standalone update */ - decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); + /* update iff there are active windows */ + if (crtc->base.state->plane_mask) + decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); if (ctx->out_type & IFTYPE_I80) set_bit(BIT_WIN_UPDATED, &ctx->flags);