From patchwork Wed Nov 5 11:25:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 5233541 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87074C11AC for ; Wed, 5 Nov 2014 11:25:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C03D5201F2 for ; Wed, 5 Nov 2014 11:25:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69187201D3 for ; Wed, 5 Nov 2014 11:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754035AbaKELZX (ORCPT ); Wed, 5 Nov 2014 06:25:23 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:60260 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753520AbaKELZX (ORCPT ); Wed, 5 Nov 2014 06:25:23 -0500 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEK009MHD29HO60@mailout3.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 05 Nov 2014 20:25:21 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.114]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 4C.0C.19034.1290A545; Wed, 05 Nov 2014 20:25:21 +0900 (KST) X-AuditID: cbfee691-f79b86d000004a5a-bf-545a09217ec0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 7C.54.20081.1290A545; Wed, 05 Nov 2014 20:25:21 +0900 (KST) Received: from localhost.localdomain ([10.88.100.151]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NEK006P8D29EJ60@mmp2.samsung.com>; Wed, 05 Nov 2014 20:25:21 +0900 (KST) From: Joonyoung Shim To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com, sw0312.kim@samsung.com, linux-samsung-soc@vger.kernel.org Subject: [PATCH] drm/exynos: add has_vtsel flag Date: Wed, 05 Nov 2014 20:25:26 +0900 Message-id: <1415186726-21760-1-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNLMWRmVeSWpSXmKPExsWyRsSkSFeRMyrEYOVxKYsrX9+zWUy6P4HF Ysb5fUwWMya/ZHNg8bjffZzJo2/LKkaPz5vkApijuGxSUnMyy1KL9O0SuDI+tvSyFlzirVjS +4SxgXERdxcjJ4eEgInEqcOXmSFsMYkL99azdTFycQgJLGWUeLL9BgtM0f8TS6AS0xkl/p1p YIRw2pgklh25AdbOJqAncWfbcSYQW0RAWeLvxFWMIDazQKjE+z3NYHFhAX2JC9e3sIHYLAKq Eh0bd4Ft4BVwl9j/Zi4TxDY5iZPHJrOCLJAQuM0msWzSMXaIBgGJb5MPATVwACVkJTYdgDpb UuLgihssExgFFzAyrGIUTS1ILihOSi8y1StOzC0uzUvXS87P3cQIDMPT/55N3MF4/4D1IUYB DkYlHl6D3MgQIdbEsuLK3EOMpkAbJjJLiSbnA4M9ryTe0NjMyMLUxNTYyNzSTEmcV0f6Z7CQ QHpiSWp2ampBalF8UWlOavEhRiYOTqkGxumnvWeFfUmNcizZp2szSfDCKr+pQnq/+nf0ZKvc +zWvQ+ziz3NLP2i41O/r2nc456H9SxWTf5NDO+8aKJyZpv+gXpBPZ9+NF+mPDO4eu+ExV7DG /QB/R/3nz7OKWKySVrAeDpaw2eVVuUn32icp2X88u9+rvQk9MmNWSI3Y+nPc18KeLrsqfFKJ pTgj0VCLuag4EQAYllQ0PgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsVy+t9jQV1FzqgQg6N/hSyufH3PZjHp/gQW ixnn9zFZzJj8ks2BxeN+93Emj74tqxg9Pm+SC2COamC0yUhNTEktUkjNS85PycxLt1XyDo53 jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAFap6RQlphTChQKSCwuVtK3wzQhNMRN1wKmMULX NyQIrsfIAA0krGHM+NjSy1pwibdiSe8TxgbGRdxdjJwcEgImEv9PLGGDsMUkLtxbD2RzcQgJ TGeU+HemgRHCaWOSWHbkBjNIFZuAnsSdbceZQGwRAWWJvxNXMYLYzAKhEu/3NIPFhQX0JS5c 3wI2lUVAVaJj4y4WEJtXwF1i/5u5TBDb5CROHpvMOoGRewEjwypG0dSC5ILipPRcQ73ixNzi 0rx0veT83E2M4CB/JrWDcWWDxSFGAQ5GJR5eg9zIECHWxLLiytxDjBIczEoivNdYo0KEeFMS K6tSi/Lji0pzUosPMZoCbZ/ILCWanA+MwLySeENjEzMjSyNzQwsjY3Mlcd4DrdaBQgLpiSWp 2ampBalFMH1MHJxSDYwuaU2C75gTFrE+N7c//8v/SP/ByU+3rK//bmt4Sy1w3jH2N4/Wx7NV qv5J/DnvhvDsgJgVG9ceqV0w/dE86c+G9vO0tjfatbisX/Tzn99U3e0P5AM2RU3YYmFxYGZj zkGjMyVOi96Zb94d4LuzwGsRl/m/xZ0SrOdjDr//fuqhgvW6T8H/AxXuK7EUZyQaajEXFScC ADm7zEWIAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The exynos fimd provides video type selection bits from system register but exynos3 series don't has it, so needs has_vtsel flag and we can distinguish whether set video type selection bits. Signed-off-by: Joonyoung Shim --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 085b066..1b32771 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -96,6 +96,7 @@ struct fimd_driver_data { unsigned int has_clksel:1; unsigned int has_limited_fmt:1; unsigned int has_vidoutcon:1; + unsigned int has_vtsel:1; }; static struct fimd_driver_data s3c64xx_fimd_driver_data = { @@ -118,6 +119,7 @@ static struct fimd_driver_data exynos4_fimd_driver_data = { .lcdblk_vt_shift = 10, .lcdblk_bypass_shift = 1, .has_shadowcon = 1, + .has_vtsel = 1, }; static struct fimd_driver_data exynos5_fimd_driver_data = { @@ -127,6 +129,7 @@ static struct fimd_driver_data exynos5_fimd_driver_data = { .lcdblk_bypass_shift = 15, .has_shadowcon = 1, .has_vidoutcon = 1, + .has_vtsel = 1, }; struct fimd_win_data { @@ -343,7 +346,8 @@ static void fimd_commit(struct exynos_drm_manager *mgr) writel(0, timing_base + I80IFCONFBx(0)); /* set video type selection to I80 interface */ - if (ctx->sysreg && regmap_update_bits(ctx->sysreg, + if (driver_data->has_vtsel && ctx->sysreg && + regmap_update_bits(ctx->sysreg, driver_data->lcdblk_offset, 0x3 << driver_data->lcdblk_vt_shift, 0x1 << driver_data->lcdblk_vt_shift)) {