From patchwork Wed Nov 5 11:26:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 5233581 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 6384E9F2F1 for ; Wed, 5 Nov 2014 11:26:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 817A2201E4 for ; Wed, 5 Nov 2014 11:26:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82074201D3 for ; Wed, 5 Nov 2014 11:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060AbaKEL0N (ORCPT ); Wed, 5 Nov 2014 06:26:13 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:58529 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753520AbaKEL0M (ORCPT ); Wed, 5 Nov 2014 06:26:12 -0500 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEK00JZID3NJ700@mailout4.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 05 Nov 2014 20:26:11 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.113]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 14.5C.19034.2590A545; Wed, 05 Nov 2014 20:26:11 +0900 (KST) X-AuditID: cbfee691-f79b86d000004a5a-71-545a0952d904 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 5D.7A.09430.2590A545; Wed, 05 Nov 2014 20:26:10 +0900 (KST) Received: from localhost.localdomain ([10.88.100.151]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NEK00E8DD3MV910@mmp1.samsung.com>; Wed, 05 Nov 2014 20:26:10 +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, Joonyoung Shim Subject: [PATCH] drm/exynos: add has_vtsel flag Date: Wed, 05 Nov 2014 20:26:09 +0900 Message-id: <1415186769-21847-1-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHLMWRmVeSWpSXmKPExsWyRsSkUDeYMyrE4P5JJosrX9+zWUy6P4HF 4sW9iywWM87vY7KYMfklmwOrx/3u40wefVtWMXp83iQXwBzFZZOSmpNZllqkb5fAlfGxpZe1 4BJvxZLeJ4wNjIu4uxg5OSQETCQ+/F/DAmGLSVy4t56ti5GLQ0hgKaPEnO7FQAkOsKKti40h 4osYJZbemwLWICTQxiSx+lw5iM0moCdxZ9txJhBbREBZ4u/EVYwgNrNAvcSJyafZQGxhAX2J C9e3gNksAqoSy4+uAbN5BdwlPl5bBnWEnMTJY5NZQZZJCDxnk5ix9ioTRIOAxLfJh6AOkpXY dIAZol5S4uCKGywTGAUXMDKsYhRNLUguKE5KLzLVK07MLS7NS9dLzs/dxAgMxtP/nk3cwXj/ gPUhRgEORiUeXoPcyBAh1sSy4srcQ4ymQBsmMkuJJucDQz6vJN7Q2MzIwtTE1NjI3NJMSZxX R/pnsJBAemJJanZqakFqUXxRaU5q8SFGJg5OqQZGG2MOmdfldzW/1QSafHn3Rz84KvP9wd6H 66127D9VvnKe3MVO58YovyONSYKqy6Y85IzddfyMn2Kb6MfPc0Nvve61nvWjxGje9czCazx5 kSXhsdPakruMlEoqdE9P7T4+4ZW6wASmHSW2cuauXCmVR76e8Wr9P2enXlv3vdS9rI2PLioe +9GqxFKckWioxVxUnAgAs/uNREECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsVy+t9jAd0gzqgQgwenLCyufH3PZjHp/gQW ixf3LrJYzDi/j8lixuSXbA6sHve7jzN59G1ZxejxeZNcAHNUA6NNRmpiSmqRQmpecn5KZl66 rZJ3cLxzvKmZgaGuoaWFuZJCXmJuqq2Si0+ArltmDtBOJYWyxJxSoFBAYnGxkr4dpgmhIW66 FjCNEbq+IUFwPUYGaCBhDWPGx5Ze1oJLvBVLep8wNjAu4u5i5OCQEDCR2LrYuIuRE8gUk7hw bz1bFyMXh5DAIkaJpfemsIAkhATamCRWnysHsdkE9CTubDvOBGKLCChL/J24ihHEZhaolzgx +TQbiC0soC9x4foWMJtFQFVi+dE1YDavgLvEx2vLWCCWyUmcPDaZdQIj9wJGhlWMoqkFyQXF Sem5RnrFibnFpXnpesn5uZsYwaH+THoH46oGi0OMAhyMSjy8BrmRIUKsiWXFlbmHGCU4mJVE eK+xRoUI8aYkVlalFuXHF5XmpBYfYjQF2j6RWUo0OR8Yh3kl8YbGJmZGlkbmhhZGxuZK4rwH W60DhQTSE0tSs1NTC1KLYPqYODilGhh5Juq6zXA1mHaES6j5TYp68rGzXKb/LvfqRT7/KWKc kuTJmraDyZF/u6bgr9dnv8rVv2l2nyD9sz21X9B9RkSk3gZmny8PXHfpmh25emq7/ZpdV85Z bvqjGJrgwyuzuanvTL715/Paa4Jal3tIbYvp69l4VDy18+HU3mJXxdsM91JW/mn9cEWJpTgj 0VCLuag4EQAZdYX2iwIAAA== 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)) {