From patchwork Fri Nov 14 02:36:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 5302681 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9E0869F818 for ; Fri, 14 Nov 2014 02:36:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1FEE201C8 for ; Fri, 14 Nov 2014 02:36:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 405952017D for ; Fri, 14 Nov 2014 02:36:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934926AbaKNCgL (ORCPT ); Thu, 13 Nov 2014 21:36:11 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:57976 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934582AbaKNCgK (ORCPT ); Thu, 13 Nov 2014 21:36:10 -0500 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NF0007LGCK49J10@mailout4.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 14 Nov 2014 11:36:04 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 9D.CA.18484.49A65645; Fri, 14 Nov 2014 11:36:04 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-11-54656a946844 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 62.FD.20081.49A65645; Fri, 14 Nov 2014 11:36:04 +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 <0NF0001L7CK3RZ30@mmp2.samsung.com>; Fri, 14 Nov 2014 11:36:04 +0900 (KST) From: Joonyoung Shim To: dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com, sw0312.kim@samsung.com, yj44.cho@samsung.com Subject: [PATCH v2] drm/exynos: add has_vtsel flag Date: Fri, 14 Nov 2014 11:36:02 +0900 Message-id: <1415932564-16463-1-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPLMWRmVeSWpSXmKPExsWyRsSkRHdKVmqIQeMGMYsrX9+zWUy6P4HF Ysb5fUwWMya/ZLPYu3MyowOrx/3u40wefVtWMXp83iQXwBzFZZOSmpNZllqkb5fAlfF2wW7W gvUCFdun3mZtYNzD28XIySEhYCJx9uttFghbTOLCvfVsXYxcHEICSxklLn97x97FyAFWtK67 EiI+nVHiy8ENrBBOG5PEov0rmEG62QT0JO5sO84EYosIKEv8nbiKEcRmFsiW2LhzFSuILSxg JLGr7RobiM0ioCpxeF4T2GZeAXeJ5f2dbBBXyEmcPDYZbIGEwHM2iZapfSwQDQIS3yYfYoG4 SFZi0wFmiHpJiYMrbrBMYBRcwMiwilE0tSC5oDgpvchYrzgxt7g0L10vOT93EyMwHE//e9a/ g/HuAetDjAIcjEo8vAxuqSFCrIllxZW5hxhNgTZMZJYSTc4HBn1eSbyhsZmRhamJqbGRuaWZ kjjvQqmfwUIC6YklqdmpqQWpRfFFpTmpxYcYmTg4pRoYFb7Yfoy+v7oo8LzH8dBHi++tc7h+ Ze1hkYDF+Xz/ypxUZrILxYUdf+YrF2em+CFEXrLQ3KZUIevTy7NrSk+lJy3UW91flvaBa9ll 0/8XNs7+Z+N9T1f9yovu/5ms74tl6qSS+NLzbJjtjkr/KXCMu3fg123l4/pTVl3LeRPutbbn 3sKV/5bsVGIpzkg01GIuKk4EAIkV9XFCAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t9jQd0pWakhBv2N/BZXvr5ns5h0fwKL xYzz+5gsZkx+yWaxd+dkRgdWj/vdx5k8+rasYvT4vEkugDmqgdEmIzUxJbVIITUvOT8lMy/d Vsk7ON453tTMwFDX0NLCXEkhLzE31VbJxSdA1y0zB2inkkJZYk4pUCggsbhYSd8O04TQEDdd C5jGCF3fkCC4HiMDNJCwhjHj7YLdrAXrBSq2T73N2sC4h7eLkYNDQsBEYl13ZRcjJ5ApJnHh 3nq2LkYuDiGB6YwSXw5uYIVw2pgkFu1fwQxSxSagJ3Fn23EmEFtEQFni78RVjCA2s0C2xMad q1hBbGEBI4ldbdfYQGwWAVWJw/OaWEBsXgF3ieX9nWwQ2+QkTh6bzDqBkXsBI8MqRtHUguSC 4qT0XEO94sTc4tK8dL3k/NxNjOBgfya1g3Flg8UhRgEORiUeXga31BAh1sSy4srcQ4wSHMxK IryHIoFCvCmJlVWpRfnxRaU5qcWHGE2Btk9klhJNzgdGYl5JvKGxiZmRpZG5oYWRsbmSOO+B VutAIYH0xJLU7NTUgtQimD4mDk6pBsYCfR7/hLcTVE4o309SeLDzfMFJhfOOhVNe9nFwsOaI uKxn35v94qyPhvm0TZLbZnbuYg4VFw7/XP2CwXdx2u7t+pmmZc8iuviVti51eLsi+YzjFKnf T1zKjSyU9HnEbs/0X1Oaw7N40d8TrxbYR8wOElnyv+rgFK+LkgtXaV0tKXR6dH7PXk4lluKM REMt5qLiRACHB22xjAIAAA== 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.9 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 --- Changelog from v1: - rebase on latest exynos-drm-next branch - add has_vtsel for exynos4415 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 5cc57f7..93b263e 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 exynos4415_fimd_driver_data = { @@ -127,6 +129,7 @@ static struct fimd_driver_data exynos4415_fimd_driver_data = { .lcdblk_bypass_shift = 1, .has_shadowcon = 1, .has_vidoutcon = 1, + .has_vtsel = 1, }; static struct fimd_driver_data exynos5_fimd_driver_data = { @@ -136,6 +139,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 { @@ -354,7 +358,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)) {