From patchwork Wed Mar 23 13:15:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 8649881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 53E7F9F36E for ; Wed, 23 Mar 2016 13:17:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 864C12038D for ; Wed, 23 Mar 2016 13:17:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D5571203B7 for ; Wed, 23 Mar 2016 13:17:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A7D36E859; Wed, 23 Mar 2016 13:16:58 +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 85A946E3EB for ; Wed, 23 Mar 2016 13:15:36 +0000 (UTC) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O4H00FSSU5XTS90@mailout2.w1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 23 Mar 2016 13:15:33 +0000 (GMT) X-AuditID: cbfec7f4-f796c6d000001486-76-56f296f5b017 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id A5.BC.05254.5F692F65; Wed, 23 Mar 2016 13:15:33 +0000 (GMT) Received: from amdc1061.digital.local ([106.116.147.88]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O4H00DL6U5VU620@eusync1.samsung.com>; Wed, 23 Mar 2016 13:15:33 +0000 (GMT) From: Andrzej Hajda To: Inki Dae Subject: [PATCH 5/7] drm/exynos/decon5433: fix DECON standalone update Date: Wed, 23 Mar 2016 14:15:16 +0100 Message-id: <1458738918-32054-6-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1458738918-32054-1-git-send-email-a.hajda@samsung.com> References: <1458738918-32054-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplluLIzCtJLcpLzFFi42I5/e/4Zd2v0z6FGXxsNrW4te4cq8XGGetZ La58fc9mMen+BBaLGef3MVmsPXKX3YHN4373cSaPvi2rGD0+b5ILYI7isklJzcksSy3St0vg yrg+t5u94KdQRfucn2wNjN0CXYycHBICJhIr319hhbDFJC7cW88GYgsJLGWUWLfZoYuRC8hu YpL42/oIrIhNQFPi7+abYEUiAsoSq/a1s4MUMQtsZJJonnSGESQhLOAmsfnbFSYQm0VAVeLt vW9gcV4BZ4nVy+cyQWyTkzh5bDLYUE4BF4n9x19BbXaW+HFnK9MERt4FjAyrGEVTS5MLipPS cw31ihNzi0vz0vWS83M3MUIC58sOxsXHrA4xCnAwKvHwSpz5GCbEmlhWXJl7iFGCg1lJhFdy 6qcwId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rxzd70PERJITyxJzU5NLUgtgskycXBKNTCGulaf 6fVPu37+M99mGeaFIb22rCpfJ2odbo9t+2Fyau4WNa/Hcr/zt03+s4j1XYuBgnXs1ZkbJx69 JCY0cZPxvGQpx1Dz+1crV4U6yM276LyBZWrVIZ2p9vL8PUwN77g259s5fJKOtXug22ez8+Ou 6rfWWrfFAvpOVTZ4ruOZoXvjeJGqtLUSS3FGoqEWc1FxIgDTHsBiGAIAAA== Cc: Andrzej Hajda , linux-samsung-soc@vger.kernel.org, Marek Szyprowski , "open list:DRM DRIVERS FOR EXYNOS" , 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 DECON should be updated after un-protecting windows and after changing output parameters, otherwise image is not displayed in case of HDMI path. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index ab9154e..7fec656 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -191,6 +191,8 @@ 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, @@ -316,9 +318,6 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, /* window enable */ decon_set_bits(ctx, DECON_WINCONx(win), WINCONx_ENWIN_F, ~0); - - /* standalone update */ - decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); } static void decon_disable_plane(struct exynos_drm_crtc *crtc, @@ -336,9 +335,6 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc, decon_set_bits(ctx, DECON_WINCONx(win), WINCONx_ENWIN_F, 0); decon_shadow_protect_win(ctx, win, false); - - /* standalone update */ - decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); } static void decon_atomic_flush(struct exynos_drm_crtc *crtc) @@ -352,6 +348,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); + if (ctx->out_type == IFTYPE_I80) set_bit(BIT_WIN_UPDATED, &ctx->flags); } @@ -463,8 +462,10 @@ static void decon_clear_channels(struct exynos_drm_crtc *crtc) decon_shadow_protect_win(ctx, win, true); decon_set_bits(ctx, DECON_WINCONx(win), WINCONx_ENWIN_F, 0); decon_shadow_protect_win(ctx, win, false); - decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); } + + decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0); + /* TODO: wait for possible vsync */ msleep(50);