From patchwork Fri Jan 20 06:52:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9527547 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 A433260434 for ; Fri, 20 Jan 2017 06:54:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95A4A285C3 for ; Fri, 20 Jan 2017 06:54:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 890B6285F5; Fri, 20 Jan 2017 06:54:14 +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 1E698285C3 for ; Fri, 20 Jan 2017 06:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751557AbdATGyN (ORCPT ); Fri, 20 Jan 2017 01:54:13 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:20713 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbdATGwl (ORCPT ); Fri, 20 Jan 2017 01:52: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 <0OK200E5BGFK0640@mailout4.w1.samsung.com>; Fri, 20 Jan 2017 06:52:32 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170120065232eucas1p124dab7389e62ade16dede9dab2882628~baEYPcMMl0189301893eucas1p1S; Fri, 20 Jan 2017 06:52:32 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 8C.A0.09557.FA3B1885; Fri, 20 Jan 2017 06:52:32 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170120065231eucas1p121d2a987695fdce00e1b2bba445f1818~baEXlQjY_0188801888eucas1p1a; Fri, 20 Jan 2017 06:52:31 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-59-5881b3af0e3f Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C4.05.06687.AE3B1885; Fri, 20 Jan 2017 06:53:30 +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 <0OK200BZPGFGLA10@eusync4.samsung.com>; Fri, 20 Jan 2017 06:52:31 +0000 (GMT) From: Andrzej Hajda To: Inki Dae , dri-devel@lists.freedesktop.org, Krzysztof Kozlowski Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Kyungmin Park , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 6/7] drm/exynos/decon5433: signal vblank only on odd fields Date: Fri, 20 Jan 2017 07:52:24 +0100 Message-id: <1484895145-511-7-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1484895145-511-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLIsWRmVeSWpSXmKPExsWy7djP87obNjdGGByYzGhxa905VouNM9az Wlz5+p7NYtL9CSwW589vYLc42/SG3eLyrjlsFjPO72OyWHvk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+/WCFsMYkL99azdTFy cQgJLGGUmNX4nBHCaWSS+LJ5IztIFZuApsTfzTfZQGwRgVyJ9U9nsoMUMQv8Y5TYcPUNE0hC WMBbYumGr0A2BweLgKrEj6UxIGFeAUeJd60dLBDb5CRunutkBinhFHCS2LsoHSQsBFRysPkA 2wRG3gWMDKsYRVJLi3PTc4sN9YoTc4tL89L1kvNzNzECg3rbsZ+bdzBe2hh8iFGAg1GJhzfh WEOEEGtiWXFl7iFGCQ5mJRHenvWNEUK8KYmVValF+fFFpTmpxYcYTYFOmsgsJZqcD4y4vJJ4 QxNDc0tDI2MLC3MjIyVx3pIPV8KFBNITS1KzU1MLUotg+pg4OKUaGDknqhwU/B89OTxbqky2 VpjrWYrI4e+rzt9ZeTLk5LYFu/0nvhF7HzLlVGYRR7frGo4Ijs73jwJr1HZ8Ki3PuS1ZdWZa y5MJE18enfT/7dqXH5RX7/b9GlCyedJf24A5Bw4H3rtVqzCj3f/An3PPmp1j1qx5lrjL5PrO hY83fDwZm272zbM8dwOvEktxRqKhFnNRcSIAYfc+NYACAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170120065231eucas1p121d2a987695fdce00e1b2bba445f1818 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: 20170120065231eucas1p121d2a987695fdce00e1b2bba445f1818 X-RootMTR: 20170120065231eucas1p121d2a987695fdce00e1b2bba445f1818 References: <1484895145-511-1-git-send-email-a.hajda@samsung.com> 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 In case of interlace mode irq is generated for odd and even fields, but vblank should be signaled only for the last emitted field. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++++++ include/video/exynos5433_decon.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 46434ba9..ad8b93a 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -591,6 +591,13 @@ static irqreturn_t decon_irq_handler(int irq, void *dev_id) if (val) { writel(val, ctx->addr + DECON_VIDINTCON1); + if (ctx->out_type & IFTYPE_HDMI) { + val = readl(ctx->addr + DECON_VIDOUTCON0); + val &= VIDOUT_INTERLACE_EN_F | VIDOUT_INTERLACE_FIELD_F; + if (val == + (VIDOUT_INTERLACE_EN_F | VIDOUT_INTERLACE_FIELD_F)) + return IRQ_HANDLED; + } drm_crtc_handle_vblank(&ctx->crtc->base); } diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h index b26511a..ef8e2a8 100644 --- a/include/video/exynos5433_decon.h +++ b/include/video/exynos5433_decon.h @@ -89,6 +89,7 @@ #define VIDCON0_ENVID_F (1 << 0) /* VIDOUTCON0 */ +#define VIDOUT_INTERLACE_FIELD_F (1 << 29) #define VIDOUT_INTERLACE_EN_F (1 << 28) #define VIDOUT_LCD_ON (1 << 24) #define VIDOUT_IF_F_MASK (0x3 << 20)